From 9f18215c36c7836f23f2d3fa7e826b643e62bb2b Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 16 Apr 2025 18:05:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=A2=84=E8=A7=88=E6=96=87=E4=BB=B6=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E7=89=B9=E6=AE=8A=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/infra/codegen/modules/preview-code.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web-antd/src/views/infra/codegen/modules/preview-code.vue b/apps/web-antd/src/views/infra/codegen/modules/preview-code.vue index edff700f3..d843b48be 100644 --- a/apps/web-antd/src/views/infra/codegen/modules/preview-code.vue +++ b/apps/web-antd/src/views/infra/codegen/modules/preview-code.vue @@ -81,9 +81,11 @@ const handleNodeClick = (_: any[], e: any) => { activeKey.value = e.node.key; const file = previewFiles.value.find((item) => { - // 特殊处理 - if (activeKey.value.includes('手动操作')) { - return item.filePath.includes('手动操作'); + const list = activeKey.value.split('.'); + // 特殊处理-包合并 + if (list.length > 2) { + const lang = list.pop(); + return item.filePath === `${list.join('/')}.${lang}`; } return item.filePath === activeKey.value; });