多选picker,在bindcolumnchange中修改range后,选中的值会弹回去
startDateYearColumnChange:function({detail}){
console.log("detail", detail, this.data.startDateRange[0][detail.value]);
console.log("startDateRange", this.data.startDateRange);
if(detail.column == 0 && detail.value == 2){
this.setData({
'startDateRange[1]':[6, 5, 4, 3, 2, 1]
})
} else {
this.setData({
'startDateRange[1]':[11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
})
}
}
<picker
class="picker"
mode="multiSelector"
range="{{ startDateRange }}"
bindchange="changeStartDate"
bindcolumnchange="startDateYearColumnChange"
bindcancel="startDateSeleteCancel"
>
据我分析是因为改变了range绑定值的地址改变了,求问怎么解决这个问题
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
分享一个代码片段链接出来