UNPKG

epic-designer-gold

Version:

基于vue3的设计器,可视化开发页面表单

2,165 lines 84.1 kB
import { pluginManager as z } from "epic-designer-gold"; import { u as a } from "../../index-B1s67XDZ.js"; import { ElFormItem as Y, ElForm as D, ElRadioGroup as B, ElRadioButton as M, ElTabs as q, ElTabPane as L, ElCollapse as W, ElCollapseItem as A, ElDrawer as $, ElDialog as O, ElTable as U, ElTableColumn as K } from "element-plus"; const { t: n } = a(), H = { 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 } = a(), 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: c } = a(), G = { 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 } = a(), _ = { component: () => import("../../form-VbfBmb63.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") } ] } }; a(); const J = { component: () => import("../../formItem-D10Om12T.js"), defaultSchema: { label: "表单项", type: "form-item" }, config: {} }, { t: h } = a(), Q = { component: () => import("../../button-BvmCwtR3.js"), groupName: h("form"), icon: "icon--epic--fit-screen-rounded", sort: 1200, defaultSchema: { label: h("button"), type: "button", field: "input", input: !1 }, config: { attribute: [ { label: h("title"), type: "input", field: "label" }, { label: h("actionType"), type: "select", componentProps: { placeholder: h("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: h("actionType"), type: "select", componentProps: { placeholder: h("pleaseSelect"), clearable: !0, options: [ { label: "button", value: "button" }, { label: "submit", value: "submit" }, { label: "reset", value: "reset" } ] }, field: "componentProps.native-type" }, { label: h("customColor"), type: "color-picker", field: "componentProps.color", componentProps: { type: "color" } }, { label: h("plainButton"), type: "switch", field: "componentProps.plain" }, { label: h("roundButton"), type: "switch", field: "componentProps.round" }, { label: h("circleButton"), type: "switch", field: "componentProps.circle" }, { label: h("textButton"), type: "switch", field: "componentProps.text" }, { label: h("loadingState"), type: "switch", field: "componentProps.loading" } // { // label: "禁用", // type: "switch", // field: "componentProps.disabled", // }, // { // label: "隐藏", // type: "switch", // field: "componentProps.hidden", // }, ], event: [ { type: "click", describe: h("onClick") }, { type: "dblclick", describe: h("onDoubleClick") } ] } }, { t: V } = a(), X = { component: () => import("../../card-CI6L3YKU.js"), groupName: V("layout"), icon: "icon--epic--wysiwyg-rounded", sort: 700, defaultSchema: { label: V("cardLayout"), type: "card", multiple: !1, children: [], field: "input", componentProps: {} }, config: { attribute: [ { label: V("title"), type: "input", field: "label" }, { label: V("fieldName"), type: "input", field: "field" }, { label: "是否根据数据自动复制模版", type: "radio", field: "multiple", componentProps: { clearable: !0, radioButton: !0, options: [ { label: "是", value: !0 }, { label: "否", value: !1 } ] } }, { label: V("shadowTiming"), type: "select", componentProps: { options: [ { label: "always", value: "always" }, { label: "hover", value: "hover" }, { label: "never", value: "never" } ], placeholder: V("pleaseSelect"), clearable: !0 }, field: "componentProps.shadow" } // { // label: "隐藏", // type: "switch", // field: "componentProps.hidden", // }, ] } }, { t: S } = a(), Z = { component: () => import("../../row-CkyJ9pQh.js"), groupName: S("layout"), icon: "icon--epic--width-normal-outline", sort: 800, defaultSchema: { label: S("gridLayout"), type: "row", children: [ { type: "col", children: [], componentProps: { span: 12 } }, { type: "col", children: [], componentProps: { span: 12 } } ] }, editConstraints: { childImmovable: !0 }, config: { attribute: [ { label: S("verticalAlignment"), type: "select", componentProps: { style: { width: "100%" }, options: [ { label: "top", value: "top" }, { label: "middle", value: "middle" }, { label: "bottom", value: "bottom" } ], placeholder: S("pleaseSelect") }, field: "componentProps.align" }, { label: S("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: S("pleaseSelect") }, field: "componentProps.justify" }, { label: S("gridSpacing"), type: "number", field: "componentProps.gutter", componentProps: { placeholder: S("pleaseEnter") } }, { label: S("gridWidth"), type: "EColEditor", field: "children" } // { // label: "隐藏", // type: "switch", // field: "componentProps.hidden", // }, ] } }, { t: F } = a(), ee = { component: () => import("../../col-D4hvKfJ6.js"), defaultSchema: { label: F("gridLayout") + "-" + F("column"), type: "col", children: [], componentProps: { span: 6 } }, config: { attribute: [ { label: "占位格数", type: "number", field: "componentProps.span" } ] } }, { t } = a(), le = { component: () => import("../../select-CjWTf5kk.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 } = a(), te = { 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 } = a(), oe = { 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 } = a(), ae = { 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: w }) => { const I = w.value.findIndex((N) => N.field === "componentProps.max"), R = w.value[I]; R.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: w }) => { const I = w.value.findIndex((N) => N.field === "componentProps.min"), R = w.value[I]; R.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: f } = a(), ne = { component: async () => (await import("element-plus")).ElColorPicker, groupName: f("form"), icon: "icon--epic--palette-outline", sort: 950, defaultSchema: { label: f("colorPicker"), type: "color-picker", field: "color-picker", input: !0 }, config: { attribute: [ { label: f("fieldName"), type: "input", field: "field" }, { label: f("title"), type: "input", field: "label" }, { label: f("defaultValue"), type: "color-picker", field: "componentProps.defaultValue" }, { label: f("size"), type: "select", componentProps: { placeholder: f("pleaseSelect"), clearable: !0, options: [ { label: f("large"), value: "large" }, { label: f("medium"), value: "default" }, { label: f("small"), value: "small" } ] }, field: "componentProps.size" }, { label: f("format"), type: "select", componentProps: { placeholder: f("pleaseSelect"), clearable: !0, options: [ { label: "hsl", value: "hsl" }, { label: "hsv", value: "hsv" }, { label: "hex", value: "hex" }, { label: "rgb", value: "rgb" } ] }, field: "componentProps.colorFormat" }, { label: f("alpha"), type: "switch", field: "componentProps.showAlpha" }, // { // label: "禁用", // type: "switch", // field: "componentProps.disabled", // }, // { // label: "隐藏", // type: "switch", // field: "componentProps.hidden", // }, { label: f("formValidation"), type: "ERuleEditor", layout: "vertical", field: "rules", describe: f("validationRuleRequiresForm") } ], event: [ { type: "change", describe: f("onValueChange") } ], action: [] } }, { t: m } = a(), pe = { 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(() => k(e)); } }, { label: m("offValue"), type: "input", field: "componentProps.inactiveValue", componentProps: { placeholder: m("pleaseEnter") }, onChange(e) { setTimeout(() => k(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 k(e) { var w; let s = ((w = e.values.componentProps) == null ? void 0 : w.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 } = a(), ie = { 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("separator"), type: "input", componentProps: { placeholder: l("pleaseEnter") }, field: "componentProps.separator" }, { label: l("subMenuExpandMode"), type: "select", field: "componentProps.props.expandTrigger", componentProps: { placeholder: l("pleaseSelect"), clearable: !0, options: [ { label: "click", value: "click" }, { label: "hover", value: "hover" } ] } }, { label: l("searchable"), type: "switch", field: "componentProps.filterable" }, { label: l("multiple"), type: "switch", field: "componentProps.props.multiple", onChange: ({ value: e, values: s }) => { e ? s.componentProps.defaultValue = [] : s.componentProps.defaultValue = null; } }, { label: l("collapseTags"), type: "switch", field: "componentProps.collapseTags", show: ({ values: e }) => e.componentProps.props.multiple }, { label: l("showCollapsedTags"), type: "switch", field: "componentProps.collapseTagsTooltip", show: ({ values: e }) => e.componentProps.props.multiple && e.componentProps.collapseTags }, { label: l("hidePath"), type: "switch", componentProps: { activeValue: !1, inactiveValue: !0 }, field: "componentProps.showAllLevels" }, { label: l("parentSelectable"), type: "switch", field: "componentProps.props.checkStrictly", describe: l("parentChildNotLinked") }, { label: l("onlyGetSelectedNodes"), type: "switch", field: "componentProps.props.emitPath", componentProps: { activeValue: !1, inactiveValue: !0 } }, { label: l("clearable"), type: "switch", field: "componentProps.clearable" }, // { // label: "禁用", // type: "switch", // field: "componentProps.disabled", // }, // { // label: "隐藏", // type: "switch", // field: "componentProps.hidden", // }, { label: l("optionManagement"), type: "EOptionsEditor", layout: "vertical", field: "componentProps.options", componentProps: { tree: !0 }, describe: l("configureOptions") }, { label: l("formValidation"), type: "ERuleEditor", layout: "vertical", field: "rules", descr