Data代码:
data: {
openSelectRegion:"",
regionList:{},
currentType:0,
address:{
name:"AA",
tel:"AA",
province:"AA",
city:"AA",
county:"AA",
addressDetail:"AA",
addressIsDefault:false
},
wxml代码:
<view class="form-item">
<input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
</view>
<view class="form-item">
<input class="input" bindinput="bindinputMobile" value="{{address.tel}}" placeholder="手机号码" />
</view>
<view class="form-item">
<input class="input" value="{{address.province + address.city + address.county}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县" />
</view>
<view class="form-item">
<input class="input" bindinput="bindinputAddress" value="{{address.addressDetail}}" placeholder="详细地址, 如街道、楼盘号等" />
</view>
<view class="form-default">
<van-checkbox value="{{ address.addressIsDefault == 1 }}" bind:change="bindIsDefault">设为默认地址</van-checkbox>
</view>
</view>
效果
写一个可以复现问题的代码片段看下吧 https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
写个复现代码吧,把你页面现有的这些放进去是有值的
value="{{address.name}}" 获取不到address里的值,不仅是这个,address里的其他值都获取不到