picker组件使用multiSelector模式,一直报错如下(有时鼠标放过去就报错,有时是滚动选择列数据时报错),调试了一下,跟bindchange、bindcolumnchange事件都没关系(这两个事件里只写了个console.log),有大神知道怎么回事没?
Sun Jul 08 2018 11:41:15 GMT+0800 (中国标准时间) 渲染层错误
VM1194:2 TypeError: Cannot read property '0' of null
贴出主要代码如下:
<picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{aaa}}" range-key="{{'name'}}">
<view class="picker">
当前选择:
</view>
</picker>
aaa: [
[
{
id: 0,
name: '无脊柱动物'
},
{
id: 1,
name: '脊柱动物'
}
], [
{
id: 0,
name: '扁性动物'
},
{
id: 1,
name: '线形动物'
},
{
id: 2,
name: '环节动物'
},
{
id: 3,
name: '软体动物'
},
{
id: 3,
name: '节肢动物'
}
]
],
bindMultiPickerChange: function (e) {
console.log('aaaaaa')
},
bindMultiPickerColumnChange: function (e) {
console.log('aaaaaa')
},