From 26f2312b53a1ef8dac45c55fcee729c36b0cca3e Mon Sep 17 00:00:00 2001 From: wangxk Date: Tue, 25 Mar 2025 11:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=AE=A1=E7=90=86bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/special/document/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/views/special/document/index.vue b/web/src/views/special/document/index.vue index e92c365..aca6f23 100644 --- a/web/src/views/special/document/index.vue +++ b/web/src/views/special/document/index.vue @@ -89,11 +89,16 @@ function gettreedata() { getNodesTree(treeForm.value).then((res: any) => { treedata.value = res.data treeloading.value = false - pathid.value = treedata.value[0].id + if( treedata.value[0]){ + pathid.value = treedata.value[0].id nextTick(() => { treeRef.value?.setCurrentKey(pathid.value); }); getdata() + }else{ + tableData.value.length = 0 + } + }) } const pathid = ref()