From 4ad4e7f2918e7425cc70f2a9d073abed764b9971 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 12 Mar 2026 15:46:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(System=20Variables):=20Edit=20system=20vari?= =?UTF-8?q?ables=20-=20Add=20variable=20values=20=E2=80=8B=E2=80=8B-=20Clo?= =?UTF-8?q?se=20the=20editing=20window=20-=20Variable=20values=20=E2=80=8B?= =?UTF-8?q?=E2=80=8Bare=20saved.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/variables/index.vue | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/system/variables/index.vue b/frontend/src/views/system/variables/index.vue index 0d07684a..6f92b191 100644 --- a/frontend/src/views/system/variables/index.vue +++ b/frontend/src/views/system/variables/index.vue @@ -224,6 +224,11 @@ const saveHandler = () => { if (obj.id === '' || obj.id === null) { delete obj.id } + + if (obj.var_type === 'text') { + obj.value = [...new Set(obj.value)] + } + variablesApi.save(obj).then(() => { ElMessage({ type: 'success', @@ -244,7 +249,7 @@ const editHandler = (row: any) => { pageForm.value.id = id pageForm.value.name = name pageForm.value.var_type = var_type - pageForm.value.value = value + pageForm.value.value = cloneDeep(value) } dialogTitle.value = row?.id ? t('variables.edit_variable') : t('variables.add_variable') dialogFormVisible.value = true @@ -513,20 +518,18 @@ const handleCurrentChange = (val: number) => {