Fix:4314 【旅居商城小程序】入驻弹出营业时间后,点击空白处无法收起,会反复弹出来

This commit is contained in:
linxi
2025-11-04 17:50:38 +08:00
parent c975133fb8
commit bd2df37815
+6 -5
View File
@@ -1,5 +1,5 @@
<template>
<uni-popup ref="popup" type="bottom">
<u-popup :closeOnClickOverlay="true" :show="show" ref="popup" type="bottom">
<view class="tpf-time-range-section">
<view class="tpf-time-range-title-section flex flex-align-center flex-pack-justify">
<text class="tpf-time-range-title-txt tpf-time-range-cancel" @tap="closePopup('cancel')">取消</text>
@@ -30,7 +30,7 @@
</view>
</view>
</view>
</uni-popup>
</u-popup>
</template>
<script>
@@ -98,6 +98,7 @@ export default{
return {
startDefaultTimeArr:[0,0],
endDefaultTimeArr:[0,0],
show: false
}
},
methods:{
@@ -110,11 +111,11 @@ export default{
if(this.compareTwoTimeRange(this.startDefaultTimeArr,e.detail.value)) this.startDefaultTimeArr = e.detail.value;
},
open(){
this.$refs.popup.open();
this.show = true;
},
closePopup(action=""){
if(action == "cancel"){
this.$refs.popup.close();
this.show = false;
return false;
}
if(this.compareTwoTimeRange(this.startDefaultTimeArr , this.endDefaultTimeArr)){
@@ -129,7 +130,7 @@ export default{
this.$emit('timeRange',[
startTime,endTime
]);
this.$refs.popup.close();
this.show = false;
},
compareTwoTimeRange(arr1=[],arr2=[]){
if(arr1[0]>arr2[0] || (arr1[0] == arr2[0] && arr1[1] > arr2[1])) return true;