UNPKG

form-designer-xinyi

Version:

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

2,077 lines (2,076 loc) 82.3 kB
import { pluginManager as ee } from "form-designer-xinyi"; import { c as te, g as le } from "./_commonjsHelpers-BkfeUUK-.js"; import { version as oe } from "ant-design-vue"; var j = { exports: {} }, Z; function ne() { return Z || (Z = 1, function(t, e) { (function(g, v) { t.exports = v(); })(te, function() { var g = 1e3, v = 6e4, _ = 36e5, Y = "millisecond", f = "second", x = "minute", D = "hour", w = "day", z = "week", P = "month", q = "quarter", k = "year", V = "date", A = "Invalid Date", G = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Q = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, K = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(p) { var n = ["th", "st", "nd", "rd"], l = p % 100; return "[" + p + (n[(l - 20) % 10] || n[l] || n[0]) + "]"; } }, F = function(p, n, l) { var a = String(p); return !a || a.length >= n ? p : "" + Array(n + 1 - a.length).join(l) + p; }, X = { s: F, z: function(p) { var n = -p.utcOffset(), l = Math.abs(n), a = Math.floor(l / 60), o = l % 60; return (n <= 0 ? "+" : "-") + F(a, 2, "0") + ":" + F(o, 2, "0"); }, m: function p(n, l) { if (n.date() < l.date()) return -p(l, n); var a = 12 * (l.year() - n.year()) + (l.month() - n.month()), o = n.clone().add(a, P), r = l - o < 0, i = n.clone().add(a + (r ? -1 : 1), P); return +(-(a + (l - o) / (r ? o - i : i - o)) || 0); }, a: function(p) { return p < 0 ? Math.ceil(p) || 0 : Math.floor(p); }, p: function(p) { return { M: P, y: k, w: z, d: w, D: V, h: D, m: x, s: f, ms: Y, Q: q }[p] || String(p || "").toLowerCase().replace(/s$/, ""); }, u: function(p) { return p === void 0; } }, T = "en", M = {}; M[T] = K; var U = "$isDayjsObject", I = function(p) { return p instanceof H || !(!p || !p[U]); }, O = function p(n, l, a) { var o; if (!n) return T; if (typeof n == "string") { var r = n.toLowerCase(); M[r] && (o = r), l && (M[r] = l, o = r); var i = n.split("-"); if (!o && i.length > 1) return p(i[0]); } else { var s = n.name; M[s] = n, o = s; } return !a && o && (T = o), o || !a && T; }, u = function(p, n) { if (I(p)) return p.clone(); var l = typeof n == "object" ? n : {}; return l.date = p, l.args = arguments, new H(l); }, c = X; c.l = O, c.i = I, c.w = function(p, n) { return u(p, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset }); }; var H = function() { function p(l) { this.$L = O(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[U] = !0; } var n = p.prototype; return n.parse = function(l) { this.$d = function(a) { var o = a.date, r = a.utc; if (o === null) return /* @__PURE__ */ new Date(NaN); if (c.u(o)) return /* @__PURE__ */ new Date(); if (o instanceof Date) return new Date(o); if (typeof o == "string" && !/Z$/i.test(o)) { var i = o.match(G); if (i) { var s = i[2] - 1 || 0, d = (i[7] || "0").substring(0, 3); return r ? new Date(Date.UTC(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, d)) : new Date(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, d); } } return new Date(o); }(l), this.init(); }, n.init = function() { var l = this.$d; this.$y = l.getFullYear(), this.$M = l.getMonth(), this.$D = l.getDate(), this.$W = l.getDay(), this.$H = l.getHours(), this.$m = l.getMinutes(), this.$s = l.getSeconds(), this.$ms = l.getMilliseconds(); }, n.$utils = function() { return c; }, n.isValid = function() { return this.$d.toString() !== A; }, n.isSame = function(l, a) { var o = u(l); return this.startOf(a) <= o && o <= this.endOf(a); }, n.isAfter = function(l, a) { return u(l) < this.startOf(a); }, n.isBefore = function(l, a) { return this.endOf(a) < u(l); }, n.$g = function(l, a, o) { return c.u(l) ? this[a] : this.set(o, l); }, n.unix = function() { return Math.floor(this.valueOf() / 1e3); }, n.valueOf = function() { return this.$d.getTime(); }, n.startOf = function(l, a) { var o = this, r = !!c.u(a) || a, i = c.p(l), s = function($, h) { var C = c.w(o.$u ? Date.UTC(o.$y, h, $) : new Date(o.$y, h, $), o); return r ? C : C.endOf(w); }, d = function($, h) { return c.w(o.toDate()[$].apply(o.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(h)), o); }, m = this.$W, b = this.$M, y = this.$D, E = "set" + (this.$u ? "UTC" : ""); switch (i) { case k: return r ? s(1, 0) : s(31, 11); case P: return r ? s(1, b) : s(0, b + 1); case z: var S = this.$locale().weekStart || 0, R = (m < S ? m + 7 : m) - S; return s(r ? y - R : y + (6 - R), b); case w: case V: return d(E + "Hours", 0); case D: return d(E + "Minutes", 1); case x: return d(E + "Seconds", 2); case f: return d(E + "Milliseconds", 3); default: return this.clone(); } }, n.endOf = function(l) { return this.startOf(l, !1); }, n.$set = function(l, a) { var o, r = c.p(l), i = "set" + (this.$u ? "UTC" : ""), s = (o = {}, o[w] = i + "Date", o[V] = i + "Date", o[P] = i + "Month", o[k] = i + "FullYear", o[D] = i + "Hours", o[x] = i + "Minutes", o[f] = i + "Seconds", o[Y] = i + "Milliseconds", o)[r], d = r === w ? this.$D + (a - this.$W) : a; if (r === P || r === k) { var m = this.clone().set(V, 1); m.$d[s](d), m.init(), this.$d = m.set(V, Math.min(this.$D, m.daysInMonth())).$d; } else s && this.$d[s](d); return this.init(), this; }, n.set = function(l, a) { return this.clone().$set(l, a); }, n.get = function(l) { return this[c.p(l)](); }, n.add = function(l, a) { var o, r = this; l = Number(l); var i = c.p(a), s = function(b) { var y = u(r); return c.w(y.date(y.date() + Math.round(b * l)), r); }; if (i === P) return this.set(P, this.$M + l); if (i === k) return this.set(k, this.$y + l); if (i === w) return s(1); if (i === z) return s(7); var d = (o = {}, o[x] = v, o[D] = _, o[f] = g, o)[i] || 1, m = this.$d.getTime() + l * d; return c.w(m, this); }, n.subtract = function(l, a) { return this.add(-1 * l, a); }, n.format = function(l) { var a = this, o = this.$locale(); if (!this.isValid()) return o.invalidDate || A; var r = l || "YYYY-MM-DDTHH:mm:ssZ", i = c.z(this), s = this.$H, d = this.$m, m = this.$M, b = o.weekdays, y = o.months, E = o.meridiem, S = function(h, C, L, N) { return h && (h[C] || h(a, r)) || L[C].slice(0, N); }, R = function(h) { return c.s(s % 12 || 12, h, "0"); }, $ = E || function(h, C, L) { var N = h < 12 ? "AM" : "PM"; return L ? N.toLowerCase() : N; }; return r.replace(Q, function(h, C) { return C || function(L) { switch (L) { case "YY": return String(a.$y).slice(-2); case "YYYY": return c.s(a.$y, 4, "0"); case "M": return m + 1; case "MM": return c.s(m + 1, 2, "0"); case "MMM": return S(o.monthsShort, m, y, 3); case "MMMM": return S(y, m); case "D": return a.$D; case "DD": return c.s(a.$D, 2, "0"); case "d": return String(a.$W); case "dd": return S(o.weekdaysMin, a.$W, b, 2); case "ddd": return S(o.weekdaysShort, a.$W, b, 3); case "dddd": return b[a.$W]; case "H": return String(s); case "HH": return c.s(s, 2, "0"); case "h": return R(1); case "hh": return R(2); case "a": return $(s, d, !0); case "A": return $(s, d, !1); case "m": return String(d); case "mm": return c.s(d, 2, "0"); case "s": return String(a.$s); case "ss": return c.s(a.$s, 2, "0"); case "SSS": return c.s(a.$ms, 3, "0"); case "Z": return i; } return null; }(h) || i.replace(":", ""); }); }, n.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, n.diff = function(l, a, o) { var r, i = this, s = c.p(a), d = u(l), m = (d.utcOffset() - this.utcOffset()) * v, b = this - d, y = function() { return c.m(i, d); }; switch (s) { case k: r = y() / 12; break; case P: r = y(); break; case q: r = y() / 3; break; case z: r = (b - m) / 6048e5; break; case w: r = (b - m) / 864e5; break; case D: r = b / _; break; case x: r = b / v; break; case f: r = b / g; break; default: r = b; } return o ? r : c.a(r); }, n.daysInMonth = function() { return this.endOf(P).$D; }, n.$locale = function() { return M[this.$L]; }, n.locale = function(l, a) { if (!l) return this.$L; var o = this.clone(), r = O(l, a, !0); return r && (o.$L = r), o; }, n.clone = function() { return c.w(this.$d, this); }, n.toDate = function() { return new Date(this.valueOf()); }, n.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, n.toISOString = function() { return this.$d.toISOString(); }, n.toString = function() { return this.$d.toUTCString(); }, p; }(), J = H.prototype; return u.prototype = J, [["$ms", Y], ["$s", f], ["$m", x], ["$H", D], ["$W", w], ["$M", P], ["$y", k], ["$D", V]].forEach(function(p) { J[p[1]] = function(n) { return this.$g(n, p[0], p[1]); }; }), u.extend = function(p, n) { return p.$i || (p(n, H, u), p.$i = !0), u; }, u.locale = O, u.isDayjs = I, u.unix = function(p) { return u(1e3 * p); }, u.en = M[T], u.Ls = M, u.p = {}, u; }); }(j)), j.exports; } var ae = ne(); const pe = /* @__PURE__ */ le(ae), re = { component: async () => (await import("ant-design-vue")).Input, groupName: "表单", icon: "epic-icon-write", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, ie = { component: async () => (await import("ant-design-vue")).Textarea, groupName: "表单", icon: "epic-icon-edit", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, ce = { component: async () => (await import("ant-design-vue")).InputNumber, groupName: "表单", icon: "epic-icon-number", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, se = { component: async () => (await import("ant-design-vue")).InputPassword, groupName: "表单", icon: "epic-icon-mima", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, de = { component: async () => (await import("ant-design-vue")).RadioGroup, groupName: "表单", icon: "epic-icon-danxuan-cuxiantiao", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, ue = { component: async () => (await import("ant-design-vue")).CheckboxGroup, groupName: "表单", icon: "epic-icon-duoxuan1", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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" }, me = { component: async () => (await import("ant-design-vue")).Select, groupName: "表单", icon: "epic-icon-xiala", defaultSchema: { label: "选择框", type: "select", field: "select", input: !0, componentProps: { options: [ { label: "选项1", value: "选项1" }, { label: "选项2", value: "选项2" } ], placeholder: "请选择", placement: "bottomLeft" } }, 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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: t }) => t.componentProps.mode && t.componentProps.showSearch }, { label: "最大tag文本长度", type: "number", field: "componentProps.maxTagTextLength", show: ({ values: t }) => t.componentProps.mode }, { label: "最大tag显示数", type: "number", field: "componentProps.maxTagCount", show: ({ values: t }) => t.componentProps.mode }, { label: "弹出框位置", type: "select", componentProps: { 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" }, be = { component: async () => (await import("ant-design-vue")).Slider, groupName: "表单", icon: "epic-icon-menu", defaultSchema: { label: "滑块", type: "slider", field: "slider", input: !0 }, config: { attribute: [ { label: "字段名", type: "input", field: "field" }, { label: "标题", type: "input", field: "label" }, { label: "默认值", type: "slider", field: "componentProps.defaultValue" }, { label: "尺寸", type: "select", componentProps: { placeholder: "请选择", allowClear: !0, options: [ { label: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", value: "small" } ] }, field: "componentProps.size" }, { label: "范围选择", type: "switch", field: "componentProps.range", changeSync: !0, onChange: ({ value: t, values: e }) => { t ? 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" }, he = { component: async () => (await import("ant-design-vue")).TimePicker, groupName: "表单", icon: "epic-icon-time", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", 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: "请选择", 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: t, value: e }) { t.componentProps.defaultValue = null, e ? (t.componentProps.format = "h:mm:ss a", t.componentProps.valueFormat = "h:mm:ss a") : (t.componentProps.format = "HH:mm:ss", t.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" }, fe = { component: () => import("./datePicker-2Df6yfYg.js"), groupName: "表单", icon: "epic-icon-calendar", 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: t, value: e }) { t.componentProps.defaultValue = null, [ "daterange", "weekrange", "monthrange", "yearrange", "quarterrange" ].includes(e) ? t.componentProps.placeholder = ["请输入", "请输入"] : t.componentProps.placeholder = "请输入", ["date", "daterange"].includes(e) ? (t.componentProps.format = "YYYY-MM-DD", t.componentProps.valueFormat = "YYYY-MM-DD") : ["week", "weekrange"].includes(e) ? (t.componentProps.format = "ww [周]", t.componentProps.valueFormat = "YYYY-MM-DD") : ["month", "monthrange"].includes(e) ? (t.componentProps.format = "YYYY-MM", t.componentProps.valueFormat = "YYYY-MM") : ["quarter", "quarterrange"].includes(e) ? (t.componentProps.format = "YYYY-Q季度", t.componentProps.valueFormat = "YYYY-Q季度") : ["year", '"yearrange"'].includes(e) && (t.componentProps.format = "YYYY", t.componentProps.valueFormat = "YYYY"); } }, { label: "增加时间选择", type: "switch", field: "componentProps.showTime", onChange: ({ value: t, values: e }) => { t ? (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: t }) { return ["date", "daterange"].includes(t.componentProps.type); } }, { label: "占位内容", type: "input", field: "componentProps.placeholder", componentProps: { placeholder: "请输入" }, show: ({ values: t }) => ![ "daterange", "weekrange", "monthrange", "yearrange", "quarterrange" ].includes(t.componentProps.type) }, { label: "开始占位符", type: "input", componentProps: { placeholder: "请输入" }, field: "componentProps.placeholder.0", show: ({ values: t }) => [ "daterange", "weekrange", "monthrange", "yearrange", "quarterrange" ].includes(t.componentProps.type) }, { label: "结束占位符", type: "input", componentProps: { placeholder: "请输入" }, field: "componentProps.placeholder.1", show: ({ values: t }) => [ "daterange", "weekrange", "monthrange", "yearrange", "quarterrange" ].includes(t.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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", value: "small" } ] }, field: "componentProps.size" }, { label: "弹出框位置", type: "select", componentProps: { options: [ { label: "bottomLeft", value: "bottomLeft" }, { label: "bottomRight", value: "bottomRight" }, { label: "topLeft", value: "topLeft" }, { label: "topRight", value: "topRight" } ], placeholder: "请选择" }, 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: "校验规则需要配合表单使用" }, { label: "", type: "setRelevance", layout: "vertical", field: "componentProps.relevance" } ], event: [ { type: "change", describe: "值变化时" }, { type: "ok", describe: "点击确定按钮时" } ] }, bindModel: "modelValue" }, ye = { component: async () => (await import("ant-design-vue")).Cascader, groupName: "表单", icon: "epic-icon-guanlian", 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: "large", value: "large" }, { label: "middle", value: "middle" }, { label: "small", value: "small" } ] }, field: "componentProps.size" }, { label: "弹出框位置", type: "select", componentProps: { placeholder: "请选择", 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: t }) => t.componentProps.multiple }, { label: "标签显示数量", type: "number", field: "componentProps.maxTagCount", componentProps: { placeholder: "请输入"