fix: backward compatible
This commit is contained in:
parent
4d8ff7af8e
commit
a4afc54f2e
1 changed files with 9 additions and 0 deletions
|
|
@ -103,6 +103,14 @@ async function fetchSubDistrict() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function selectSubDistrict(id: string) {
|
||||||
|
if (!id) return;
|
||||||
|
zipCode.value =
|
||||||
|
addrOptions.subDistrictOps
|
||||||
|
?.filter((x) => x.id === id)
|
||||||
|
.map((x) => x.zipCode)[0] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
const provinceOptions = ref<Record<string, unknown>[]>([]);
|
const provinceOptions = ref<Record<string, unknown>[]>([]);
|
||||||
let provinceFilter: (
|
let provinceFilter: (
|
||||||
value: string,
|
value: string,
|
||||||
|
|
@ -355,6 +363,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
$t('formDialogInputSubDistrictValidate'),
|
$t('formDialogInputSubDistrictValidate'),
|
||||||
]
|
]
|
||||||
"
|
"
|
||||||
|
@update:model-value="(v: string) => selectSubDistrict(v)"
|
||||||
@filter="subDistrictFilter"
|
@filter="subDistrictFilter"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue