7.16
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<u-radio-group v-model="current" @change="changeDefault" size="29" active-color="#FF780F">
|
||||
<u-empty text="暂无收货地址" mode="address" color="#000000" img-width="120" margin-top="300" v-if="!addressList.length"></u-empty>
|
||||
<view v-for="(item, index) in addressList" :key="index" class="address-item">
|
||||
<AddressItem :item="item" :current='current' @getAddressList="getAddressList"></AddressItem>
|
||||
<AddressItem :item="item" :current='current' @getAddressList="getAddressList" :state="state"></AddressItem>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
<view class="address-btn" @click="addAddress">添加地址</view>
|
||||
@@ -16,12 +16,16 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
current: -1, // radio 标记
|
||||
addressList: []
|
||||
addressList: [],
|
||||
state: '', // 页面状态 是否进页面选择地址
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddressItem
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option.type) this.state = option.type;
|
||||
},
|
||||
onShow() {
|
||||
this.getAddressList();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user