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) => {