感觉这是个 bug, lifetimes.ready 或者 pageLifetimes.show 中跑了 setDate 后,也都不生效
picker-view设置了value,实际不生效。。。请问如何处理?picker-view设置了value,实际不生效。。。请问如何处理? [图片] JS //生成年月日时分秒 let date = new Date() let years = [] let months = [] let days = [] let hours = [] let minutes = [] let seconds = [] for (let i = 1990; i <= date.getFullYear(); i++) { years.push(i) } for (let i = 1; i <= 12; i++) { months.push(i) } for (let i = 1; i <= 31; i++) { days.push(i) } for (let i = 0; i <= 23; i++) { hours.push(i) } for (let i = 0; i <= 59; i++) { minutes.push(i) seconds.push(i) } _this.setData({ years: years, months: months, days: days, hours: hours, minutes: minutes, seconds: seconds, followupdatetimeValue: [9999, 9, 2, 1, 21, 11], }) WXML <picker-view indicator-style="height: 50px;" style="width: 100%; height: 50vh;" value="{{followupdatetimeValue}}" bindchange="followupdatetimeChange"> <picker-view-column> <view wx:for="{{years}}" wx:for-item="item" style="line-height: 50px; text-align: center;">{{item}}年 </view> </picker-view-column> <picker-view-column> <view wx:for="{{months}}" wx:for-item="item" wx:for-index="idx" style="line-height: 50px; text-align: center;">{{item}}月 </view> </picker-view-column> <picker-view-column> <view wx:for="{{days}}" wx:for-item="item" style="line-height: 50px; text-align: center;">{{item}}日</view> </picker-view-column> <picker-view-column> <view wx:for="{{hours}}" wx:for-item="item" style="line-height: 50px; text-align: center;">{{item}}时 </view> </picker-view-column> <picker-view-column> <view wx:for="{{minutes}}" wx:for-item="item" style="line-height: 50px; text-align: center;">{{item}}分 </view> </picker-view-column> <picker-view-column> <view wx:for="{{seconds}}" wx:for-item="item" style="line-height: 50px; text-align: center;">{{item}}秒 </view> </picker-view-column> </picker-view>
04-20