关于一个data传值到wxml的问题?
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>
效果