在使用TextPicker 并且传入数据range类型 string[] 绑定selected 是没问题的
但是 range类型为 TextCascadePickerRangeContent[] 绑定selected绑定不上. 是不支持吗? 还是我写法有问题
private dataList: string[] | TextCascadePickerRangeContent[] = []
private select: number | number[] = []
TextPicker({ range: this.dataList, selected: $$this.select })
.textStyle({ color: 'rgba(51,51,51,0.5)', font: { size: 14 } })
.selectedTextStyle({ color: '#333', font: { size: 16, weight: 400 } })
.width('100%')
.canLoop(this.canLoop)
.onChange((value: string | string[], index: number | number[]) => {
console.info('TextPicker 多列联动:onChange ' + JSON.stringify(value) + ', ' + 'index: ' +
JSON.stringify(index))
})
参考如下示例: