修复地址编辑切换国家之后 省份id没有清空
This commit is contained in:
parent
35e1de6b5d
commit
36610480e9
|
|
@ -201,6 +201,10 @@
|
||||||
hload: true
|
hload: true
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.source.zones = res.data.zones;
|
this.source.zones = res.data.zones;
|
||||||
|
|
||||||
|
if (!res.data.zones.some(e => e.id == this.form.zone_id)) {
|
||||||
|
this.form.zone_id = '';
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,10 @@
|
||||||
|
|
||||||
$http.get(`/countries/${e}/zones`).then((res) => {
|
$http.get(`/countries/${e}/zones`).then((res) => {
|
||||||
this.source.zones = res.data.zones;
|
this.source.zones = res.data.zones;
|
||||||
|
|
||||||
|
if (!res.data.zones.some(e => e.id == this.dialogAddress.form.zone_id)) {
|
||||||
|
this.dialogAddress.form.zone_id = '';
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue