mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 15:09:16 +08:00
[bugfix] AddressEdit: show delete (#1648)
This commit is contained in:
parent
05c4804958
commit
ec0adaedea
@ -60,7 +60,7 @@
|
||||
<van-button block :loading="isSaving" @click="onSave" type="primary">
|
||||
{{ saveButtonText || $t('save') }}
|
||||
</van-button>
|
||||
<van-button block :loading="isDeleting" @click="onDelete" v-if="isEdit">
|
||||
<van-button block :loading="isDeleting" @click="onDelete" v-if="showDelete">
|
||||
{{ deleteButtonText || $t('delete') }}
|
||||
</van-button>
|
||||
</div>
|
||||
@ -164,10 +164,6 @@ export default create({
|
||||
return isObj(this.areaList) && Object.keys(this.areaList).length;
|
||||
},
|
||||
|
||||
isEdit() {
|
||||
return this.showDelete || !!this.data.id;
|
||||
},
|
||||
|
||||
areaText() {
|
||||
const { province, city, county, areaCode } = this.data;
|
||||
return province && city && county && areaCode
|
||||
|
@ -231,9 +231,7 @@ test('delete address', async() => {
|
||||
const wrapper = mount(AddressEdit, {
|
||||
attachToDocument: true,
|
||||
propsData: {
|
||||
addressInfo: {
|
||||
id: '123'
|
||||
}
|
||||
showDelete: true
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user