From 645e00054ff9f5b8c9d97f2329caecbe97e94647 Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 24 Sep 2024 14:43:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=A0=91=E6=A8=A1=E5=9D=97=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047056 --user=白奇 【接口场景】-重命名模块,不修改直接保存,提示已有此模块 https://www.tapd.cn/55049933/s/1584806 --- frontend/src/hooks/useSelect.ts | 2 -- .../views/api-test/scenario/components/scenarioModuleTree.vue | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/hooks/useSelect.ts b/frontend/src/hooks/useSelect.ts index 364dab045d..a8801e61a3 100644 --- a/frontend/src/hooks/useSelect.ts +++ b/frontend/src/hooks/useSelect.ts @@ -1,5 +1,3 @@ -import { computed, nextTick, onBeforeUnmount, onMounted, Ref, ref, watch } from 'vue'; - import { calculateMaxDepth } from '@/utils'; import type { CascaderOption, SelectOptionData } from '@arco-design/web-vue'; diff --git a/frontend/src/views/api-test/scenario/components/scenarioModuleTree.vue b/frontend/src/views/api-test/scenario/components/scenarioModuleTree.vue index 9498f770d3..cf63633bfd 100644 --- a/frontend/src/views/api-test/scenario/components/scenarioModuleTree.vue +++ b/frontend/src/views/api-test/scenario/components/scenarioModuleTree.vue @@ -108,7 +108,7 @@ :parent-id="nodeData.id" :node-id="nodeData.id" :field-config="{ field: renameFolderTitle }" - :all-names="(nodeData.parent? nodeData.parent.children || [] : folderTree).map((e: ModuleTreeNode) => e.name || '')" + :all-names="(nodeData.parent? nodeData.parent.children || [] : folderTree).filter((e:ModuleTreeNode) => e.id !== nodeData.id).map((e: ModuleTreeNode) => e.name || '')" :update-module-api="updateModule" @close="resetFocusNodeKey" @rename-finish="initModules"