uniapp 自定义多列选择器
<pickerclass="width-100" mode="multiSelector" :range="timeList" :value="timesIndex" @change="bindTimeChange"><view>{{timeList[0][timesIndex[0]]}}:{{timeList[1][timesIndex[1]]}}...
·
<picker class="width-100" mode="multiSelector" :range="timeList" :value="timesIndex" @change="bindTimeChange">
<view>
{{timeList[0][timesIndex[0]]}}:{{timeList[1][timesIndex[1]]}}
</view>
</picker>
data(){
return{
timeList: [['01','02','03','04','05','06','07','08','09','10'],['00','10','20','30','40','50','60']],
timesIndex: [0,0]
}
},
methods:{
bindTimeChange(e){
console.log('picker发送选择改变,携带值为', e.target.value)
this.timesIndex = e.target.value
},
}
更多推荐
已为社区贡献1条内容
所有评论(0)