From baf335908e9162a4e5b56f230f1d664d9ea862c2 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 11 Dec 2025 14:10:38 +0800 Subject: [PATCH] perf: Optimize parameter setting interaction --- frontend/src/views/system/parameter/index.vue | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/system/parameter/index.vue b/frontend/src/views/system/parameter/index.vue index dd87dacc..ab9bf5c1 100644 --- a/frontend/src/views/system/parameter/index.vue +++ b/frontend/src/views/system/parameter/index.vue @@ -30,6 +30,24 @@ const loadData = () => { } }) } + +const beforeChange = (): Promise => { + return new Promise((resolve) => { + if (!state.parameterForm['chat.rows_of_data']) { + return resolve(true) + } + ElMessageBox.confirm(t('parameter.excessive_data_volume'), t('parameter.prompt'), { + confirmButtonType: 'primary', + confirmButtonText: t('common.confirm2'), + cancelButtonText: t('common.cancel'), + customClass: 'confirm-no_icon confirm_no_icon_parameter', + autofocus: false, + callback: (action: any) => { + resolve(action && action === 'confirm') + }, + }) + }) +} const buildParam = () => { const changedItemArray = Object.keys(state.parameterForm).map((key: string) => { return { @@ -99,7 +117,10 @@ onMounted(() => {
- +
@@ -111,7 +132,18 @@ onMounted(() => { - +