From 70e3547cd8bd7ac7dde574d6f20319c0a396030c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Fri, 23 Jan 2026 10:08:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(core):=20Mixly.FileTree=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=AD=90=E6=A0=91=E6=97=B6=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89text=E5=92=8Cicon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/modules/mixly-modules/common/file-tree.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/modules/mixly-modules/common/file-tree.js b/common/modules/mixly-modules/common/file-tree.js index 75dbf680..4ea1ca68 100644 --- a/common/modules/mixly-modules/common/file-tree.js +++ b/common/modules/mixly-modules/common/file-tree.js @@ -637,12 +637,14 @@ class FileTree extends Component { const content = await this.readFolder(inPath); for (let item of content) { const { type, id, title, children } = item; - const text = path.basename(id); - let icon = 'icon-doc'; - if (type === 'folder') { - icon = this.#getFolderIcon_(text); - } else { - icon = this.#getFileIcon_(text); + const text = item.text ?? path.basename(id); + let icon = item.icon ?? 'icon-doc'; + if (!item.icon) { + if (type === 'folder') { + icon = this.#getFolderIcon_(text); + } else { + icon = this.#getFileIcon_(text); + } } output.push({ text,