不建议使用延迟,使用延迟存在非常明显的闪屏问题。 我用setData的第二个参数 self.setData({ year, month }, () => self.setData({ pickerVal }));
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>
2023-06-23wx.setClipboardData({ data: content, success() { wx.getClipboardData({ success() { wx.showToast({ title: '复制成功', icon: 'none', mask: true, duration: 1700 }); } }); } }); 一个长按复制的功能
showToast中的mask属性在真机上测试无效?showToast中的mask属性在开发工具里面可以实现“防止触摸穿透”,但是使用手机预览的时候就不行。请问这是什么问题,是否有解决方法?
2022-11-07老兄,你的问题解决了吗?
小程序logo使用党徽需要的证明材料怎么样写? 谁有模板提供一下,在线等,急之前审核logo头像的时候通过了审核,但是今天上传代码提交审核的时候竟然说因为logo使用党徽不能通过,需要提供证明材料
2020-07-16