pick-view组件如何默认选中当前地理位置
如何默认到浙江省,设置value没效果,一直都是第一个
<picker-view style=“width: 100%; height:400px;” value="{{value}}" wx:key="">
<picker-view-column>
<view wx:for="{{provinces}}" class=“picker-item”>
{{item.name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{citys}}" class=“picker-item” wx:key="">
{{item.name}}</view>
</picker-view-column>
</picker-view>
</view>
var id = address.provinces[10].id
this.setData({
value: [10, 0],
provinces: address.provinces,
citys: address.citys[id]
})