From 69b5b2b9005e4f7ad882bb0076df6b30a1c32637 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 5 Apr 2025 14:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20SearchSiteDialog.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dialog/SearchSiteDialog.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/dialog/SearchSiteDialog.vue b/src/components/dialog/SearchSiteDialog.vue index 10694459..43a2e7df 100644 --- a/src/components/dialog/SearchSiteDialog.vue +++ b/src/components/dialog/SearchSiteDialog.vue @@ -23,9 +23,9 @@ const siteFilter = ref('') // 已选择站点 const selectedSites = ref(props.selected || []) -watchEffect(() => { - if (selectedSites.value.length == 0 && props.selected) { - selectedSites.value = props.selected +watch(() => props.selected, value => { + if (selectedSites.value.length == 0 && value) { + selectedSites.value = value } })