From 9c20301a5200d36417619b98867e0d090e17e8bd Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 21 Apr 2026 16:31:32 +0800 Subject: [PATCH] fix(web): prompt add loading --- .../ApplicationConfig/components/AiPromptModal.tsx | 10 +++++++--- web/src/views/Prompt/index.tsx | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/web/src/views/ApplicationConfig/components/AiPromptModal.tsx b/web/src/views/ApplicationConfig/components/AiPromptModal.tsx index 96a0c7b5..4c35f239 100644 --- a/web/src/views/ApplicationConfig/components/AiPromptModal.tsx +++ b/web/src/views/ApplicationConfig/components/AiPromptModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:26:44 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-04-21 14:50:21 + * @Last Modified time: 2026-04-21 16:29:40 */ /** * AI Prompt Assistant Modal @@ -295,8 +295,12 @@ const AiPromptModal = forwardRef(({ {values?.current_prompt ? form.setFieldValue('current_prompt', value)} + className="rb:h-[calc(100vh-278px)] rb:bg-white! rb:border-none! rb:p-0!" + disabled={loading} + onChange={(value) => { + if (loading) return + form.setFieldValue('current_prompt', value) + }} /> : } diff --git a/web/src/views/Prompt/index.tsx b/web/src/views/Prompt/index.tsx index 9d90ee4b..aedbdc46 100644 --- a/web/src/views/Prompt/index.tsx +++ b/web/src/views/Prompt/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:44:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-04-21 14:24:00 + * @Last Modified time: 2026-04-21 16:30:26 */ /** * Prompt Editor Component @@ -287,8 +287,12 @@ const Prompt: FC = () => { {values?.current_prompt ? form.setFieldValue('current_prompt', value)} + onChange={(value) => { + if (loading) return + form.setFieldValue('current_prompt', value) + }} /> : }