1、日期格式问题
new Date('2020-01-01') 转 NaN-NaN-NaN 需要 new Date('2020-01-01'.replace(/-/g, '/'))
2、picker mode=date在设置value情况下,会出现1年 1月情况
我们先看看微信文档里面写的value的格式,YYYY-MM-DD,无论fields是 year/month还是一样的。
yearChange(e) {
this.setData({
selectDate: e.detail.value,
selectFormatDate: e.detail.value.toString() + '-01-01', // fields=year, 拼上-01-01即可,你也可以拼其它月份
sectionStr: 'year'
})
},
monthChange(e) {
this.setData({
selectDate: e.detail.value,
selectFormatDate: e.detail.value.toString() + '-01',// fields=year, 拼上-01即可
sectionStr: 'month'
})
},
dateChange(e) {
if(this.data.sectionStr == 'year') {
this.yearChange(e);
}else {
this.monthChange(e);
}
},
以上两个问题只会在ios终端出现,安卓机正常。
3、picker mode = multiSelector
在滚动未停止的时候,点击确定会出现预想不到的效果 - -! picker-view 这个组件才发现有bindpickstart bindpickend 事件
4、css 属性 mask-image
需要使用mask-box-image
5、swiper 里面使用postion fixed相当 absolute
...