表单 switch 开启值 关闭值
This commit is contained in:
@ -16,7 +16,7 @@ import {
|
|||||||
ElInputNumber,
|
ElInputNumber,
|
||||||
ElCheckboxGroup,
|
ElCheckboxGroup,
|
||||||
} from "element-plus";
|
} from "element-plus";
|
||||||
// import Editor from "@/components/Editor";
|
import Editor from "@/components/Editor";
|
||||||
import { h, defineComponent } from "vue";
|
import { h, defineComponent } from "vue";
|
||||||
|
|
||||||
const formComponentsMap = {
|
const formComponentsMap = {
|
||||||
@ -35,7 +35,7 @@ const formComponentsMap = {
|
|||||||
"el-input-number": ElInputNumber,
|
"el-input-number": ElInputNumber,
|
||||||
"el-color-picker": ElColorPicker,
|
"el-color-picker": ElColorPicker,
|
||||||
"el-checkbox-group": ElCheckboxGroup,
|
"el-checkbox-group": ElCheckboxGroup,
|
||||||
// editor: Editor,
|
editor: Editor,
|
||||||
};
|
};
|
||||||
|
|
||||||
const componentChild = {};
|
const componentChild = {};
|
||||||
|
@ -1174,9 +1174,9 @@ const onDefaultValueInput = (str) => {
|
|||||||
};
|
};
|
||||||
const onSwitchValueInput = (val, name) => {
|
const onSwitchValueInput = (val, name) => {
|
||||||
if (["true", "false"].indexOf(val) > -1) {
|
if (["true", "false"].indexOf(val) > -1) {
|
||||||
activeData.value.name = JSON.parse(val);
|
activeData.value[name] = JSON.parse(val);
|
||||||
} else {
|
} else {
|
||||||
activeData.value.name = isNumberStr(val) ? +val : val;
|
activeData.value[name] = isNumberStr(val) ? +val : val;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const setTimeValue = (val, type) => {
|
const setTimeValue = (val, type) => {
|
||||||
|
Reference in New Issue
Block a user