页面:
<picker
bindchange="bindCountryChange"
class="weui-input weui-right"
value="{{countryIndex}}"
range="{{countries}}"
range-key="name"
>
<viewclass="weui-select ">{{countries[countryIndex].name}}</view>
</picker>
data:{
countries: [
{id: 1, name: "餐饮费",},
{id: 2, name: "住宿费",}
],
countryIndex: 0,
}
bindCountryChange(e){
this.setData({
countryIndex: e.detail.value
})
},