- 微信小程序 怎么使用iconfont
微信小程序无法使用阿里的开源icon https://developers.weixin.qq.com/blogedit?action=edit_blog&lang=zh_CN&token=1704698442
2017-01-10 - 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>
2020-09-23 - 自定义组件如何判断slot是否存在
在小程序的组件中定义如下: [代码]<[代码][代码]view[代码][代码]>[代码][代码]<[代码][代码]slot[代码] [代码]name[代码][代码]=[代码][代码]"a"[代码][代码]></[代码][代码]slot[代码][代码]>[代码][代码]<[代码][代码]slot[代码] [代码]name[代码][代码]=[代码][代码]"b"[代码][代码]></[代码][代码]slot[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码] 使用时 [代码]<[代码][代码]component-test[代码][代码]>[代码][代码]<[代码][代码]view[代码] [代码]slot[代码][代码]=[代码][代码]"b"[代码][代码]>test</[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]component-test[代码][代码]>[代码]该怎么判断slot a是否存在呢?(不存在的元素做隐藏)
2018-04-24 - 微信小程序官方组件的样式怎么修改?
比如:picker 右上角确定按钮的样式怎么修改? [图片]
2020-11-02