epic-designer-cjh
Version:
基于vue3的设计器,可视化开发页面表单
559 lines (550 loc) • 17.1 kB
JavaScript
import { r as E } from "./_vue_commonjs-external-eb7fec7f.js";
import { d as K } from "./public_api-1267ff2a.js";
var $ = {}, L = {}, h = {}, N = {}, Q;
function ee() {
if (Q)
return N;
Q = 1, Object.defineProperty(N, "__esModule", {
value: !0
}), N.useInjectIconContext = N.useProvideIconContext = void 0;
var p = E, g = Symbol("iconContext"), S = function(I) {
return (0, p.provide)(g, I), I;
};
N.useProvideIconContext = S;
var b = function() {
return (0, p.inject)(g, {
prefixCls: (0, p.ref)("anticon"),
rootClassName: (0, p.ref)(""),
csp: (0, p.ref)()
});
};
return N.useInjectIconContext = b, N;
}
var A = {}, Y;
function se() {
if (Y)
return A;
Y = 1, Object.defineProperty(A, "__esModule", {
value: !0
}), A.canUseDom = p, A.injectCSS = O, A.removeCSS = a, A.clearContainerCache = i, A.updateCSS = s;
function p() {
return !!(typeof window < "u" && window.document && window.document.createElement);
}
function g(r, t) {
return r && r.contains ? r.contains(t) : !1;
}
var S = "data-vc-order", b = "vc-icon-key", _ = /* @__PURE__ */ new Map();
function I() {
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = r.mark;
return t ? t.startsWith("data-") ? t : "data-".concat(t) : b;
}
function C(r) {
if (r.attachTo)
return r.attachTo;
var t = document.querySelector("head");
return t || document.body;
}
function P(r) {
return r === "queue" ? "prependQueue" : r ? "prepend" : "append";
}
function T(r) {
return Array.from((_.get(r) || r).children).filter(function(t) {
return t.tagName === "STYLE";
});
}
function O(r) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (!p())
return null;
var o = t.csp, f = t.prepend, y = document.createElement("style");
y.setAttribute(S, P(f)), o && o.nonce && (y.nonce = o.nonce), y.innerHTML = r;
var n = C(t), l = n.firstChild;
if (f) {
if (f === "queue") {
var e = T(n).filter(function(u) {
return ["prepend", "prependQueue"].includes(u.getAttribute(S));
});
if (e.length)
return n.insertBefore(y, e[e.length - 1].nextSibling), y;
}
n.insertBefore(y, l);
} else
n.appendChild(y);
return y;
}
function j(r) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = C(t);
return T(o).find(function(f) {
return f.getAttribute(I(t)) === r;
});
}
function a(r) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = j(r, t);
if (o) {
var f = C(t);
f.removeChild(o);
}
}
function m(r, t) {
var o = _.get(r);
if (!o || !g(document, o)) {
var f = O("", t), y = f.parentNode;
_.set(r, y), r.removeChild(f);
}
}
function i() {
_.clear();
}
function s(r, t) {
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, f = C(o);
m(f, o);
var y = j(t, o);
if (y)
return o.csp && o.csp.nonce && y.nonce !== o.csp.nonce && (y.nonce = o.csp.nonce), y.innerHTML !== r && (y.innerHTML = r), y;
var n = O(r, o);
return n.setAttribute(I(o), t), n;
}
return A;
}
var F;
function M() {
if (F)
return h;
F = 1, Object.defineProperty(h, "__esModule", {
value: !0
}), h.warn = C, h.warning = P, h.isIconDefinition = O, h.normalizeAttrs = j, h.generate = a, h.getSecondaryColor = m, h.normalizeTwoToneColors = i, h.useInsertStyles = h.iconStyles = h.svgBaseProps = void 0;
var p = E, g = K, S = ee(), b = se();
function _(n) {
for (var l = 1; l < arguments.length; l++) {
var e = arguments[l] != null ? Object(arguments[l]) : {}, u = Object.keys(e);
typeof Object.getOwnPropertySymbols == "function" && (u = u.concat(Object.getOwnPropertySymbols(e).filter(function(c) {
return Object.getOwnPropertyDescriptor(e, c).enumerable;
}))), u.forEach(function(c) {
I(n, c, e[c]);
});
}
return n;
}
function I(n, l, e) {
return l in n ? Object.defineProperty(n, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : n[l] = e, n;
}
function C(n, l) {
process.env.NODE_ENV !== "production" && !n && console !== void 0 && console.error("Warning: ".concat(l));
}
function P(n, l) {
C(n, "[@ant-design/icons-vue] ".concat(l));
}
function T(n) {
return n.replace(/-(.)/g, function(l, e) {
return e.toUpperCase();
});
}
function O(n) {
return typeof n == "object" && typeof n.name == "string" && typeof n.theme == "string" && (typeof n.icon == "object" || typeof n.icon == "function");
}
function j() {
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
return Object.keys(n).reduce(function(l, e) {
var u = n[e];
switch (e) {
case "class":
l.className = u, delete l.class;
break;
default:
delete l[e], l[T(e)] = u;
}
return l;
}, {});
}
function a(n, l, e) {
return e ? (0, p.h)(n.tag, _({
key: l
}, e, n.attrs), (n.children || []).map(function(u, c) {
return a(u, "".concat(l, "-").concat(n.tag, "-").concat(c));
})) : (0, p.h)(n.tag, _({
key: l
}, n.attrs), (n.children || []).map(function(u, c) {
return a(u, "".concat(l, "-").concat(n.tag, "-").concat(c));
}));
}
function m(n) {
return (0, g.generate)(n)[0];
}
function i(n) {
return n ? Array.isArray(n) ? n : [n] : [];
}
var s = {
width: "1em",
height: "1em",
fill: "currentColor",
"aria-hidden": "true",
focusable: "false"
};
h.svgBaseProps = s;
var r = `
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`;
h.iconStyles = r;
function t(n) {
return n && n.getRootNode && n.getRootNode();
}
function o(n) {
return (0, b.canUseDom)() ? t(n) instanceof ShadowRoot : !1;
}
function f(n) {
return o(n) ? t(n) : null;
}
var y = function() {
var l = (0, S.useInjectIconContext)(), e = l.prefixCls, u = l.csp, c = (0, p.getCurrentInstance)(), d = r;
e && (d = d.replace(/anticon/g, e.value)), (0, p.nextTick)(function() {
if ((0, b.canUseDom)()) {
var v = c.vnode.el, w = f(v);
(0, b.updateCSS)(d, "@ant-design-vue-icons", {
prepend: !0,
csp: u.value,
attachTo: w
});
}
});
};
return h.useInsertStyles = y, h;
}
var G;
function ne() {
return G || (G = 1, function(p) {
Object.defineProperty(p, "__esModule", {
value: !0
}), p.default = void 0;
var g = M(), S = E, b = ["icon", "primaryColor", "secondaryColor"];
function _(i, s) {
if (i == null)
return {};
var r = I(i, s), t, o;
if (Object.getOwnPropertySymbols) {
var f = Object.getOwnPropertySymbols(i);
for (o = 0; o < f.length; o++)
t = f[o], !(s.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(i, t) && (r[t] = i[t]);
}
return r;
}
function I(i, s) {
if (i == null)
return {};
var r = {}, t = Object.keys(i), o, f;
for (f = 0; f < t.length; f++)
o = t[f], !(s.indexOf(o) >= 0) && (r[o] = i[o]);
return r;
}
function C(i) {
for (var s = 1; s < arguments.length; s++) {
var r = arguments[s] != null ? Object(arguments[s]) : {}, t = Object.keys(r);
typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(r).filter(function(o) {
return Object.getOwnPropertyDescriptor(r, o).enumerable;
}))), t.forEach(function(o) {
P(i, o, r[o]);
});
}
return i;
}
function P(i, s, r) {
return s in i ? Object.defineProperty(i, s, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[s] = r, i;
}
var T = (0, S.reactive)({
primaryColor: "#333",
secondaryColor: "#E6E6E6",
calculated: !1
});
function O(i) {
var s = i.primaryColor, r = i.secondaryColor;
T.primaryColor = s, T.secondaryColor = r || (0, g.getSecondaryColor)(s), T.calculated = !!r;
}
function j() {
return C({}, T);
}
var a = function(s, r) {
var t = C({}, s, r.attrs), o = t.icon, f = t.primaryColor, y = t.secondaryColor, n = _(t, b), l = T;
if (f && (l = {
primaryColor: f,
secondaryColor: y || (0, g.getSecondaryColor)(f)
}), (0, g.warning)((0, g.isIconDefinition)(o), "icon should be icon definiton, but got ".concat(o)), !(0, g.isIconDefinition)(o))
return null;
var e = o;
return e && typeof e.icon == "function" && (e = C({}, e, {
icon: e.icon(l.primaryColor, l.secondaryColor)
})), (0, g.generate)(e.icon, "svg-".concat(e.name), C({}, n, {
"data-icon": e.name,
width: "1em",
height: "1em",
fill: "currentColor",
"aria-hidden": "true"
}));
};
a.props = {
icon: Object,
primaryColor: String,
secondaryColor: String,
focusable: String
}, a.inheritAttrs = !1, a.displayName = "IconBase", a.getTwoToneColors = j, a.setTwoToneColors = O;
var m = a;
p.default = m;
}(L)), L;
}
var k = {}, J;
function fe() {
if (J)
return k;
J = 1, Object.defineProperty(k, "__esModule", {
value: !0
}), k.setTwoToneColor = O, k.getTwoToneColor = j;
var p = S(ne()), g = M();
function S(a) {
return a && a.__esModule ? a : { default: a };
}
function b(a, m) {
return T(a) || P(a, m) || I(a, m) || _();
}
function _() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function I(a, m) {
if (a) {
if (typeof a == "string")
return C(a, m);
var i = Object.prototype.toString.call(a).slice(8, -1);
if (i === "Object" && a.constructor && (i = a.constructor.name), i === "Map" || i === "Set")
return Array.from(a);
if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))
return C(a, m);
}
}
function C(a, m) {
(m == null || m > a.length) && (m = a.length);
for (var i = 0, s = new Array(m); i < m; i++)
s[i] = a[i];
return s;
}
function P(a, m) {
var i = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
if (i != null) {
var s = [], r = !0, t = !1, o, f;
try {
for (i = i.call(a); !(r = (o = i.next()).done) && (s.push(o.value), !(m && s.length === m)); r = !0)
;
} catch (y) {
t = !0, f = y;
} finally {
try {
!r && i.return != null && i.return();
} finally {
if (t)
throw f;
}
}
return s;
}
}
function T(a) {
if (Array.isArray(a))
return a;
}
function O(a) {
var m = (0, g.normalizeTwoToneColors)(a), i = b(m, 2), s = i[0], r = i[1];
return p.default.setTwoToneColors({
primaryColor: s,
secondaryColor: r
});
}
function j() {
var a = p.default.getTwoToneColors();
return a.calculated ? [a.primaryColor, a.secondaryColor] : a.primaryColor;
}
return k;
}
var q = {}, X;
function de() {
if (X)
return q;
X = 1, Object.defineProperty(q, "__esModule", {
value: !0
}), q.InsertStyles = void 0;
var p = E, g = M(), S = (0, p.defineComponent)({
name: "InsertStyles",
setup: function() {
return (0, g.useInsertStyles)(), function() {
return null;
};
}
});
return q.InsertStyles = S, q;
}
var Z;
function ye() {
return Z || (Z = 1, function(p) {
Object.defineProperty(p, "__esModule", {
value: !0
}), p.default = void 0;
var g = E, S = O(ne()), b = fe(), _ = M(), I = K, C = ee(), P = de(), T = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function O(e) {
return e && e.__esModule ? e : { default: e };
}
function j(e, u) {
return r(e) || s(e, u) || m(e, u) || a();
}
function a() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function m(e, u) {
if (e) {
if (typeof e == "string")
return i(e, u);
var c = Object.prototype.toString.call(e).slice(8, -1);
if (c === "Object" && e.constructor && (c = e.constructor.name), c === "Map" || c === "Set")
return Array.from(e);
if (c === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))
return i(e, u);
}
}
function i(e, u) {
(u == null || u > e.length) && (u = e.length);
for (var c = 0, d = new Array(u); c < u; c++)
d[c] = e[c];
return d;
}
function s(e, u) {
var c = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (c != null) {
var d = [], v = !0, w = !1, x, D;
try {
for (c = c.call(e); !(v = (x = c.next()).done) && (d.push(x.value), !(u && d.length === u)); v = !0)
;
} catch (R) {
w = !0, D = R;
} finally {
try {
!v && c.return != null && c.return();
} finally {
if (w)
throw D;
}
}
return d;
}
}
function r(e) {
if (Array.isArray(e))
return e;
}
function t(e) {
for (var u = 1; u < arguments.length; u++) {
var c = arguments[u] != null ? Object(arguments[u]) : {}, d = Object.keys(c);
typeof Object.getOwnPropertySymbols == "function" && (d = d.concat(Object.getOwnPropertySymbols(c).filter(function(v) {
return Object.getOwnPropertyDescriptor(c, v).enumerable;
}))), d.forEach(function(v) {
o(e, v, c[v]);
});
}
return e;
}
function o(e, u, c) {
return u in e ? Object.defineProperty(e, u, { value: c, enumerable: !0, configurable: !0, writable: !0 }) : e[u] = c, e;
}
function f(e, u) {
if (e == null)
return {};
var c = y(e, u), d, v;
if (Object.getOwnPropertySymbols) {
var w = Object.getOwnPropertySymbols(e);
for (v = 0; v < w.length; v++)
d = w[v], !(u.indexOf(d) >= 0) && Object.prototype.propertyIsEnumerable.call(e, d) && (c[d] = e[d]);
}
return c;
}
function y(e, u) {
if (e == null)
return {};
var c = {}, d = Object.keys(e), v, w;
for (w = 0; w < d.length; w++)
v = d[w], !(u.indexOf(v) >= 0) && (c[v] = e[v]);
return c;
}
(0, b.setTwoToneColor)(I.blue.primary);
var n = function(u, c) {
var d, v = t({}, u, c.attrs), w = v.class, x = v.icon, D = v.spin, R = v.rotate, re = v.tabindex, te = v.twoToneColor, U = v.onClick, oe = f(v, T), W = (0, C.useInjectIconContext)(), B = W.prefixCls, H = W.rootClassName, ae = (d = {}, o(d, H.value, !!H.value), o(d, B.value, !0), o(d, "".concat(B.value, "-").concat(x.name), !!x.name), o(d, "".concat(B.value, "-spin"), !!D || x.name === "loading"), d), z = re;
z === void 0 && U && (z = -1);
var ie = R ? {
msTransform: "rotate(".concat(R, "deg)"),
transform: "rotate(".concat(R, "deg)")
} : void 0, ue = (0, _.normalizeTwoToneColors)(te), V = j(ue, 2), ce = V[0], le = V[1];
return (0, g.createVNode)("span", t({
role: "img",
"aria-label": x.name
}, oe, {
onClick: U,
class: [ae, w],
tabindex: z
}), [(0, g.createVNode)(S.default, {
icon: x,
primaryColor: ce,
secondaryColor: le,
style: ie
}, null), (0, g.createVNode)(P.InsertStyles, null, null)]);
};
n.props = {
spin: Boolean,
rotate: Number,
icon: Object,
twoToneColor: [String, Array]
}, n.displayName = "AntdIcon", n.inheritAttrs = !1, n.getTwoToneColor = b.getTwoToneColor, n.setTwoToneColor = b.setTwoToneColor;
var l = n;
p.default = l;
}($)), $;
}
export {
ye as r
};