修复地址编辑切换国家之后 省份id没有清空

This commit is contained in:
pushuo 2022-09-23 17:48:23 +08:00 committed by Edward Yang
parent 35e1de6b5d
commit 36610480e9
2 changed files with 8 additions and 0 deletions

View File

@ -201,6 +201,10 @@
hload: true
}).then((res) => {
this.source.zones = res.data.zones;
if (!res.data.zones.some(e => e.id == this.form.zone_id)) {
this.form.zone_id = '';
}
})
},
}

View File

@ -350,6 +350,10 @@
$http.get(`/countries/${e}/zones`).then((res) => {
this.source.zones = res.data.zones;
if (!res.data.zones.some(e => e.id == this.dialogAddress.form.zone_id)) {
this.dialogAddress.form.zone_id = '';
}
})
},