Commit e61e14a3 by songbingqi

修改关闭首页取单码弹窗逻辑

parent df14d135
<template> <template>
<div> <div>
<u-popup :show="show" :round="10" mode="bottom" :safeAreaInsetBottom="false" @close="close" zIndex="10078" :customStyle="popupStyle"> <u-popup :show="show" :round="10" mode="bottom" :safeAreaInsetBottom="false" @close="close" zIndex="10078" :customStyle="popupStyle">
<view class="bigBox" :style="{'margin-top':'-20rpx'}" @touchstart.stop.prevent="start" @touchmove.stop.prevent="move" @touchend.stop.prevent="end" ref="op"> <view class="bigBox" :style="{'margin-top':'-20rpx'}" @touchstart="start" @touchmove.stop.prevent="move" @touchend="end" ref="op">
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view" :scroll-y="true">
<div class="order_flow" > <div class="order_flow" >
<div class="code">取单码 {{ orderInfo.orderNum }}</div> <div class="code">取单码 {{ orderInfo.orderNum }}</div>
...@@ -98,15 +98,16 @@ export default { ...@@ -98,15 +98,16 @@ export default {
if(val<0){ if(val<0){
this.popupStyle.transform = `translateY(${-val}px)` this.popupStyle.transform = `translateY(${-val}px)`
} }
if(val<-200){
console.log('滑动了:'+val + ',关闭')
this.close()
}
}, },
end(e) { end(e) {
this.clientYEnd = e.changedTouches[0].clientY; this.clientYEnd = e.changedTouches[0].clientY;
const val = parseInt((this.clientYStart-this.clientYEnd)) const val = parseInt((this.clientYStart-this.clientYEnd))
console.log(val) console.log(val)
if(val<-20){ if(val>-200){
console.log('滑动了:'+val + ',关闭')
this.close()
}else{
console.log('滑动了:'+val + ',回到顶部') console.log('滑动了:'+val + ',回到顶部')
this.popupStyle.transform = 'translateY(0px)' this.popupStyle.transform = 'translateY(0px)'
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment