From dbf397113413236e4c3c4927e703e99167fc4f7b Mon Sep 17 00:00:00 2001 From: xintaofei Date: Fri, 20 Mar 2026 23:16:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=E4=B8=80=E7=9B=B4=E6=8C=89=E6=92=A4?= =?UTF-8?q?=E9=94=80=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=96=87=E4=BB=B6=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=8F=98=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/files/file-workspace-panel.tsx | 70 ++++++++++--------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/src/components/files/file-workspace-panel.tsx b/src/components/files/file-workspace-panel.tsx index c69db6e..ca14b33 100644 --- a/src/components/files/file-workspace-panel.tsx +++ b/src/components/files/file-workspace-panel.tsx @@ -1563,38 +1563,44 @@ export function FileWorkspacePanel() { )}
- { - if (!isFileTab) return - updateActiveFileContent(value ?? "") - }} - language={activeFileTab.language} - theme={editorTheme} - loading={ -
- {t("loadingEditor")} -
- } - options={{ - readOnly: !canEdit, - minimap: { enabled: false }, - automaticLayout: true, - fontSize: 13, - lineNumbersMinChars, - lineDecorationsWidth: 10, - wordWrap: "off", - scrollBeyondLastLine: false, - scrollBeyondLastColumn: 8, - renderLineHighlight: "line", - scrollbar: { - horizontal: "auto", - }, - }} - /> + {activeFileTab.loading ? ( +
+ {t("loadingEditor")} +
+ ) : ( + { + if (!isFileTab) return + updateActiveFileContent(value ?? "") + }} + language={activeFileTab.language} + theme={editorTheme} + loading={ +
+ {t("loadingEditor")} +
+ } + options={{ + readOnly: !canEdit, + minimap: { enabled: false }, + automaticLayout: true, + fontSize: 13, + lineNumbersMinChars, + lineDecorationsWidth: 10, + wordWrap: "off", + scrollBeyondLastLine: false, + scrollBeyondLastColumn: 8, + renderLineHighlight: "line", + scrollbar: { + horizontal: "auto", + }, + }} + /> + )}