File tree Expand file tree Collapse file tree
frontend/src/views/system/user Expand file tree Collapse file tree Original file line number Diff line number Diff line change 386386 < el - select
387387 v - model = "state.form.system_variables[index].variableId"
388388 style = "width: 236px"
389- @change =" handleVariableChange(index)"
390389 :placeholder = "$t('datasource.Please_select')"
390+ @change = "handleVariableChange(index)"
391391 >
392392 < el - option
393393 v - for = "item in variables"
@@ -691,7 +691,13 @@ const handleVariableChange = (index: number) => {
691691 state .form .system_variables [index ].variableValues = []
692692 const variable = variableValueMap .value [state .form .system_variables [index ].variableId ]
693693 if (variable & & variable .value .length == = 1 ) {
694- state .form .system_variables [index ].variableValues = [variable .value [0 ]]
694+ if (variable .var_type == = 'kv' ) {
695+ state .form .system_variables [index ].variableValues = [
696+ getVariableOptionList (state .form .system_variables [index ].variableId )[0 ].label ,
697+ ]
698+ } else {
699+ state .form .system_variables [index ].variableValues = [variable .value [0 ]]
700+ }
695701 }
696702}
697703
You can’t perform that action at this time.
0 commit comments