简单快速的使用picker很方便
data(){
return{
ShopName:["唐僧","孙悟空","猪八戒","沙悟净","白龙马"],
index:0
}
}
<picker @change="bindPickerChange" :value="index" :range="ShopName">
<view>{{ShopName[index]}}</view>
</picker>
methods:{
bindPickerChange(e){
this.index = e.target.value;
console.log(this.ShopName[e.target.value])
}
}