picker组件:
<picker bindchange="bindRegionChange" mode = "region"> <view class="picker">省市区:{{region[0]}},{{region[1]}},{{region[2]}}</view> </picker> </view>
js代码:
bindRegionChange(e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setData({ region: e.detail.value, shen: e.detail.value[0], shi: e.detail.value[1], qu: e.detail.value[2], }) }
希望可以帮助到您.