From 104d3e2c25238f3c4c2c8b05ad3606de2e9128cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 25 Sep 2025 18:50:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/components/propertyBox/graph.vue | 14 +++++++++++++- .../src/views/components/propertyBox/model.vue | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/components/propertyBox/graph.vue b/src/renderer/src/views/components/propertyBox/graph.vue index 7e22939..74fac0c 100644 --- a/src/renderer/src/views/components/propertyBox/graph.vue +++ b/src/renderer/src/views/components/propertyBox/graph.vue @@ -138,7 +138,19 @@ let observer: IntersectionObserver | null = null const treeRef: any = ref('') watch(modelName, (val) => { - treeRef.value!.filter(val) + if (treeRef.value && treeRef.value !== '') { + treeRef.value!.filter(val) + } +}) + +watch(isShowPup, (val) => { + if (!val) { + modelName.value = '' + activeTab.value = '0' + treeRef.value = '' + activeIndex.value = null + categories.value = [] + } }) const filterNode: any = (value, data) => { diff --git a/src/renderer/src/views/components/propertyBox/model.vue b/src/renderer/src/views/components/propertyBox/model.vue index a0173d7..1cf8e22 100644 --- a/src/renderer/src/views/components/propertyBox/model.vue +++ b/src/renderer/src/views/components/propertyBox/model.vue @@ -136,8 +136,22 @@ const loading = ref(false) let observer: IntersectionObserver | null = null const treeRef: any = ref('') + watch(modelName, (val) => { - treeRef.value!.filter(val) + if (treeRef.value && treeRef.value !== '') { + treeRef.value!.filter(val) + } +}) + +watch(isShowPup, (val) => { + if (!val) { + modelName.value = '' + activeTab.value = '0' + treeRef.value = '' + activeIndex.value = null + addType.value = '' + categories.value = [] + } }) const filterNode: any = (value, data) => {