refactor: 代码生成预览文件节点点击事件特殊处理

pull/75/head
puhui999 2025-04-16 18:05:24 +08:00
parent ab67eb049e
commit 9f18215c36
1 changed files with 5 additions and 3 deletions

View File

@ -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;
});