<form bindsubmit="formSubmit">
<picker range='' bindchange="select_address" mode="region" value='{{ address }}'>
{{ address }}
</picker>
<button form-type="submit">保存</button>
</form>
Page({
data: {
address: "请选择收货地址"
},
select_address: function(event){
let address = event.detail.value.join()
this.setData({
address: address
})
},
formSubmit: function(event){
console.log(this.data.address)
}
})
网友评论