uniapp picker选择器
<template>
<view>
<picker @change="examinationType" :value="index" :range="list" range-key="name">
<view style="padding: 20rpx;background-color: white;">{{typeSelect}}</view>
</picker>
</view>
</template>
<script>
export default {
data:function() {
return{
list:["中国","美国","日本"],
index:0,
typeSelect:"",
}
},
methods:{
examinationType:function(e) {
this.index= e.target.value;
this.typeSelect = this.list[this.index]
},
}
}
</script>