diff --git a/packages/address-edit/index.vue b/packages/address-edit/index.vue index b481aa9ba..0340b178e 100644 --- a/packages/address-edit/index.vue +++ b/packages/address-edit/index.vue @@ -60,7 +60,7 @@ {{ saveButtonText || $t('save') }} - + {{ deleteButtonText || $t('delete') }} @@ -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 diff --git a/packages/address-edit/test/index.spec.js b/packages/address-edit/test/index.spec.js index d6a8100ff..0f5081cb1 100644 --- a/packages/address-edit/test/index.spec.js +++ b/packages/address-edit/test/index.spec.js @@ -231,9 +231,7 @@ test('delete address', async() => { const wrapper = mount(AddressEdit, { attachToDocument: true, propsData: { - addressInfo: { - id: '123' - } + showDelete: true } });