epic-designer-gold
Version:
基于vue3的设计器,可视化开发页面表单
2,191 lines • 94.5 kB
JavaScript
import { pluginManager as B } from "epic-designer-gold";
import { u as o } from "../../index-B1s67XDZ.js";
import { ElFormItem as M, ElForm as L, ElRadioGroup as q, ElRadioButton as O, ElTabs as U, ElTabPane as W, ElCollapse as $, ElCollapseItem as A, ElDrawer as H, ElDialog as K, ElTable as G, ElTableColumn as j } from "element-plus";
const { t: n } = o(), _ = {
component: async () => (await import("element-plus")).ElInput,
groupName: n("form"),
icon: "icon--epic--border-color-outline-rounded",
sort: 700,
defaultSchema: {
label: n("input"),
type: "input",
field: "input",
input: !0,
componentProps: {
placeholder: n("pleaseEnter"),
style: {
cursor: ""
}
}
},
config: {
attribute: [
{
label: n("fieldName"),
type: "input",
field: "field"
},
{
label: n("title"),
type: "input",
field: "label"
},
{
label: n("defaultValue"),
type: "input",
field: "componentProps.defaultValue"
},
{
label: n("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: n("size"),
type: "select",
defaultValue: "default",
componentProps: {
placeholder: n("pleaseSelect"),
clearable: !0,
options: [
{
label: n("large"),
value: "large"
},
{
label: n("medium"),
value: "default"
},
{
label: n("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: n("maxInputLength"),
type: "number",
field: "componentProps.maxlength",
componentProps: {
placeholder: n("pleaseEnter"),
min: 0
}
},
{
label: n("countWords"),
type: "switch",
field: "componentProps.showWordLimit",
show: ({ values: e }) => e.componentProps.maxlength
},
{
label: n("inputType"),
type: "select",
defaultValue: "text",
componentProps: {
placeholder: n("pleaseSelect"),
clearable: !0,
options: [
{
label: "text",
value: "text"
},
{
label: "number",
value: "number"
},
{
label: "password",
value: "password"
}
]
},
field: "componentProps.type"
},
{
label: n("showToggleIcon"),
type: "switch",
field: "componentProps.showPassword",
show: ({ values: e }) => e.componentProps.type === "password"
},
// {
// label: "只读",
// type: "switch",
// field: "componentProps.readonly",
// },
{
label: n("clearable"),
type: "switch",
field: "componentProps.clearable"
},
{
label: "超链接",
type: "switch",
field: "componentProps.isLink"
// onChange: ({ value, values, componentAttributes }) => {
// if (value) {
// values.componentProps.class = "is-link";
// values.onClick = (e) => {
// if (values.componentProps.readonly) {
// window.open(e.target.value, "blank");
// }
// };
// } else {
// values.componentProps.class = "";
// values.onClick = () => {};
// }
// },
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: n("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: n("validationRuleRequiresForm")
}
],
event: [
{
type: "input",
describe: n("onInput")
},
{
type: "change",
describe: n("onChange")
},
{
type: "focus",
describe: n("onFocus")
},
{
type: "blur",
describe: n("onBlur")
},
{
type: "clear",
describe: n("onClear")
},
{
type: "click",
describe: "点击时"
}
],
action: [
{
type: "focus",
describe: n("focusInput")
},
{
type: "blur",
describe: n("blurInput")
},
{
type: "clear",
describe: n("clearInput")
},
{
type: "select",
describe: n("selectInputText")
}
]
}
}, { t: p } = o(), J = {
component: async () => (await import("element-plus")).ElInput,
icon: "icon--epic--edit-square-outline-rounded",
groupName: p("form"),
sort: 705,
defaultSchema: {
label: p("textarea"),
type: "textarea",
field: "textarea",
input: !0,
componentProps: {
placeholder: p("pleaseEnter"),
type: "textarea"
}
},
config: {
attribute: [
{
label: p("fieldName"),
type: "input",
field: "field"
},
{
label: p("title"),
type: "input",
field: "label"
},
{
label: p("defaultValue"),
type: "textarea",
field: "componentProps.defaultValue"
},
{
label: p("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: p("size"),
type: "select",
componentProps: {
placeholder: p("pleaseSelect"),
clearable: !0,
options: [
{
label: p("large"),
value: "large"
},
{
label: p("medium"),
value: "default"
},
{
label: p("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: p("maxInputLength"),
type: "number",
field: "componentProps.maxlength",
componentProps: {
placeholder: p("pleaseEnter"),
min: 0
}
},
{
label: p("countWords"),
type: "switch",
field: "componentProps.showWordLimit",
show: ({ values: e }) => e.componentProps.maxlength
},
{
label: p("minRows"),
type: "number",
field: "componentProps.autosize.minRows",
componentProps: {
placeholder: p("pleaseEnter")
}
},
{
label: p("maxRows"),
type: "number",
field: "componentProps.autosize.maxRows",
componentProps: {
placeholder: p("pleaseEnter")
}
},
{
label: p("clearable"),
type: "switch",
field: "componentProps.clearable"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: p("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: p("validationRuleRequiresForm")
}
],
event: [
{
type: "input",
describe: p("inputValue")
},
{
type: "change",
describe: p("valueChange")
},
{
type: "focus",
describe: p("focus")
},
{
type: "blur",
describe: p("blur")
}
],
action: [
{
type: "focus",
describe: p("focusInput")
},
{
type: "blur",
describe: p("blurInput")
},
{
type: "clear",
describe: p("clearInput")
},
{
type: "select",
describe: p("selectInputText")
}
]
}
}, { t: V } = o(), Q = {
component: async () => await import("../../markdownEditorPreview-bqI8KYYC.js"),
groupName: V("form"),
icon: "icon--epic--file-word-line",
sort: 708,
defaultSchema: {
label: "Markdown编辑器",
type: "markdown-editor",
field: "markdownEditor",
input: !0,
componentProps: {
defaultValue: "",
placeholder: "输入 Markdown,支持标题、列表、引用和 ``` 代码块",
editorTitle: "Markdown 文档",
style: {
width: "100%"
},
minHeight: 320,
maxHeight: 680,
showToolbar: !0,
readonly: !1,
disabled: !1
}
},
config: {
attribute: [
{
label: V("fieldName"),
type: "input",
field: "field"
},
{
label: V("title"),
type: "input",
field: "label"
},
{
label: V("defaultValue"),
type: "textarea",
field: "componentProps.defaultValue"
},
{
label: V("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: "标题栏名称",
type: "input",
field: "componentProps.editorTitle"
},
{
label: "最小高度",
type: "number",
field: "componentProps.minHeight",
componentProps: {
placeholder: V("pleaseEnter"),
min: 240
}
},
{
label: "最大高度",
type: "number",
field: "componentProps.maxHeight",
componentProps: {
placeholder: V("pleaseEnter"),
min: 320
}
},
{
label: "显示工具栏",
type: "switch",
field: "componentProps.showToolbar"
},
{
label: "只读",
type: "switch",
field: "componentProps.readonly"
},
{
label: "禁用",
type: "switch",
field: "componentProps.disabled"
},
{
label: V("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: V("validationRuleRequiresForm")
}
],
event: [
{
type: "input",
describe: "输入时触发"
},
{
type: "change",
describe: "内容变更并失焦时触发"
},
{
type: "focus",
describe: "获取焦点时触发"
},
{
type: "blur",
describe: "失去焦点时触发"
}
],
action: [
{
type: "focus",
describe: "聚焦编辑器"
},
{
type: "insertText",
describe: "在光标位置插入文本",
argsConfigs: [
{
label: "文本",
type: "input",
field: "0",
componentProps: {
placeholder: V("pleaseEnter")
}
}
]
}
]
}
}, { t: c } = o(), X = {
component: async () => (await import("element-plus")).ElInputNumber,
groupName: c("form"),
icon: "icon--epic--123-rounded",
sort: 710,
defaultSchema: {
label: c("numberInput"),
type: "number",
field: "number",
input: !0,
componentProps: {
placeholder: c("pleaseEnter")
}
},
config: {
attribute: [
{
label: c("fieldName"),
type: "input",
field: "field"
},
{
label: c("title"),
type: "input",
field: "label"
},
{
label: c("defaultValue"),
type: "number",
field: "componentProps.defaultValue"
},
{
label: c("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: c("size"),
type: "select",
componentProps: {
placeholder: c("pleaseSelect"),
clearable: !0,
options: [
{
label: c("large"),
value: "large"
},
{
label: c("medium"),
value: "default"
},
{
label: c("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: c("maxValue"),
type: "number",
field: "componentProps.max",
componentProps: {
placeholder: c("pleaseEnter")
}
},
{
label: c("minValue"),
type: "number",
field: "componentProps.min",
componentProps: {
placeholder: c("pleaseEnter")
}
},
{
label: c("step"),
type: "number",
field: "componentProps.step",
componentProps: {
placeholder: c("pleaseEnter")
}
},
{
label: c("controlButtonPosition"),
type: "select",
defaultValue: "",
componentProps: {
options: [
{
label: "default",
value: ""
},
{
label: "right",
value: "right"
}
],
placeholder: c("pleaseSelect"),
clearable: !0
},
field: "componentProps.controlsPosition"
},
{
label: c("precision"),
type: "number",
field: "componentProps.precision",
componentProps: {
placeholder: c("pleaseEnter")
}
},
{
label: c("inputControlIsMultipleOfStep"),
type: "switch",
field: "componentProps.stepStrictly"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: c("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: c("validationRuleRequiresForm"),
componentProps: {
ruleType: "number"
}
}
],
event: [
{
type: "change",
describe: c("onValueChange")
}
]
}
}, { t: d } = o(), Z = {
component: () => import("../../form-DC7I93pE.js"),
groupName: d("form"),
icon: "icon--epic--list-alt-outline-rounded",
sort: 600,
defaultSchema: {
label: d("form"),
type: "form",
componentProps: {
name: "default",
labelWidth: "100px",
"label-position": "left"
},
children: []
},
config: {
attribute: [
{
label: "Name",
type: "input",
field: "componentProps.name"
},
{
label: d("labelPosition"),
type: "radio",
field: "componentProps.label-position",
componentProps: {
clearable: !0,
radioButton: !0,
options: [
{
label: d("left"),
value: "left"
},
{
label: d("right"),
value: "right"
},
{
label: d("top"),
value: "top"
}
]
}
},
{
label: d("labelWidth"),
type: "EInputSize",
field: "componentProps.labelWidth"
},
{
label: d("labelSuffix"),
type: "input",
field: "componentProps.labelSuffix",
componentProps: {
placeholder: d("pleaseEnter")
}
},
{
label: d("formSize"),
type: "select",
field: "componentProps.size",
componentProps: {
placeholder: d("pleaseSelect"),
clearable: !0,
options: [
{
label: d("large"),
value: "large"
},
{
label: d("medium"),
value: "default"
},
{
label: d("small"),
value: "small"
}
]
}
},
{
label: d("asteriskPosition"),
type: "select",
field: "componentProps.require-asterisk-position",
componentProps: {
placeholder: d("pleaseSelect"),
clearable: !0,
options: [
{
label: d("left"),
value: "left"
},
{
label: d("right"),
value: "right"
}
]
}
},
{
label: d("inlineValidationMessage"),
type: "switch",
field: "componentProps.inline-message"
},
{
label: d("validationFeedbackIcon"),
type: "switch",
field: "componentProps.status-icon"
},
{
label: d("scrollToValidationError"),
type: "switch",
field: "componentProps.scroll-to-error"
},
{
label: d("inlineMode"),
type: "switch",
field: "componentProps.inline"
}
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
],
action: [
{
type: "getData",
describe: d("getFormData")
},
{
type: "setData",
describe: d("setFormData")
},
{
type: "validate",
describe: d("validateForm")
}
]
}
};
o();
const ee = {
component: () => import("../../formItem-D10Om12T.js"),
defaultSchema: {
label: "表单项",
type: "form-item"
},
config: {}
}, { t: P } = o(), le = {
component: () => import("../../button-BvmCwtR3.js"),
groupName: P("form"),
icon: "icon--epic--fit-screen-rounded",
sort: 1200,
defaultSchema: {
label: P("button"),
type: "button",
field: "input",
input: !1
},
config: {
attribute: [
{
label: P("title"),
type: "input",
field: "label"
},
{
label: P("actionType"),
type: "select",
componentProps: {
placeholder: P("pleaseSelect"),
clearable: !0,
options: [
{
label: "primary",
value: "primary"
},
{
label: "success",
value: "success"
},
{
label: "info",
value: "info"
},
{
label: "warning",
value: "warning"
},
{
label: "danger",
value: "danger"
}
]
},
field: "componentProps.type"
},
{
label: P("actionType"),
type: "select",
componentProps: {
placeholder: P("pleaseSelect"),
clearable: !0,
options: [
{
label: "button",
value: "button"
},
{
label: "submit",
value: "submit"
},
{
label: "reset",
value: "reset"
}
]
},
field: "componentProps.native-type"
},
{
label: P("customColor"),
type: "color-picker",
field: "componentProps.color",
componentProps: {
type: "color"
}
},
{
label: P("plainButton"),
type: "switch",
field: "componentProps.plain"
},
{
label: P("roundButton"),
type: "switch",
field: "componentProps.round"
},
{
label: P("circleButton"),
type: "switch",
field: "componentProps.circle"
},
{
label: P("textButton"),
type: "switch",
field: "componentProps.text"
},
{
label: P("loadingState"),
type: "switch",
field: "componentProps.loading"
}
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
],
event: [
{
type: "click",
describe: P("onClick")
},
{
type: "dblclick",
describe: P("onDoubleClick")
}
]
}
}, { t: x } = o(), te = {
component: () => import("../../card-CI6L3YKU.js"),
groupName: x("layout"),
icon: "icon--epic--wysiwyg-rounded",
sort: 700,
defaultSchema: {
label: x("cardLayout"),
type: "card",
multiple: !1,
children: [],
field: "input",
componentProps: {}
},
config: {
attribute: [
{
label: x("title"),
type: "input",
field: "label"
},
{
label: x("fieldName"),
type: "input",
field: "field"
},
{
label: "是否根据数据自动复制模版",
type: "radio",
field: "multiple",
componentProps: {
clearable: !0,
radioButton: !0,
options: [
{
label: "是",
value: !0
},
{
label: "否",
value: !1
}
]
}
},
{
label: x("shadowTiming"),
type: "select",
componentProps: {
options: [
{
label: "always",
value: "always"
},
{
label: "hover",
value: "hover"
},
{
label: "never",
value: "never"
}
],
placeholder: x("pleaseSelect"),
clearable: !0
},
field: "componentProps.shadow"
}
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
]
}
}, { t: T } = o(), oe = {
component: () => import("../../row-DhORW-4_.js"),
groupName: T("layout"),
icon: "icon--epic--width-normal-outline",
sort: 800,
defaultSchema: {
label: T("gridLayout"),
type: "row",
children: [
{
type: "col",
children: [],
componentProps: {
span: 12
}
},
{
type: "col",
children: [],
componentProps: {
span: 12
}
}
]
},
editConstraints: {
childImmovable: !0
},
config: {
attribute: [
{
label: T("verticalAlignment"),
type: "select",
componentProps: {
style: { width: "100%" },
options: [
{
label: "top",
value: "top"
},
{
label: "middle",
value: "middle"
},
{
label: "bottom",
value: "bottom"
}
],
placeholder: T("pleaseSelect")
},
field: "componentProps.align"
},
{
label: T("horizontalArrangement"),
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: T("pleaseSelect")
},
field: "componentProps.justify"
},
{
label: T("gridSpacing"),
type: "number",
field: "componentProps.gutter",
componentProps: {
placeholder: T("pleaseEnter")
}
},
{
label: T("gridWidth"),
type: "EColEditor",
field: "children"
}
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
]
}
}, { t: D } = o(), ae = {
component: () => import("../../col-D4hvKfJ6.js"),
defaultSchema: {
label: D("gridLayout") + "-" + D("column"),
type: "col",
children: [],
componentProps: {
span: 6
}
},
config: {
attribute: [
{
label: "占位格数",
type: "number",
field: "componentProps.span"
}
]
}
}, { t } = o(), ne = {
component: () => import("../../select-957IpcJa.js"),
groupName: t("form"),
icon: "icon--epic--select",
sort: 900,
defaultSchema: {
label: t("select"),
type: "select",
field: "select",
input: !0,
componentProps: {
options: [
{
label: t("option1"),
value: t("option1")
},
{
label: t("option2"),
value: t("option2")
}
],
dynamicId: "",
placeholder: t("pleaseSelect"),
size: "default",
effect: "light",
placement: "bottom-start"
}
},
config: {
attribute: [
{
label: t("fieldName"),
type: "input",
field: "field"
},
{
label: t("title"),
type: "input",
field: "label"
},
{
label: t("defaultValue"),
type: "select",
field: "componentProps.defaultValue"
},
{
label: t("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: t("size"),
type: "select",
componentProps: {
placeholder: t("pleaseSelect"),
clearable: !0,
options: [
{
label: t("large"),
value: "large"
},
{
label: t("medium"),
value: "default"
},
{
label: t("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: t("multiple"),
type: "switch",
field: "componentProps.multiple",
onChange: ({ value: e, values: s }) => {
e ? s.componentProps.defaultValue = [] : s.componentProps.defaultValue = null;
}
},
{
label: t("hideMultiple"),
type: "switch",
field: "componentProps.collapseTags",
show: ({ values: e }) => e.componentProps.multiple
},
{
label: t("hideHint"),
type: "switch",
field: "componentProps.collapseTagsTooltip",
show: ({ values: e }) => e.componentProps.multiple && e.componentProps.collapseTags
},
{
label: t("retainSearchKeyword"),
type: "switch",
field: "componentProps.reserveKeyword",
show: ({ values: e }) => e.componentProps.multiple
},
{
label: t("tagType"),
type: "select",
defaultValue: "info",
componentProps: {
options: [
{
label: "success",
value: "success"
},
{
label: "info",
value: "info"
},
{
label: "warning",
value: "warning"
},
{
label: "danger",
value: "danger"
}
]
},
show: ({ values: e }) => e.componentProps.multiple,
field: "componentProps.tagType"
},
{
label: t("multipleLimit"),
type: "number",
field: "componentProps.multipleLimit",
show: ({ values: e }) => e.componentProps.multiple
},
{
label: t("hintTheme"),
type: "select",
componentProps: {
options: [
{
label: "light",
value: "light"
},
{
label: "dark",
value: "dark"
}
]
},
field: "componentProps.effect"
},
{
label: t("filterable"),
type: "switch",
field: "componentProps.filterable"
},
{
label: t("allowCreate"),
type: "switch",
field: "componentProps.allowCreate"
},
{
label: t("dropdownPosition"),
type: "select",
defaultValue: "bottom-start",
componentProps: {
options: [
{
label: "top",
value: "top"
},
{
label: "top-start",
value: "top-start"
},
{
label: "top-end",
value: "top-end"
},
{
label: "bottom",
value: "bottom"
},
{
label: "bottom-start",
value: "bottom-start"
},
{
label: "bottom-end",
value: "bottom-end"
},
{
label: "left",
value: "left"
},
{
label: "left-start",
value: "left-start"
},
{
label: "left-end",
value: "left-end"
},
{
label: "right",
value: "right"
},
{
label: "right-start",
value: "right-start"
},
{
label: "right-end",
value: "right-end"
}
]
},
field: "componentProps.placement"
},
{
label: t("dropdownWidthSameAsInput"),
type: "switch",
field: "componentProps.fitInputWidth"
},
{
label: t("noDataText"),
type: "input",
field: "componentProps.noDataText",
componentProps: {
placeholder: t("pleaseEnter")
}
},
{
label: t("clearable"),
type: "switch",
field: "componentProps.clearable"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: t("optionManagement"),
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options",
describe: t("configureOptions")
},
{
label: t("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: t("validationRuleRequiresForm")
},
{
label: t("dataSource"),
type: "EDataSource",
layout: "vertical",
field: "componentProps.dataSource",
describe: t("dataSourceConfig")
}
],
event: [
{
type: "change",
describe: t("onValueChange")
}
]
}
}, { t: u } = o(), pe = {
component: () => import("../../radio-Ducbqo4d.js"),
groupName: u("form"),
icon: "icon--epic--radio-button-checked-outline",
sort: 850,
defaultSchema: {
label: u("radio"),
type: "radio",
field: "radio",
input: !0,
componentProps: {
options: [
{
label: u("option1"),
value: u("option1")
},
{
label: u("option2"),
value: u("option2")
}
],
size: "default"
}
},
config: {
attribute: [
{
label: u("fieldName"),
type: "input",
field: "field"
},
{
label: u("title"),
type: "input",
field: "label"
},
{
label: u("defaultValue"),
type: "radio",
field: "componentProps.defaultValue"
},
{
label: u("size"),
type: "select",
componentProps: {
placeholder: u("pleaseSelect"),
clearable: !0,
options: [
{
label: u("large"),
value: "large"
},
{
label: u("medium"),
value: "default"
},
{
label: u("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: u("buttonMode"),
type: "switch",
field: "componentProps.radioButton"
},
{
label: u("optionTextColor"),
type: "color-picker",
layout: "horizontal",
field: "componentProps.textColor",
show: ({ values: e }) => e.componentProps.radioButton,
describe: u("effectiveInButtonMode")
},
{
label: u("optionButtonColor"),
type: "color-picker",
layout: "horizontal",
field: "componentProps.fill",
show: ({ values: e }) => e.componentProps.radioButton,
describe: u("effectiveInButtonMode")
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: u("optionManagement"),
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options"
},
{
label: u("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: u("validationRuleRequiresForm")
},
{
label: u("dataSource"),
type: "EDataSource",
layout: "vertical",
field: "componentProps.dataSource",
describe: u("dataSourceConfig")
}
],
event: [
{
type: "change",
describe: u("onValueChange")
}
]
}
}, { t: i } = o(), ie = {
component: () => import("../../checkbox-BMXONqwy.js"),
groupName: i("form"),
icon: "icon--epic--dialogs-outline-rounded",
sort: 860,
defaultSchema: {
label: i("checkbox"),
type: "checkbox",
field: "checkbox",
input: !0,
componentProps: {
options: [
{
label: i("option1"),
value: i("option1")
},
{
label: i("option2"),
value: i("option2")
}
]
}
},
config: {
attribute: [
{
label: i("fieldName"),
type: "input",
field: "field"
},
{
label: i("title"),
type: "input",
field: "label"
},
{
label: i("defaultValue"),
type: "checkbox",
field: "componentProps.defaultValue"
},
{
label: i("size"),
type: "select",
componentProps: {
placeholder: i("pleaseSelect"),
clearable: !0,
options: [
{
label: i("large"),
value: "large"
},
{
label: i("medium"),
value: "default"
},
{
label: i("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: i("maxSelected"),
type: "number",
field: "componentProps.max",
componentProps: {
placeholder: i("pleaseEnter")
}
},
{
label: i("minSelected"),
type: "number",
field: "componentProps.min",
componentProps: {
placeholder: i("pleaseEnter")
}
},
{
label: i("buttonMode"),
type: "switch",
field: "componentProps.radioButton"
},
{
label: i("optionTextColor"),
type: "color-picker",
layout: "horizontal",
field: "componentProps.textColor",
show: ({ values: e }) => e.componentProps.radioButton,
describe: i("effectiveInButtonMode")
},
{
label: i("optionButtonColor"),
type: "color-picker",
layout: "horizontal",
field: "componentProps.fill",
show: ({ values: e }) => e.componentProps.radioButton,
describe: i("effectiveInButtonMode")
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: i("optionManagement"),
type: "EOptionsEditor",
layout: "vertical",
field: "componentProps.options"
},
{
label: i("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: i("validationRuleRequiresForm"),
componentProps: {
ruleType: "array"
}
},
{
label: i("dataSource"),
type: "EDataSource",
layout: "vertical",
field: "componentProps.dataSource",
describe: i("dataSourceConfig")
}
],
event: [
{
type: "change",
describe: i("onValueChange")
}
]
}
}, { t: r } = o(), re = {
component: async () => (await import("element-plus")).ElSlider,
groupName: r("form"),
icon: "icon--epic--switches",
sort: 930,
defaultSchema: {
label: r("slider"),
type: "slider",
field: "slider",
input: !0,
componentProps: {
placement: "top-start",
showTooltip: !0
}
},
config: {
attribute: [
{
label: r("fieldName"),
type: "input",
field: "field"
},
{
label: r("title"),
type: "input",
field: "label"
},
{
label: r("defaultValue"),
type: "slider",
field: "componentProps.defaultValue"
},
{
label: r("size"),
type: "select",
componentProps: {
placeholder: r("pleaseSelect"),
clearable: !0,
options: [
{
label: r("large"),
value: "large"
},
{
label: r("medium"),
value: "default"
},
{
label: r("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: r("minValue"),
type: "number",
field: "componentProps.min",
componentProps: {
placeholder: r("pleaseEnter")
},
onChange: ({ value: e, values: s, componentAttributes: S }) => {
const F = S.value.findIndex((z) => z.field === "componentProps.max"), N = S.value[F];
N.componentProps = {
min: e
}, (s.componentProps.max ?? 0) < e && (s.componentProps.max = e);
}
},
{
label: r("maxValue"),
type: "number",
field: "componentProps.max",
componentProps: {
placeholder: r("pleaseEnter")
},
onChange: ({ value: e, values: s, componentAttributes: S }) => {
const F = S.value.findIndex((z) => z.field === "componentProps.min"), N = S.value[F];
N.componentProps = {
max: e
}, (s.componentProps.min ?? 0) > e && (s.componentProps.min = e);
}
},
{
label: r("step"),
type: "number",
field: "componentProps.step",
componentProps: {
placeholder: r("pleaseEnter")
}
},
{
label: r("showStops"),
type: "switch",
field: "componentProps.showStops"
},
{
label: r("tooltip"),
type: "switch",
field: "componentProps.showTooltip"
},
{
label: r("range"),
type: "switch",
field: "componentProps.range"
},
{
label: r("vertical"),
type: "switch",
field: "componentProps.vertical"
},
{
label: r("height"),
type: "EInputSize",
field: "componentProps.height",
show: ({ values: e }) => e.componentProps.vertical
},
{
label: r("showInput"),
type: "switch",
field: "componentProps.showInput",
onChange: ({ value: e, values: s }) => {
e && (s.componentProps.showInputControls = !0);
}
},
{
label: r("controlButtons"),
type: "switch",
field: "componentProps.showInputControls",
show: ({ values: e }) => e.componentProps.showInput
},
{
label: r("tooltipPosition"),
type: "select",
defaultValue: "bottom-start",
componentProps: {
options: [
{
label: "top",
value: "top"
},
{
label: "top-start",
value: "top-start"
},
{
label: "top-end",
value: "top-end"
},
{
label: "bottom",
value: "bottom"
},
{
label: "bottom-start",
value: "bottom-start"
},
{
label: "bottom-end",
value: "bottom-end"
},
{
label: "left",
value: "left"
},
{
label: "left-start",
value: "left-start"
},
{
label: "left-end",
value: "left-end"
},
{
label: "right",
value: "right"
},
{
label: "right-start",
value: "right-start"
},
{
label: "right-end",
value: "right-end"
}
]
},
field: "componentProps.placement"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: r("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: r("validationRuleRequiresForm"),
componentProps: {
ruleType: "number"
}
}
],
event: [
{
type: "input",
describe: r("realTimeTrigger")
},
{
type: "change",
describe: r("onChangeEnd")
}
]
}
}, { t: y } = o(), ce = {
component: async () => (await import("element-plus")).ElColorPicker,
groupName: y("form"),
icon: "icon--epic--palette-outline",
sort: 950,
defaultSchema: {
label: y("colorPicker"),
type: "color-picker",
field: "color-picker",
input: !0
},
config: {
attribute: [
{
label: y("fieldName"),
type: "input",
field: "field"
},
{
label: y("title"),
type: "input",
field: "label"
},
{
label: y("defaultValue"),
type: "color-picker",
field: "componentProps.defaultValue"
},
{
label: y("size"),
type: "select",
componentProps: {
placeholder: y("pleaseSelect"),
clearable: !0,
options: [
{
label: y("large"),
value: "large"
},
{
label: y("medium"),
value: "default"
},
{
label: y("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: y("format"),
type: "select",
componentProps: {
placeholder: y("pleaseSelect"),
clearable: !0,
options: [
{
label: "hsl",
value: "hsl"
},
{
label: "hsv",
value: "hsv"
},
{
label: "hex",
value: "hex"
},
{
label: "rgb",
value: "rgb"
}
]
},
field: "componentProps.colorFormat"
},
{
label: y("alpha"),
type: "switch",
field: "componentProps.showAlpha"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: y("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: y("validationRuleRequiresForm")
}
],
event: [
{
type: "change",
describe: y("onValueChange")
}
],
action: []
}
}, { t: m } = o(), se = {
component: async () => (await import("element-plus")).ElSwitch,
groupName: m("form"),
icon: "icon--epic--toggle-off-outline",
sort: 930,
defaultSchema: {
label: m("switch"),
type: "switch",
field: "switch",
input: !0,
componentProps: {
defaultValue: !1
}
},
config: {
attribute: [
{
label: m("fieldName"),
type: "input",
field: "field"
},
{
label: m("title"),
type: "input",
field: "label"
},
{
label: m("defaultValue"),
type: "switch",
field: "componentProps.defaultValue"
},
{
label: m("onValue"),
type: "input",
field: "componentProps.activeValue",
componentProps: {
placeholder: m("pleaseEnter")
},
onChange(e) {
setTimeout(() => Y(e));
}
},
{
label: m("offValue"),
type: "input",
field: "componentProps.inactiveValue",
componentProps: {
placeholder: m("pleaseEnter")
},
onChange(e) {
setTimeout(() => Y(e));
}
},
{
label: m("onDescription"),
type: "input",
field: "componentProps.activeText",
componentProps: {
placeholder: m("pleaseEnter")
}
},
{
label: m("offDescription"),
type: "input",
field: "componentProps.inactiveText",
componentProps: {
placeholder: m("pleaseEnter")
}
},
{
label: m("size"),
type: "select",
componentProps: {
placeholder: m("pleaseSelect"),
clearable: !0,
options: [
{
label: m("large"),
value: "large"
},
{
label: m("medium"),
value: "default"
},
{
label: m("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: m("width"),
type: "number",
field: "componentProps.width",
componentProps: {
min: 50,
placeholder: m("pleaseEnter")
}
},
{
label: m("textInside"),
type: "switch",
field: "componentProps.inlinePrompt"
},
// {
// label: "禁用",
// type: "switch",
// field: "componentProps.disabled",
// },
// {
// label: "隐藏",
// type: "switch",
// field: "componentProps.hidden",
// },
{
label: m("formValidation"),
type: "ERuleEditor",
layout: "vertical",
field: "rules",
describe: m("validationRuleRequiresForm"),
componentProps: {
ruleType: "boolean"
}
}
],
event: [
{
type: "change",
describe: m("onChangeSwitch")
}
]
}
};
function Y(e) {
var S;
let s = ((S = e.values.componentProps) == null ? void 0 : S.inactiveValue) || !1;
e.values.componentProps.unCheckedValue === "" && delete e.values.componentProps.unCheckedValue, e.values.componentProps.activeValue === "" && delete e.values.componentProps.activeValue, e.values.componentProps ? e.values.componentProps.defaultValue = s : e.values.componentProps = {
defaultValue: s
};
}
const { t: l } = o(), de = {
component: async () => (await import("element-plus")).ElCascader,
groupName: l("form"),
icon: "icon--epic--full-coverage-outline",
sort: 900,
defaultSchema: {
label: l("cascader"),
type: "cascader",
field: "cascader",
input: !0,
componentProps: {
options: [
{
label: l("option1"),
value: l("option1")
},
{
label: l("option2"),
value: l("option2")
}
],
placeholder: l("pleaseSelect"),
props: {
expandTrigger: "click"
}
}
},
config: {
attribute: [
{
label: l("fieldName"),
type: "input",
field: "field"
},
{
label: l("title"),
type: "input",
field: "label"
},
{
label: l("defaultValue"),
type: "cascader",
field: "componentProps.defaultValue"
},
{
label: l("placeholder"),
type: "input",
field: "componentProps.placeholder"
},
{
label: l("size"),
type: "select",
componentProps: {
placeholder: l("pleaseSelect"),
clearable: !0,
options: [
{
label: l("large"),
value: "large"
},
{
label: l("medium"),
value: "default"
},
{
label: l("small"),
value: "small"
}
]
},
field: "componentProps.size"
},
{
label: l("separ