From f00da2d1f08bf62078b1945319a85d2a4d65ce14 Mon Sep 17 00:00:00 2001 From: ks3356143 <314298729@qq.com> Date: Sun, 31 Mar 2024 14:44:46 +0800 Subject: [PATCH] 123 --- cdTMP/src/layout/project-layout.vue | 7 ------- cdTMP/src/store/project/treeData.js | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cdTMP/src/layout/project-layout.vue b/cdTMP/src/layout/project-layout.vue index 9445c1e..8535457 100644 --- a/cdTMP/src/layout/project-layout.vue +++ b/cdTMP/src/layout/project-layout.vue @@ -177,13 +177,6 @@ provide("toggleDrawerMenu", () => { //~~~~ 搜索绑定与搜索按钮点击 const searchKey = ref("") const handleSearchTreeDataClick = () => { - if (!treeDataStore.originTreeData) { - return - } - if (searchKey.value.match(/^[ ]*$/)) { - treeData.value = treeDataStore.originTreeData - return - } const loop = (itemdata) => { const result = [] itemdata.forEach((item) => { diff --git a/cdTMP/src/store/project/treeData.js b/cdTMP/src/store/project/treeData.js index fea352d..fff57b1 100644 --- a/cdTMP/src/store/project/treeData.js +++ b/cdTMP/src/store/project/treeData.js @@ -16,6 +16,7 @@ const useTreeDataStore = defineStore("treeDataStore", { // 获取localStorage的treeData数据 if (localStorage.getItem("tree_local_data")) { this.treeData = JSON.parse(localStorage.getItem("tree_local_data")) + this.originTreeData = JSON.parse(localStorage.getItem("tree_local_data")) } if (this.treeData.length === 0) { const roundData = await projectApi.getRoundInfo(projectId)