@@ -224,6 +224,11 @@ const saveHandler = () => {
224224 if (obj .id === ' ' || obj .id === null ) {
225225 delete obj .id
226226 }
227+
228+ if (obj .var_type === ' text' ) {
229+ obj .value = [... new Set (obj .value )]
230+ }
231+
227232 variablesApi .save (obj ).then (() => {
228233 ElMessage ({
229234 type: ' success' ,
@@ -244,7 +249,7 @@ const editHandler = (row: any) => {
244249 pageForm .value .id = id
245250 pageForm .value .name = name
246251 pageForm .value .var_type = var_type
247- pageForm .value .value = value
252+ pageForm .value .value = cloneDeep ( value )
248253 }
249254 dialogTitle .value = row ?.id ? t (' variables.edit_variable' ) : t (' variables.add_variable' )
250255 dialogFormVisible .value = true
@@ -513,20 +518,18 @@ const handleCurrentChange = (val: number) => {
513518 <el-form-item v-else prop =" value" :label =" t('variables.variable_value')" >
514519 <div class =" value-number_date" >
515520 <template v-if =" pageForm .var_type === ' number' " >
516- <el-input
521+ <el-input-number
517522 v-model.number =" pageForm.value[0]"
518523 :placeholder =" $t('variables.please_enter_value')"
519- autocomplete =" off"
520- maxlength =" 50"
521524 clearable
525+ controls-position =" right"
522526 />
523527 <span class =" ed-range-separator separator" ></span >
524- <el-input
528+ <el-input-number
525529 v-model.number =" pageForm.value[1]"
526530 :placeholder =" $t('variables.please_enter_value')"
527- autocomplete =" off"
528- maxlength =" 50"
529531 clearable
532+ controls-position =" right"
530533 />
531534 </template >
532535 <template v-else >
@@ -770,6 +773,11 @@ const handleCurrentChange = (val: number) => {
770773 display : flex ;
771774 align-items : center ;
772775 justify-content : space-between ;
776+
777+ .ed-input-number {
778+ width : 100% ;
779+ }
780+
773781 .ed-range-separator ::after {
774782 content : ' ' ;
775783 height : 1px ;
0 commit comments