<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
},
}
uniapp 自定義多列選擇器
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.