refactor: 代码生成预览优化
parent
85a8fd5834
commit
09bf99b84c
|
@ -80,7 +80,13 @@ const handleNodeClick = (_: any[], e: any) => {
|
||||||
if (!e.node.isLeaf) return;
|
if (!e.node.isLeaf) return;
|
||||||
|
|
||||||
activeKey.value = e.node.key;
|
activeKey.value = e.node.key;
|
||||||
const file = previewFiles.value.find((item) => item.filePath === activeKey.value);
|
const file = previewFiles.value.find((item) => {
|
||||||
|
// 特殊处理
|
||||||
|
if (activeKey.value.includes('手动操作')) {
|
||||||
|
return item.filePath.includes('手动操作');
|
||||||
|
}
|
||||||
|
return item.filePath === activeKey.value;
|
||||||
|
});
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
const lang = file.filePath.split('.').pop() || '';
|
const lang = file.filePath.split('.').pop() || '';
|
||||||
|
|
Loading…
Reference in New Issue