From e81dde67e5baac123f1076db6c8656c8c6799b81 Mon Sep 17 00:00:00 2001 From: fusikai Date: Tue, 19 Aug 2025 13:54:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=87=E6=8D=A2=E5=BA=94?= =?UTF-8?q?=E7=94=A8=20=E2=86=92=20appName=20=E6=88=96=20env=20=E5=8F=98?= =?UTF-8?q?=E5=8C=96=20=E7=AB=8B=E5=8D=B3=E6=B8=85=E7=A9=BA=20configList?= =?UTF-8?q?=20=E5=B9=B6=E6=98=BE=E7=A4=BA=E5=8A=A0=E8=BD=BD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/app/components/Config/index.jsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/assets/src/pages/app/components/Config/index.jsx b/assets/src/pages/app/components/Config/index.jsx index b1eb32b81..e2fa0d2db 100644 --- a/assets/src/pages/app/components/Config/index.jsx +++ b/assets/src/pages/app/components/Config/index.jsx @@ -17,6 +17,15 @@ function ConfigEdit(props) { if (!appName) return; if (!env) return; + // 立即清空配置数据,避免显示旧数据 + props.dispatch({ + type: 'config/_apply', + payload: { + configList: [], + configListLoading: true, + }, + }); + // reset props.dispatch({ type: 'config/showEditorMaskLayer', @@ -29,6 +38,10 @@ function ConfigEdit(props) { payload: 'config-edit', }); + props.dispatch({ + type: 'config/clearCurrentConfig', + }); + // load config-file list props.dispatch({ type: 'config/loadConfigInfo', @@ -37,10 +50,6 @@ function ConfigEdit(props) { env, }, }); - - props.dispatch({ - type: 'config/clearCurrentConfig', - }); }, [appName, env]); useEffect(() => {