epic-designer-gold
Version:
基于vue3的设计器,可视化开发页面表单
2,362 lines (2,361 loc) • 71 kB
JavaScript
import { pluginManager as i } from "epic-designer-gold";
import c from "dayjs";
import { version as s } from "ant-design-vue";
const d = {
component: async () => (await import("ant-design-vue")).Input,
groupName: "表单",
icon: "icon--epic--border-color-outline-rounded",
sort: 700,
defaultSchema: {
label: "输入框",
type: "input",
field: "input",
input: !0,
componentProps: {
placeholder: "请输入"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "默认值",
type: "input",
field: "componentProps.defaultValue",
componentProps: {
placeholder: "请输入"
}
},
{
label: "输入类型",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "text",
value: "text"
},
{
label: "number",
value: "number"
},
{
label: "password",
value: "password"
}
]
},
field: "componentProps.type"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "最大输入长度",
type: "number",
field: "componentProps.maxlength",
componentProps: {
placeholder: "请输入"
}
},
{
label: "展示字数",
type: "switch",
field: "componentProps.showCount"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "input",
describe: "输入值时"
},
{
type: "change",
describe: "值修改时"
},
{
type: "pressEnter",
describe: "按下回车时"
},
{
type: "focus",
describe: "获取焦点时"
},
{
type: "blur",
describe: "失去焦点时"
}
],
action: [
{
type: "focus",
describe: "使输入框获取焦点"
},
{
type: "blur",
describe: "使输入框失去焦点"
},
{
type: "select",
describe: "选中输入框中的文字"
}
]
},
bindModel: "value"
}, m = {
component: async () => (await import("ant-design-vue")).Textarea,
groupName: "表单",
icon: "icon--epic--edit-square-outline-rounded",
sort: 705,
defaultSchema: {
label: "文本域",
type: "textarea",
field: "textarea",
input: !0,
componentProps: {
placeholder: "请输入"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "textarea",
field: "componentProps.defaultValue",
componentProps: {
placeholder: "请输入"
}
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "最小行数",
type: "number",
field: "componentProps.autoSize.minRows",
componentProps: {
placeholder: "请输入"
}
},
{
label: "最大行数",
type: "number",
field: "componentProps.autoSize.maxRows",
componentProps: {
placeholder: "请输入"
}
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "最大输入长度",
type: "number",
field: "componentProps.maxLength",
componentProps: {
placeholder: "请输入"
}
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "统计字数",
type: "switch",
field: "componentProps.showCount"
},
{
label: "可清除",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "input",
describe: "输入值"
},
{
type: "change",
describe: "值修改"
},
{
type: "pressEnter",
describe: "按下回车的回调"
},
{
type: "focus",
describe: "获取焦点"
},
{
type: "blur",
describe: "失去焦点"
}
],
action: [
{
type: "focus",
describe: "使 input 获取焦点"
},
{
type: "blur",
describe: "使 input 失去焦点"
},
{
type: "select",
describe: "选中 input 中的文字"
}
]
},
bindModel: "value"
}, b = {
component: async () => (await import("ant-design-vue")).InputNumber,
groupName: "表单",
icon: "icon--epic--123-rounded",
sort: 710,
defaultSchema: {
label: "数字输入框",
type: "number",
field: "number",
input: !0,
componentProps: {
style: { width: "100%" },
placeholder: "请输入"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "number",
field: "componentProps.defaultValue",
componentProps: {
placeholder: "请输入",
size: "middle"
}
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "键盘快捷行为",
type: "switch",
field: "componentProps.keyboard"
},
{
label: "最大值",
type: "number",
field: "componentProps.max",
componentProps: {
placeholder: "请输入"
}
},
{
label: "最小值",
type: "number",
field: "componentProps.min",
componentProps: {
placeholder: "请输入"
}
},
{
label: "精度",
type: "number",
field: "componentProps.precision",
componentProps: {
placeholder: "请输入"
}
},
{
label: "步长",
type: "number",
field: "componentProps.step",
componentProps: {
placeholder: "请输入"
}
},
{
label: "字符模式",
type: "switch",
field: "componentProps.stringMode"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "number"
}
}
],
event: [
{
type: "input",
describe: "输入值"
},
{
type: "change",
describe: "值修改"
},
{
type: "pressEnter",
describe: "按下回车的回调"
},
{
type: "focus",
describe: "获取焦点"
},
{
type: "blur",
describe: "失去焦点"
}
],
action: [
{
type: "focus",
describe: "使 input 获取焦点"
},
{
type: "blur",
describe: "使 input 失去焦点"
},
{
type: "select",
describe: "选中 input 中的文字"
}
]
},
bindModel: "value"
}, u = {
component: async () => (await import("ant-design-vue")).InputPassword,
groupName: "表单",
icon: "icon--epic--lock-outline",
sort: 720,
defaultSchema: {
label: "密码输入框",
type: "password",
field: "password",
input: !0,
componentProps: {
placeholder: "请输入"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "最大输入长度",
type: "number",
field: "componentProps.maxLength",
componentProps: {
placeholder: "请输入"
}
},
{
label: "统计字数",
type: "switch",
field: "componentProps.showCount"
},
{
label: "密码可见",
type: "switch",
field: "componentProps.visible"
},
{
label: "隐藏切换按钮",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.visibilityToggle"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "input",
describe: "输入值"
},
{
type: "change",
describe: "值修改"
},
{
type: "pressEnter",
describe: "按下回车的回调"
},
{
type: "focus",
describe: "获取焦点"
},
{
type: "blur",
describe: "失去焦点"
}
],
action: [
{
type: "focus",
describe: "使 input 获取焦点"
},
{
type: "blur",
describe: "使 input 失去焦点"
},
{
type: "select",
describe: "选中 input 中的文字"
}
]
},
bindModel: "value"
}, h = {
component: async () => (await import("ant-design-vue")).RadioGroup,
groupName: "表单",
icon: "icon--epic--radio-button-checked-outline",
sort: 850,
defaultSchema: {
label: "单选框",
type: "radio",
field: "radio",
input: !0,
componentProps: {
options: [
{
label: "选项1",
value: "选项1"
},
{
label: "选项2",
value: "选项2"
}
]
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "radio",
field: "componentProps.defaultValue"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "按钮样式",
type: "switch",
componentProps: {
checkedValue: "button",
unCheckedValue: "default"
},
field: "componentProps.optionType"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "选项管理",
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "change",
describe: "值变化时"
}
]
},
bindModel: "value"
}, f = {
component: async () => (await import("ant-design-vue")).CheckboxGroup,
groupName: "表单",
icon: "icon--epic--dialogs-outline-rounded",
sort: 860,
defaultSchema: {
label: "多选框",
type: "checkbox",
field: "checkbox",
input: !0,
componentProps: {
options: [
{
label: "选项1",
value: "选项1"
},
{
label: "选项2",
value: "选项2"
}
]
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "checkbox",
field: "componentProps.defaultValue"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "选项管理",
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "array"
}
}
],
event: [
{
type: "change",
describe: "值变化时"
}
]
},
bindModel: "value"
}, y = {
component: async () => (await import("ant-design-vue")).Select,
groupName: "表单",
icon: "icon--epic--select",
sort: 900,
defaultSchema: {
label: "选择框",
type: "select",
field: "select",
input: !0,
componentProps: {
options: [
{
label: "选项1",
value: "选项1"
},
{
label: "选项2",
value: "选项2"
}
],
placeholder: "请选择"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder",
componentProps: {
placeholder: "请输入"
}
},
{
label: "默认值",
type: "select",
field: "componentProps.defaultValue"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "弹窗高度",
type: "number",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.listHeight"
},
{
label: "模式",
type: "select",
componentProps: {
options: [
{
label: "multiple",
value: "multiple"
},
{
label: "tags",
value: "tags"
},
{
label: "combobox",
value: "combobox"
}
],
placeholder: "请选择",
allowClear: !0
},
field: "componentProps.mode"
},
{
label: "可搜索",
type: "switch",
field: "componentProps.showSearch"
},
{
label: "选中选项后清空搜索框",
type: "switch",
field: "componentProps.autoClearSearchValue",
show: ({ values: l }) => l.componentProps.mode && l.componentProps.showSearch
},
{
label: "最大tag文本长度",
type: "number",
field: "componentProps.maxTagTextLength",
show: ({ values: l }) => l.componentProps.mode
},
{
label: "最大tag显示数",
type: "number",
field: "componentProps.maxTagCount",
show: ({ values: l }) => l.componentProps.mode
},
{
label: "弹出框位置",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "bottomLeft",
value: "bottomLeft"
},
{
label: "bottomRight",
value: "bottomRight"
},
{
label: "topLeft",
value: "topLeft"
},
{
label: "topRight",
value: "topRight"
}
]
},
field: "componentProps.placement"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "labelInValue",
type: "switch",
field: "componentProps.labelInValue"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "选项管理",
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "change",
describe: "值修改"
},
{
type: "focus",
describe: "获取焦点"
},
{
type: "blur",
describe: "失去焦点"
}
],
action: [
{
type: "focus",
describe: "使 input 获取焦点"
},
{
type: "blur",
describe: "使 input 失去焦点"
},
{
type: "select",
describe: "选中 input 中的文字"
}
]
},
bindModel: "value"
}, P = {
component: async () => (await import("ant-design-vue")).Slider,
groupName: "表单",
icon: "icon--epic--switches",
sort: 930,
defaultSchema: {
label: "滑块",
type: "slider",
field: "slider",
input: !0
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "slider",
componentProps: {
style: {
width: "100%"
}
},
field: "componentProps.defaultValue"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "范围选择",
type: "switch",
field: "componentProps.range",
changeSync: !0,
onChange: ({ value: l, values: e }) => {
l ? e.componentProps.defaultValue = [0, 100] : e.componentProps.defaultValue = 0;
}
},
{
label: "倒转轨道",
type: "switch",
field: "componentProps.reverse"
},
{
label: "步长",
type: "number",
field: "componentProps.step",
componentProps: {
placeholder: "请输入"
}
},
{
label: "最小值",
type: "number",
field: "componentProps.min",
componentProps: {
placeholder: "请输入"
}
},
{
label: "最大值",
type: "number",
field: "componentProps.max",
componentProps: {
placeholder: "请输入"
}
},
{
label: "垂直模式",
type: "switch",
field: "componentProps.vertical"
},
{
label: "显示刻度",
type: "switch",
field: "componentProps.dots"
},
// {
// label: "持续显示提示",
// type: "switch",
// field: "componentProps.tooltipOpen",
// },
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "number"
}
}
],
event: [
{
type: "afterChange",
describe: "与mouseup触发时机一致"
},
{
type: "change",
describe: "拖拽结束改变值时"
}
]
},
bindModel: "value"
}, w = {
component: async () => (await import("ant-design-vue")).TimePicker,
groupName: "表单",
icon: "icon--epic--time-line",
sort: 920,
defaultSchema: {
label: "时间选择器",
type: "time",
field: "time",
input: !0,
componentProps: {
valueFormat: "HH:mm:ss",
format: "HH:mm:ss",
placeholder: "请输入"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "time",
field: "componentProps.defaultValue"
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "显示格式",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.format"
},
{
label: "数据格式",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.valueFormat"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "小时选项间隔",
type: "number",
field: "componentProps.hourStep",
componentProps: {
placeholder: "请输入"
}
},
{
label: "分钟选项间隔",
type: "number",
field: "componentProps.minuteStep",
componentProps: {
placeholder: "请输入"
}
},
{
label: "秒选项间隔",
type: "number",
field: "componentProps.secondStep",
componentProps: {
placeholder: "请输入"
}
},
{
label: "弹出框位置",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "bottomLeft",
value: "bottomLeft"
},
{
label: "bottomRight",
value: "bottomRight"
},
{
label: "topLeft",
value: "topLeft"
},
{
label: "topRight",
value: "topRight"
}
]
},
field: "componentProps.placement"
},
{
label: "12小时制",
type: "switch",
field: "componentProps.use12Hours",
changeSync: !0,
onChange({ values: l, value: e }) {
l.componentProps.defaultValue = null, e ? (l.componentProps.format = "h:mm:ss a", l.componentProps.valueFormat = "h:mm:ss a") : (l.componentProps.format = "HH:mm:ss", l.componentProps.valueFormat = "HH:mm:ss");
}
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "禁止键盘输入",
type: "switch",
field: "componentProps.inputReadOnly"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "change",
describe: "值变化时"
}
]
},
bindModel: "value"
}, v = {
component: () => import("../../datePicker-2Df6yfYg.js"),
groupName: "表单",
icon: "icon--epic--calendar-month-outline-rounded",
sort: 910,
defaultSchema: {
label: "日期选择器",
type: "date",
field: "date",
input: !0,
componentProps: {
valueFormat: "YYYY-MM-DD",
format: "YYYY-MM-DD",
type: "date",
placeholder: "请选择"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "label"
},
{
label: "默认值",
type: "date",
field: "componentProps.defaultValue"
},
{
label: "日期类型",
type: "select",
field: "componentProps.type",
componentProps: {
options: [
{
label: "日期",
value: "date"
},
{
label: "周",
value: "week"
},
{
label: "月份",
value: "month"
},
{
label: "季度",
value: "quarter"
},
{
label: "年份",
value: "year"
},
{
label: "日期范围",
value: "daterange"
},
{
label: "周范围",
value: "weekrange"
},
{
label: "月份范围",
value: "monthrange"
},
{
label: "季度范围",
value: "quarterrange"
},
{
label: "年份范围",
value: "yearrange"
}
]
},
changeSync: !0,
onChange({ values: l, value: e }) {
l.componentProps.defaultValue = null, [
"daterange",
"weekrange",
"monthrange",
"yearrange",
"quarterrange"
].includes(e) ? l.componentProps.placeholder = ["请输入", "请输入"] : l.componentProps.placeholder = "请输入", ["date", "daterange"].includes(e) ? (l.componentProps.format = "YYYY-MM-DD", l.componentProps.valueFormat = "YYYY-MM-DD") : ["week", "weekrange"].includes(e) ? (l.componentProps.format = "ww [周]", l.componentProps.valueFormat = "YYYY-MM-DD") : ["month", "monthrange"].includes(e) ? (l.componentProps.format = "YYYY-MM", l.componentProps.valueFormat = "YYYY-MM") : ["quarter", "quarterrange"].includes(e) ? (l.componentProps.format = "YYYY-Q季度", l.componentProps.valueFormat = "YYYY-Q季度") : ["year", '"yearrange"'].includes(e) && (l.componentProps.format = "YYYY", l.componentProps.valueFormat = "YYYY");
}
},
{
label: "增加时间选择",
type: "switch",
field: "componentProps.showTime",
onChange: ({ value: l, values: e }) => {
l ? (e.componentProps.valueFormat = "YYYY-MM-DD HH:mm:ss", e.componentProps.format = "YYYY-MM-DD HH:mm:ss") : (e.componentProps.valueFormat = "YYYY-MM-DD", e.componentProps.format = "YYYY-MM-DD");
},
show({ values: l }) {
return ["date", "daterange"].includes(l.componentProps.type);
}
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder",
componentProps: {
placeholder: "请输入"
},
show: ({ values: l }) => ![
"daterange",
"weekrange",
"monthrange",
"yearrange",
"quarterrange"
].includes(l.componentProps.type)
},
{
label: "开始占位符",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.placeholder.0",
show: ({ values: l }) => [
"daterange",
"weekrange",
"monthrange",
"yearrange",
"quarterrange"
].includes(l.componentProps.type)
},
{
label: "结束占位符",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.placeholder.1",
show: ({ values: l }) => [
"daterange",
"weekrange",
"monthrange",
"yearrange",
"quarterrange"
].includes(l.componentProps.type)
},
{
label: "显示格式",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.format"
},
{
label: "数据格式",
type: "input",
componentProps: {
placeholder: "请输入"
},
field: "componentProps.valueFormat"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "弹出框位置",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "bottomLeft",
value: "bottomLeft"
},
{
label: "bottomRight",
value: "bottomRight"
},
{
label: "topLeft",
value: "topLeft"
},
{
label: "topRight",
value: "topRight"
}
]
},
field: "componentProps.placement"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "禁止键盘输入",
type: "switch",
field: "componentProps.inputReadOnly"
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用"
}
],
event: [
{
type: "change",
describe: "值变化时"
},
{
type: "ok",
describe: "点击确定按钮时"
}
]
},
bindModel: "modelValue"
}, g = {
component: async () => (await import("ant-design-vue")).Cascader,
groupName: "表单",
icon: "icon--epic--full-coverage-outline",
sort: 900,
defaultSchema: {
label: "级联选择器",
type: "cascader",
field: "cascader",
input: !0,
componentProps: {
options: [
{
label: "选项1",
value: "选项1"
},
{
label: "选项2",
value: "选项2"
}
],
placeholder: "请选择"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "cascader",
field: "componentProps.defaultValue"
},
{
label: "占位内容",
type: "input",
field: "componentProps.placeholder"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "middle"
},
{
label: "小型",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "弹出框位置",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "bottomLeft",
value: "bottomLeft"
},
{
label: "bottomRight",
value: "bottomRight"
},
{
label: "topLeft",
value: "topLeft"
},
{
label: "topRight",
value: "topRight"
}
]
},
field: "componentProps.placement"
},
{
label: "可搜索",
type: "switch",
field: "componentProps.showSearch"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "多选",
type: "switch",
field: "componentProps.multiple"
},
{
label: "标签最大长度",
type: "number",
field: "componentProps.maxTagTextLength",
componentProps: {
placeholder: "请输入"
},
show: ({ values: l }) => l.componentProps.multiple
},
{
label: "标签显示数量",
type: "number",
field: "componentProps.maxTagCount",
componentProps: {
placeholder: "请输入"
},
show: ({ values: l }) => l.componentProps.multiple
},
{
label: "回填方式",
type: "select",
componentProps: {
placeholder: "请选择",
clearable: !0,
options: [
{
label: "SHOW_PARENT",
value: "SHOW_PARENT"
},
{
label: "SHOW_CHILD",
value: "SHOW_CHILD"
}
]
},
field: "componentProps.showCheckedStrategy",
show: ({ values: l }) => l.componentProps.multiple
},
{
label: "可清空",
type: "switch",
field: "componentProps.allowClear"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "选项管理",
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options",
componentProps: {
tree: !0
}
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "array"
}
}
],
event: [
{
type: "change",
describe: "值变化时"
}
]
},
bindModel: "value"
}, k = {
component: async () => (await import("ant-design-vue")).Switch,
groupName: "表单",
icon: "icon--epic--toggle-off-outline",
sort: 930,
defaultSchema: {
label: "开关",
type: "switch",
field: "switch",
input: !0,
componentProps: {
defaultValue: !1
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "默认值",
type: "switch",
field: "componentProps.defaultValue"
},
{
label: "ON状态值",
type: "input",
field: "componentProps.checkedValue",
componentProps: {
placeholder: "请输入"
},
onChange(l) {
setTimeout(() => r(l));
}
},
{
label: "OFF状态值",
type: "input",
field: "componentProps.unCheckedValue",
componentProps: {
placeholder: "请输入"
},
onChange(l) {
setTimeout(() => r(l));
}
},
{
label: "ON状态描述",
type: "input",
field: "componentProps.checkedChildren",
componentProps: {
placeholder: "请输入"
}
},
{
label: "OFF状态描述",
type: "input",
field: "componentProps.unCheckedChildren",
componentProps: {
placeholder: "请输入"
}
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "default",
value: "default"
},
{
label: "small",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "boolean"
}
}
],
event: [
{
type: "change",
describe: "值变化时"
}
]
},
bindModel: "checked"
};
function r(l) {
var t;
let e = ((t = l.values.componentProps) == null ? void 0 : t.unCheckedValue) || !1;
l.values.componentProps.unCheckedValue === "" && delete l.values.componentProps.unCheckedValue, l.values.componentProps.checkedValue === "" && delete l.values.componentProps.checkedValue, l.values.componentProps ? l.values.componentProps.defaultValue = e : l.values.componentProps = {
defaultValue: e
};
}
const C = {
component: () => import("../../uploadImage-9ntXvO0G.js"),
groupName: "表单",
icon: "icon--epic--imagesmode-outline-rounded",
sort: 920,
defaultSchema: {
label: "上传图片",
type: "upload-image",
field: "uploadImage",
input: !0,
componentProps: {
action: "https://ess-ds.com/prod-api/center-file/file/upload"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "请求地址",
type: "input",
field: "componentProps.action"
},
{
label: "多选",
type: "switch",
field: "componentProps.multiple"
},
{
label: "允许上传最大数量",
type: "number",
field: "componentProps.maxCount",
componentProps: {
min: 0,
placeholder: "请输入"
}
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "array"
}
}
]
},
bindModel: "modelValue"
}, V = {
component: () => import("../../uploadFile-C3HY1r-N.js"),
groupName: "表单",
icon: "icon--epic--upload-rounded",
sort: 920,
defaultSchema: {
label: "上传文件",
type: "upload-file",
field: "uploadFile",
input: !0,
componentProps: {
action: "https://ess-ds.com/prod-api/center-file/file/upload"
}
},
config: {
attribute: [
{
label: "字段名",
type: "input",
field: "field"
},
{
label: "标题",
type: "input",
field: "label"
},
{
label: "请求地址",
type: "input",
field: "componentProps.action"
},
{
label: "列表样式",
type: "select",
field: "componentProps.listType",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "text",
value: "text"
},
{
label: "picture",
value: "picture"
}
]
}
},
{
label: "多选",
type: "switch",
field: "componentProps.multiple"
},
{
label: "允许上传最大数量",
type: "number",
field: "componentProps.maxCount",
componentProps: {
min: 0,
placeholder: "请输入"
}
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
},
{
label: "表单校验",
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: "校验规则需要配合表单使用",
componentProps: {
ruleType: "array"
}
}
]
},
bindModel: "modelValue"
}, Y = {
component: () => import("../../card-BQ_K3Q8i.js"),
groupName: "布局",
icon: "icon--epic--wysiwyg-rounded",
sort: 700,
defaultSchema: {
label: "卡片布局",
type: "card",
children: []
},
config: {
attribute: [
{
label: "标题",
type: "input",
field: "label"
},
{
label: "尺寸",
type: "select",
componentProps: {
placeholder: "请选择",
allowClear: !0,
options: [
{
label: "default",
value: "default"
},
{
label: "small",
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: "无边框",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.bordered"
},
{
label: "鼠标悬停阴影",
type: "switch",
field: "componentProps.hoverable"
},
{
label: "加载状态",
type: "switch",
field: "componentProps.loading"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
}
]
}
}, x = {
component: () => import("../../row-BX4lrSir.js"),
groupName: "布局",
icon: "icon--epic--width-normal-outline",
sort: 800,
defaultSchema: {
label: "栅格布局",
type: "row",
children: [
{
type: "col",
children: [],
componentProps: {
span: 12
}
},
{
type: "col",
children: [],
componentProps: {
span: 12
}
}
]
},
editConstraints: {
childImmovable: !0
},
config: {
attribute: [
{
label: "垂直对齐方式",
type: "select",
componentProps: {
style: { width: "100%" },
options: [
{
label: "top",
value: "top"
},
{
label: "middle",
value: "middle"
},
{
label: "bottom",
value: "bottom"
}
],
placeholder: "请选择"
},
field: "componentProps.align"
},
{
label: "水平排列方式",
type: "select",
componentProps: {
style: { width: "100%" },
options: [
{
label: "start",
value: "start"
},
{
label: "end",
value: "end"
},
{
label: "center",
value: "center"
},
{
label: "space-around",
value: "space-around"
},
{
label: "space-between",
value: "space-between"
}
],
placeholder: "请选择"
},
field: "componentProps.justify"
},
{
label: "栅格间距",
type: "input",
field: "componentProps.gutter",
componentProps: {
placeholder: "请输入"
}
},
{
label: "列编辑",
type: "EColEditor",
field: "children"
},
{
label: "不自动换行",
type: "switch",
componentProps: {
checkedValue: !1,
unCheckedValue: !0
},
field: "componentProps.wrap"
},
{
label: "隐藏",
type: "switch",
field: "componentProps.hidden"
}
]
}
}, E = {
component: () => import("../../col-C_cbW1SI.js"),
defaultSchema: {
label: "栅格布局-列",
type: "col",
children: [],
componentProps: {
span: 6
}
},
config: {
attribute: [
{
label: "占位格数",
type: "number",
field: "componentProps.span"
}
]
}
}, p = {
component: () => import("../../form-BPH0cDFl.js"),
groupName: "表单",
icon: "icon--epic--list-alt-outline-rounded",
sort: 600,
defaultSchema: {
label: "表单",
type: "form",
componentProps: {
name: "default",