bug fixed

This commit is contained in:
cxc
2022-11-25 17:30:10 +08:00
parent 69d6c487ac
commit a7a8f21d11
33 changed files with 1700 additions and 558 deletions

View File

@ -158,19 +158,41 @@ const validateForm = async () => {
};
getProvinceList();
watch(
modelValue,
() => modelValue.value.province,
(val) => {
if (val.province) {
getCityListByProvinceId(val.province);
}
if (val.city) {
getAreaListByCityId(val.city);
}
console.log("changed province");
val && getCityListByProvinceId(val);
},
{ deep: true }
{
immediate: true,
}
);
watch(
() => modelValue.value.city,
(val) => {
console.log("changed city");
val && getAreaListByCityId(val);
},
{
immediate: true,
}
);
// watch(
// modelValue,
// (val) => {
// if (val.province) {
// getCityListByProvinceId(val.province);
// }
// if (val.city) {
// getAreaListByCityId(val.city);
// }
// },
// { deep: true }
// );
defineExpose({
validateForm,
});