多列选择器rang里面的数组在函数里改变了获取为null
发布于 7 年前 作者 nading 4244 次浏览 来自 官方Issues
  • 当前 Bug 的表现(可附上截图)

打印就成这样了求救

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

<wxml>

<picker bindchange=“changeMultiPicker3” mode=“multiSelector” range="{{multiArray3}}" bindcolumnchange=“columnchangeMultiPicker3”>

<js>

multiArray3: [

[“1K”, “2K”, “3K”, “4K”, “5K”, “6K”, “7K”, “8K”, “9K”, “10K”, “2万”, “3万”, “4万”, “5万”, “6万”, “8万”, “9万”, “10万”],

["—"],

[“1K”, “2K”, “3K”, “4K”, “5K”, “6K”, “7K”, “8K”, “9K”, “10k”, “2万”, “3万”, “4万”, “5万”, “6万”, “8万”, “9万”, “10万”, “10万以上”],

["/"],

[“月”]

],

columnchangeMultiPicker3: function (e) {

this.data.multiArray3[2] = this.data.multiArray3[0].slice(e.detail.value + 1)

this.setData({

multiArray3: this.data.multiArray3

})

},

changeMultiPicker3: function(e) {

console.log(e)

console.log(this.data.multiArray3)

},

回到顶部