优化所在区域数据加载有时不显示的问题

This commit is contained in:
Leo_Ding 2025-10-13 16:35:48 +08:00
parent aadd779cda
commit 7b65c5e27f

View File

@ -53,10 +53,19 @@ const emit = defineEmits(['change']);
// //
const options = ref([]); const options = ref([]);
onMounted(() => { watch(
// 使 store () => dicsStore.provinceOptions,
options.value = dicsStore.provinceOptions (newVal) => {
}); if (newVal && newVal.length > 0) {
options.value = newVal
}
},
{ immediate: true } // 🔥
)
// onMounted(async () => {
// // 使 store
// options.value = await dicsStore.provinceOptions
// });
// //