优化picker与导航的额问题

master
chen 2022-08-18 18:36:17 +08:00
parent 288993254b
commit aae2ac38d5
2 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,11 @@ Page({
hideEv(){ hideEv(){
wx.setStorageSync('opacity',0); wx.setStorageSync('opacity',0);
}, },
// 关闭picker
closeEv(){
console.log(1234);
wx.setStorageSync('opacity',1);
},
bindDateChange: function(e) { bindDateChange: function(e) {
wx.setStorageSync('opacity',1); wx.setStorageSync('opacity',1);
this.setData({ this.setData({

View File

@ -29,13 +29,13 @@
{{newList[currentIndex].name}}时间 {{newList[currentIndex].name}}时间
</view> </view>
<view class="picker-box"> <view class="picker-box">
<picker mode="date" value="{{start_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="start" bindchange="bindDateChange"> <picker mode="date" value="{{start_date}}" bindcancel="closeEv" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="start" bindchange="bindDateChange">
<view class="picker" bindtap="hideEv"> <view class="picker" bindtap="hideEv">
{{start_date?start_date:'请选择开始时间'}} {{start_date?start_date:'请选择开始时间'}}
</view> </view>
</picker> </picker>
<picker mode="date" value="{{end_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="end" bindchange="bindDateChange"> <picker mode="date" value="{{end_date}}" bindcancel="closeEv" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="end" bindchange="bindDateChange">
<view class="picker" bindtap="hideEv"> <view class="picker" bindtap="hideEv">
{{end_date?end_date:'请选择结束时间'}} {{end_date?end_date:'请选择结束时间'}}
</view> </view>