@me-framework/me-ui-antdv-next 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/me-ui-antdv-next.js +661 -449
- package/dist/me-ui-antdv-next.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/dist/tree-menu/TreeMenuEdit.vue.d.ts +2 -2
- package/dist/tree-menu/index.css +1 -1
- package/dist/tree-menu/index.js +394 -182
- package/dist/tree-menu/index.vue.d.ts +10 -8
- package/package.json +1 -1
package/dist/me-ui-antdv-next.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, inject as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, onUnmounted as S, openBlock as C, provide as w, reactive as T, ref as E, render as D, renderList as O, renderSlot as k, resolveComponent as A, resolveDynamicComponent as j, shallowRef as M, toDisplayString as N, unref as P, useAttrs as F, useSlots as I, vShow as L, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
2
2
|
import { message as H, theme as ee } from "antdv-next";
|
|
3
3
|
import * as U from "@lucide/vue";
|
|
4
|
-
import { Check as W, ChevronDown as te, ChevronLeft as G, ChevronRight as K, Copy as q, Download as J, FileCode as
|
|
5
|
-
import { useDraggable as
|
|
6
|
-
import
|
|
4
|
+
import { Check as W, ChevronDown as te, ChevronLeft as G, ChevronRight as K, Copy as q, Download as J, FileCode as Y, Maximize as ne, Maximize2 as re, Minimize as X, Minimize2 as Z, Upload as Q, X as ie } from "@lucide/vue";
|
|
5
|
+
import { useDraggable as ae } from "vue-draggable-plus";
|
|
6
|
+
import $ from "dayjs";
|
|
7
7
|
//#region \0rolldown/runtime.js
|
|
8
|
-
var
|
|
9
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
8
|
+
var oe = Object.create, se = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, le = Object.getOwnPropertyNames, ue = Object.getPrototypeOf, de = Object.prototype.hasOwnProperty, fe = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), pe = (e, t, n, r) => {
|
|
9
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = le(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !de.call(e, s) && s !== n && se(e, s, {
|
|
10
10
|
get: ((e) => t[e]).bind(null, s),
|
|
11
|
-
enumerable: !(r =
|
|
11
|
+
enumerable: !(r = ce(t, s)) || r.enumerable
|
|
12
12
|
});
|
|
13
13
|
return e;
|
|
14
|
-
}, me = (e, t, n) => (n = e == null ? {} :
|
|
14
|
+
}, me = (e, t, n) => (n = e == null ? {} : oe(ue(e)), pe(t || !e || !e.__esModule || !de.call(e, "default") ? se(n, "default", {
|
|
15
15
|
value: e,
|
|
16
16
|
enumerable: !0
|
|
17
17
|
}) : n, e)), he = { class: "me-message__footer" }, ge = { class: "me-message__actions" }, _e = { class: "me-message__header" }, ve = ["innerHTML"], ye = /* @__PURE__ */ d({
|
|
@@ -122,13 +122,13 @@ var se = Object.create, ce = Object.defineProperty, le = Object.getOwnPropertyDe
|
|
|
122
122
|
t(!0);
|
|
123
123
|
}) : t(!0);
|
|
124
124
|
});
|
|
125
|
-
},
|
|
125
|
+
}, Y = async () => {
|
|
126
126
|
if (w) {
|
|
127
127
|
w = !1, y = !1;
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
y || (y = !0, await q(d.handler?.cancel) ? h.value = !1 : (v.value = "normal", y = !1));
|
|
131
|
-
},
|
|
131
|
+
}, ne = async () => {
|
|
132
132
|
if (y) return;
|
|
133
133
|
y = !0, v.value = "process";
|
|
134
134
|
let e = !0;
|
|
@@ -147,14 +147,14 @@ var se = Object.create, ce = Object.defineProperty, le = Object.getOwnPropertyDe
|
|
|
147
147
|
"mask-closable": !1,
|
|
148
148
|
keyboard: !1,
|
|
149
149
|
"wrap-class-name": "me-message-modal",
|
|
150
|
-
onCancel:
|
|
150
|
+
onCancel: Y
|
|
151
151
|
}, {
|
|
152
152
|
footer: z(() => [s("div", he, [k(t.$slots, "me-message-footer", {}, () => [n[3] ||= s("div", null, null, -1), s("div", ge, [te.value ? (C(), i(r, {
|
|
153
153
|
key: 0,
|
|
154
154
|
type: "link",
|
|
155
155
|
class: "me-message__cancel",
|
|
156
156
|
autoInsertSpace: !1,
|
|
157
|
-
onClick:
|
|
157
|
+
onClick: Y
|
|
158
158
|
}, {
|
|
159
159
|
default: z(() => [...n[1] ||= [l("取消 ", -1)]]),
|
|
160
160
|
_: 1
|
|
@@ -164,7 +164,7 @@ var se = Object.create, ce = Object.defineProperty, le = Object.getOwnPropertyDe
|
|
|
164
164
|
loading: U.value,
|
|
165
165
|
autoInsertSpace: !1,
|
|
166
166
|
class: _(["me-message__confirm", `me-message__confirm--${W.value}`]),
|
|
167
|
-
onClick:
|
|
167
|
+
onClick: ne
|
|
168
168
|
}, {
|
|
169
169
|
default: z(() => [...n[2] ||= [l(" 确定 ", -1)]]),
|
|
170
170
|
_: 1
|
|
@@ -1080,7 +1080,7 @@ var it = rt, at = (e) => {
|
|
|
1080
1080
|
childrenField: d.childrenField,
|
|
1081
1081
|
hideDisabled: d.hideDisabled,
|
|
1082
1082
|
showHidden: d.showHidden
|
|
1083
|
-
})), I = (e) => st(e, d.keyField), V = (e) => ct(e, d.childrenField), H = (e) => lt(e, F.value), ee = (e) => ut(e, F.value), U = (e, t) => dt(e, t, F.value), W = (e) => ft(e, F.value), q = (e) => pt(e, F.value), J = () => mt(d.data, F.value),
|
|
1083
|
+
})), I = (e) => st(e, d.keyField), V = (e) => ct(e, d.childrenField), H = (e) => lt(e, F.value), ee = (e) => ut(e, F.value), U = (e, t) => dt(e, t, F.value), W = (e) => ft(e, F.value), q = (e) => pt(e, F.value), J = () => mt(d.data, F.value), Y = (e) => e.meta?.type === "group" || ee(e).length > 0;
|
|
1084
1084
|
w(ot, T({
|
|
1085
1085
|
get keyField() {
|
|
1086
1086
|
return d.keyField;
|
|
@@ -1104,46 +1104,46 @@ var it = rt, at = (e) => {
|
|
|
1104
1104
|
getVisibleChildren: ee,
|
|
1105
1105
|
resolveBadgeColor: at
|
|
1106
1106
|
}));
|
|
1107
|
-
let
|
|
1107
|
+
let ne = r(() => typeof d.height == "number" ? `${d.height}px` : d.height), re = r(() => {
|
|
1108
1108
|
if (!d.background) return {};
|
|
1109
1109
|
let e = d.background.trim();
|
|
1110
1110
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("data:") ? {
|
|
1111
1111
|
backgroundImage: D.value ? `linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 80%)), url(${e})` : `url(${e})`,
|
|
1112
1112
|
backgroundSize: "cover"
|
|
1113
1113
|
} : { background: e };
|
|
1114
|
-
}),
|
|
1114
|
+
}), X = r(() => b.value), Z = r(() => pe.value.length > 0), Q = r(() => typeof d.leftWidth == "number" ? `${d.leftWidth}px` : d.leftWidth), ie = r(() => typeof d.rightWidth == "number" ? `${d.rightWidth}px` : d.rightWidth), ae = r(() => {
|
|
1115
1115
|
let e = {};
|
|
1116
1116
|
if (d.collapseDuration !== void 0) {
|
|
1117
1117
|
let t = d.collapseDuration;
|
|
1118
1118
|
e["--me-menu-transition-duration"] = typeof t == "number" || /^\d+(\.\d+)?$/.test(t) ? `${t}ms` : t;
|
|
1119
1119
|
}
|
|
1120
1120
|
return d.collapseAnimation !== void 0 && (e["--me-menu-transition-timing"] = d.collapseAnimation), e;
|
|
1121
|
-
}),
|
|
1121
|
+
}), $ = E(0), oe = r(() => {
|
|
1122
1122
|
let e = Number.parseFloat(String(d.leftWidth)) || 0, t = Number.parseFloat(String(d.rightWidth)) || 0;
|
|
1123
1123
|
return {
|
|
1124
|
-
left: `${(
|
|
1125
|
-
top: `${
|
|
1124
|
+
left: `${(Z.value && !b.value ? e + t : e) - 8}px`,
|
|
1125
|
+
top: `${$.value}px`
|
|
1126
1126
|
};
|
|
1127
|
-
}),
|
|
1128
|
-
if (!d.showRightToggle || !
|
|
1127
|
+
}), se = E(!1), ce = (e) => {
|
|
1128
|
+
if (!d.showRightToggle || !Z.value) return;
|
|
1129
1129
|
let t = e.currentTarget, n = t.querySelector(".me-menu__right"), r = n && n.offsetParent !== null ? n : t.querySelector(".me-menu__left");
|
|
1130
1130
|
if (!r) return;
|
|
1131
1131
|
let i = r.getBoundingClientRect(), a = Math.abs(e.clientX - i.right) <= 16;
|
|
1132
|
-
if (a && !
|
|
1132
|
+
if (a && !se.value) {
|
|
1133
1133
|
let n = t.getBoundingClientRect();
|
|
1134
|
-
|
|
1134
|
+
$.value = Math.max(36, Math.min(e.clientY - n.top, n.height - 8 - 28));
|
|
1135
1135
|
}
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1138
|
-
|
|
1139
|
-
},
|
|
1140
|
-
let e = V(
|
|
1136
|
+
se.value = a;
|
|
1137
|
+
}, le = () => {
|
|
1138
|
+
se.value = !1;
|
|
1139
|
+
}, ue = r(() => d.data.filter((e) => e[d.parentField] === "0" && H(e)).sort((e, t) => e.sort - t.sort)), de = r(() => h.value ? h.value : d.activeId ? d.activeId : d.defaultActiveId ? d.defaultActiveId : ue.value[0] ? I(ue.value[0]) : ""), fe = r(() => de.value && ue.value.find((e) => I(e) === de.value) || null), pe = r(() => {
|
|
1140
|
+
let e = V(fe.value);
|
|
1141
1141
|
return e.length ? e.filter((e) => H(e)).sort((e, t) => e.sort - t.sort) : [];
|
|
1142
1142
|
}), me = r(() => g.value ? g.value : d.selectedId ? d.selectedId : d.defaultSelectedId ? d.defaultSelectedId : ""), he = r(() => me.value ? U(d.data, me.value) : null);
|
|
1143
1143
|
R(() => me.value, (e) => {
|
|
1144
1144
|
if (!e) return;
|
|
1145
1145
|
ye(e);
|
|
1146
|
-
let t = U(
|
|
1146
|
+
let t = U(pe.value, e);
|
|
1147
1147
|
if (t && !W(t)) {
|
|
1148
1148
|
let e = q(t);
|
|
1149
1149
|
if (e) {
|
|
@@ -1154,7 +1154,7 @@ var it = rt, at = (e) => {
|
|
|
1154
1154
|
});
|
|
1155
1155
|
let ge = (e) => {
|
|
1156
1156
|
v.value.has(e) ? v.value.delete(e) : v.value.add(e);
|
|
1157
|
-
}, _e = (e) => v.value.has(e), ve = (e, t =
|
|
1157
|
+
}, _e = (e) => v.value.has(e), ve = (e, t = pe.value) => {
|
|
1158
1158
|
for (let n of t) {
|
|
1159
1159
|
let t = ee(n);
|
|
1160
1160
|
if (t.some((t) => I(t) === e)) return [I(n)];
|
|
@@ -1173,9 +1173,9 @@ var it = rt, at = (e) => {
|
|
|
1173
1173
|
let t = e.meta?.path;
|
|
1174
1174
|
t && p.push(t);
|
|
1175
1175
|
};
|
|
1176
|
-
R(() =>
|
|
1177
|
-
let e = d.selectedId || g.value || d.defaultSelectedId, t = U(
|
|
1178
|
-
if (t &&
|
|
1176
|
+
R(() => de.value, () => {
|
|
1177
|
+
let e = d.selectedId || g.value || d.defaultSelectedId, t = U(pe.value, e);
|
|
1178
|
+
if (t && pe.value.length > 0) {
|
|
1179
1179
|
if (ye(e), W(t)) {
|
|
1180
1180
|
g.value !== e && (g.value = e);
|
|
1181
1181
|
return;
|
|
@@ -1187,13 +1187,13 @@ var it = rt, at = (e) => {
|
|
|
1187
1187
|
return;
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
|
-
let n =
|
|
1190
|
+
let n = fe.value;
|
|
1191
1191
|
if (n && W(n)) {
|
|
1192
1192
|
let e = I(n);
|
|
1193
1193
|
g.value !== e && (g.value = e, f("update:selectedId", e), f("select", n), be(n));
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
|
-
let r =
|
|
1196
|
+
let r = pe.value[0] ? q(pe.value[0]) : null;
|
|
1197
1197
|
if (r) {
|
|
1198
1198
|
let e = I(r);
|
|
1199
1199
|
g.value = e, ye(e), f("update:selectedId", e), f("select", r), be(r);
|
|
@@ -1221,32 +1221,32 @@ var it = rt, at = (e) => {
|
|
|
1221
1221
|
},
|
|
1222
1222
|
selectedItem: he,
|
|
1223
1223
|
toggleRightCollapse: xe,
|
|
1224
|
-
rightCollapsed:
|
|
1224
|
+
rightCollapsed: X,
|
|
1225
1225
|
getHome: () => J()
|
|
1226
1226
|
}), (r, c) => {
|
|
1227
1227
|
let l = A("a-badge");
|
|
1228
1228
|
return C(), o("div", {
|
|
1229
1229
|
class: "me-menu",
|
|
1230
1230
|
style: y({
|
|
1231
|
-
height:
|
|
1232
|
-
...
|
|
1231
|
+
height: ne.value,
|
|
1232
|
+
...ae.value
|
|
1233
1233
|
}),
|
|
1234
|
-
onMousemove:
|
|
1235
|
-
onMouseleave:
|
|
1234
|
+
onMousemove: ce,
|
|
1235
|
+
onMouseleave: le
|
|
1236
1236
|
}, [
|
|
1237
1237
|
s("div", {
|
|
1238
1238
|
class: "me-menu__left",
|
|
1239
1239
|
style: y({
|
|
1240
|
-
width:
|
|
1241
|
-
...
|
|
1240
|
+
width: Q.value,
|
|
1241
|
+
...re.value
|
|
1242
1242
|
})
|
|
1243
1243
|
}, [
|
|
1244
1244
|
s("div", yt, [k(r.$slots, "logo", {}, () => [c[0] ||= s("span", { class: "me-menu__logo-text" }, "MeMenu", -1)])]),
|
|
1245
|
-
s("div", bt, [(C(!0), o(e, null, O(
|
|
1245
|
+
s("div", bt, [(C(!0), o(e, null, O(ue.value, (t) => (C(), o(e, { key: I(t) }, [t.meta?.divider ? (C(), o("div", xt)) : a("", !0), s("div", {
|
|
1246
1246
|
class: _(["me-menu__left-item", {
|
|
1247
|
-
"is-active":
|
|
1247
|
+
"is-active": de.value === I(t),
|
|
1248
1248
|
"is-disabled": !t.enableFlag,
|
|
1249
|
-
"is-static":
|
|
1249
|
+
"is-static": de.value === I(t)
|
|
1250
1250
|
}]),
|
|
1251
1251
|
onClick: (e) => Se(t)
|
|
1252
1252
|
}, [
|
|
@@ -1274,8 +1274,8 @@ var it = rt, at = (e) => {
|
|
|
1274
1274
|
], 4),
|
|
1275
1275
|
B(s("div", {
|
|
1276
1276
|
class: _(["me-menu__right", { "is-collapsed": b.value }]),
|
|
1277
|
-
style: y({ "--me-menu-right-width":
|
|
1278
|
-
}, [s("div", Tt, [(C(!0), o(e, null, O(
|
|
1277
|
+
style: y({ "--me-menu-right-width": ie.value })
|
|
1278
|
+
}, [s("div", Tt, [(C(!0), o(e, null, O(pe.value, (t) => (C(), o(e, { key: I(t) }, [Y(t) ? (C(), o(e, { key: 0 }, [s("div", Et, [s("div", {
|
|
1279
1279
|
class: "me-menu__section-header",
|
|
1280
1280
|
onClick: (e) => ge(I(t))
|
|
1281
1281
|
}, [u(P(te), {
|
|
@@ -1316,13 +1316,13 @@ var it = rt, at = (e) => {
|
|
|
1316
1316
|
"dot",
|
|
1317
1317
|
"color"
|
|
1318
1318
|
])) : a("", !0)
|
|
1319
|
-
], 10, At))], 64))), 128))])], 6), [[L,
|
|
1319
|
+
], 10, At))], 64))), 128))])], 6), [[L, Z.value]]),
|
|
1320
1320
|
t.showRightToggle ? (C(), o("div", {
|
|
1321
1321
|
key: 0,
|
|
1322
|
-
class: _(["me-menu__right-toggle", { "is-visible":
|
|
1323
|
-
style: y(
|
|
1322
|
+
class: _(["me-menu__right-toggle", { "is-visible": se.value }]),
|
|
1323
|
+
style: y(oe.value),
|
|
1324
1324
|
onClick: xe
|
|
1325
|
-
}, [k(r.$slots, "right-toggle", { collapsed:
|
|
1325
|
+
}, [k(r.$slots, "right-toggle", { collapsed: X.value }, () => [X.value ? (C(), i(P(K), {
|
|
1326
1326
|
key: 0,
|
|
1327
1327
|
size: 14
|
|
1328
1328
|
})) : (C(), i(P(G), {
|
|
@@ -1531,39 +1531,39 @@ var It = {
|
|
|
1531
1531
|
"close-all"
|
|
1532
1532
|
],
|
|
1533
1533
|
setup(t, { expose: n, emit: c }) {
|
|
1534
|
-
let l = t, d = c, f = r(() => l.tabProps.key ?? "path"), m = r(() => l.tabProps.label ?? "title"), h = r(() => l.tabProps.isHome ?? "isHome"), v = r(() => l.tabProps.lock ?? "lock"), S = r(() => l.tabProps.icon ?? "icon"), w = r(() => l.width ? typeof l.width == "number" ? `${l.width}px` : l.width : ""), T = r(() => l.titleMaxWidth === void 0 ? {} : { maxWidth: typeof l.titleMaxWidth == "number" ? `${l.titleMaxWidth}px` : l.titleMaxWidth }), D = r(() => l.titleMaxWidth !== void 0), M = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, F = E(null), I = E(null), L = E(null), B = E(l.modelValue), { translateX: H, showLeftArrow: ee, showRightArrow: W, isSmooth: te, isScrollable: G, withSmooth: K, updateArrowVisibility: q, clampTranslateX: J, scrollLeft:
|
|
1534
|
+
let l = t, d = c, f = r(() => l.tabProps.key ?? "path"), m = r(() => l.tabProps.label ?? "title"), h = r(() => l.tabProps.isHome ?? "isHome"), v = r(() => l.tabProps.lock ?? "lock"), S = r(() => l.tabProps.icon ?? "icon"), w = r(() => l.width ? typeof l.width == "number" ? `${l.width}px` : l.width : ""), T = r(() => l.titleMaxWidth === void 0 ? {} : { maxWidth: typeof l.titleMaxWidth == "number" ? `${l.titleMaxWidth}px` : l.titleMaxWidth }), D = r(() => l.titleMaxWidth !== void 0), M = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, F = E(null), I = E(null), L = E(null), B = E(l.modelValue), { translateX: H, showLeftArrow: ee, showRightArrow: W, isSmooth: te, isScrollable: G, withSmooth: K, updateArrowVisibility: q, clampTranslateX: J, scrollLeft: Y, scrollRight: ne, canScroll: re } = Pt(I, L), X = null;
|
|
1535
1535
|
R(H, (e) => {
|
|
1536
|
-
|
|
1537
|
-
|
|
1536
|
+
X === null && (X = requestAnimationFrame(() => {
|
|
1537
|
+
X = null, d("scroll", e);
|
|
1538
1538
|
}));
|
|
1539
1539
|
}), b(() => {
|
|
1540
|
-
|
|
1540
|
+
X !== null && cancelAnimationFrame(X);
|
|
1541
1541
|
});
|
|
1542
|
-
let { isDragging:
|
|
1543
|
-
canScroll:
|
|
1542
|
+
let { isDragging: Z, handleDragStart: Q, handleTouchStart: ie, setDragRefs: ae, getHasDragged: $, resetHasDragged: oe } = Ft({
|
|
1543
|
+
canScroll: re,
|
|
1544
1544
|
translateX: H,
|
|
1545
1545
|
clampTranslateX: J,
|
|
1546
1546
|
updateArrowVisibility: q
|
|
1547
|
-
}),
|
|
1548
|
-
if (!
|
|
1547
|
+
}), se = 0, ce = null, le = (e) => {
|
|
1548
|
+
if (!re()) return;
|
|
1549
1549
|
let t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
|
|
1550
|
-
t !== 0 && (e.preventDefault(),
|
|
1551
|
-
|
|
1550
|
+
t !== 0 && (e.preventDefault(), se += t, ce === null && (ce = requestAnimationFrame(() => {
|
|
1551
|
+
ce = null, H.value -= se, se = 0, J(), q();
|
|
1552
1552
|
})));
|
|
1553
1553
|
};
|
|
1554
1554
|
b(() => {
|
|
1555
|
-
|
|
1555
|
+
ce !== null && cancelAnimationFrame(ce);
|
|
1556
1556
|
});
|
|
1557
|
-
let
|
|
1558
|
-
t && t instanceof HTMLElement &&
|
|
1557
|
+
let ue = /* @__PURE__ */ new Map(), de = (e, t) => {
|
|
1558
|
+
t && t instanceof HTMLElement && ue.set(e, t);
|
|
1559
1559
|
};
|
|
1560
1560
|
R(() => l.tabList, (e) => {
|
|
1561
1561
|
let t = new Set(e.map((e) => e[f.value]));
|
|
1562
|
-
for (let e of
|
|
1562
|
+
for (let e of ue.keys()) t.has(e) || ue.delete(e);
|
|
1563
1563
|
}, { flush: "post" });
|
|
1564
|
-
let
|
|
1564
|
+
let fe = (e) => {
|
|
1565
1565
|
g(() => {
|
|
1566
|
-
let t =
|
|
1566
|
+
let t = ue.get(e);
|
|
1567
1567
|
if (!t || !I.value || !L.value) return;
|
|
1568
1568
|
let n = I.value.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
1569
1569
|
if (r.left >= n.left && r.right <= n.right) return;
|
|
@@ -1576,9 +1576,9 @@ var It = {
|
|
|
1576
1576
|
});
|
|
1577
1577
|
}));
|
|
1578
1578
|
});
|
|
1579
|
-
},
|
|
1579
|
+
}, pe = (e) => {
|
|
1580
1580
|
let t = e ?? B.value;
|
|
1581
|
-
t &&
|
|
1581
|
+
t && fe(t);
|
|
1582
1582
|
}, me = () => {
|
|
1583
1583
|
K(() => {
|
|
1584
1584
|
H.value = 0, J(), q();
|
|
@@ -1681,20 +1681,20 @@ var It = {
|
|
|
1681
1681
|
event: {}
|
|
1682
1682
|
});
|
|
1683
1683
|
}, Ce = (e, t) => {
|
|
1684
|
-
if (
|
|
1685
|
-
|
|
1684
|
+
if ($()) {
|
|
1685
|
+
oe();
|
|
1686
1686
|
return;
|
|
1687
1687
|
}
|
|
1688
1688
|
let n = e[f.value];
|
|
1689
1689
|
if (B.value === n) {
|
|
1690
|
-
|
|
1690
|
+
pe(n);
|
|
1691
1691
|
return;
|
|
1692
1692
|
}
|
|
1693
1693
|
B.value = n, d("update:modelValue", n), d("tab-change", {
|
|
1694
1694
|
name: n,
|
|
1695
1695
|
item: e,
|
|
1696
1696
|
index: t
|
|
1697
|
-
}),
|
|
1697
|
+
}), pe(n);
|
|
1698
1698
|
}, we = async (e, t) => {
|
|
1699
1699
|
let n = t ?? l.tabList.findIndex((t) => t[f.value] === e), r = l.tabList[n];
|
|
1700
1700
|
if (r && ge(r)) {
|
|
@@ -1735,7 +1735,7 @@ var It = {
|
|
|
1735
1735
|
name: e,
|
|
1736
1736
|
item: r,
|
|
1737
1737
|
index: n
|
|
1738
|
-
}),
|
|
1738
|
+
}), pe(e);
|
|
1739
1739
|
}
|
|
1740
1740
|
} else if ((e.key === "Delete" || e.key === "Backspace") && t > -1) {
|
|
1741
1741
|
let e = l.tabList[t];
|
|
@@ -1743,32 +1743,32 @@ var It = {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
1745
|
R(() => l.modelValue, (e) => {
|
|
1746
|
-
B.value = e,
|
|
1746
|
+
B.value = e, pe(e);
|
|
1747
1747
|
}), R(() => l.tabList, () => {
|
|
1748
1748
|
g(() => {
|
|
1749
|
-
|
|
1749
|
+
pe(B.value), q();
|
|
1750
1750
|
});
|
|
1751
1751
|
}, {
|
|
1752
1752
|
flush: "post",
|
|
1753
1753
|
deep: !0
|
|
1754
1754
|
}), R(() => l.width, () => {
|
|
1755
1755
|
g(() => {
|
|
1756
|
-
J(), q(),
|
|
1756
|
+
J(), q(), pe(B.value);
|
|
1757
1757
|
});
|
|
1758
1758
|
});
|
|
1759
1759
|
let Ee = null, De = () => {
|
|
1760
|
-
J(), q(),
|
|
1760
|
+
J(), q(), pe(B.value);
|
|
1761
1761
|
};
|
|
1762
1762
|
return x(() => {
|
|
1763
|
-
|
|
1764
|
-
q(), B.value &&
|
|
1763
|
+
ae(I.value, L.value), g(() => {
|
|
1764
|
+
q(), B.value && pe(B.value);
|
|
1765
1765
|
}), typeof ResizeObserver < "u" && I.value && (Ee = new ResizeObserver(() => {
|
|
1766
1766
|
De();
|
|
1767
1767
|
}), Ee.observe(I.value));
|
|
1768
1768
|
}), b(() => {
|
|
1769
|
-
Ee &&= (Ee.disconnect(), null),
|
|
1769
|
+
Ee &&= (Ee.disconnect(), null), ue.clear();
|
|
1770
1770
|
}), n({
|
|
1771
|
-
scrollTo:
|
|
1771
|
+
scrollTo: pe,
|
|
1772
1772
|
scrollToStart: me,
|
|
1773
1773
|
scrollToEnd: he,
|
|
1774
1774
|
activeItem: r(() => l.tabList.find((e) => e[f.value] === B.value))
|
|
@@ -1788,21 +1788,21 @@ var It = {
|
|
|
1788
1788
|
class: _(["me-nav__arrow me-nav__arrow--left", { "is-hidden": !P(ee) }]),
|
|
1789
1789
|
role: "button",
|
|
1790
1790
|
"aria-label": "向左滚动",
|
|
1791
|
-
onClick: r[0] ||= (...e) => P(
|
|
1791
|
+
onClick: r[0] ||= (...e) => P(Y) && P(Y)(...e)
|
|
1792
1792
|
}, [u(Me, {
|
|
1793
1793
|
name: "ChevronLeft",
|
|
1794
1794
|
size: 14
|
|
1795
1795
|
})], 2),
|
|
1796
1796
|
s("div", {
|
|
1797
1797
|
class: _(["me-nav__scroll", {
|
|
1798
|
-
"is-dragging": P(
|
|
1798
|
+
"is-dragging": P(Z),
|
|
1799
1799
|
"is-scrollable": P(G)
|
|
1800
1800
|
}]),
|
|
1801
1801
|
ref_key: "scrollRef",
|
|
1802
1802
|
ref: I,
|
|
1803
|
-
onWheel:
|
|
1804
|
-
onMousedown: r[1] ||= (...e) => P(
|
|
1805
|
-
onTouchstartPassive: r[2] ||= (...e) => P(
|
|
1803
|
+
onWheel: le,
|
|
1804
|
+
onMousedown: r[1] ||= (...e) => P(Q) && P(Q)(...e),
|
|
1805
|
+
onTouchstartPassive: r[2] ||= (...e) => P(ie) && P(ie)(...e),
|
|
1806
1806
|
onContextmenu: r[3] ||= V(() => {}, ["prevent"])
|
|
1807
1807
|
}, [
|
|
1808
1808
|
t.edgeFade && P(ee) ? (C(), o("div", Lt)) : a("", !0),
|
|
@@ -1823,7 +1823,7 @@ var It = {
|
|
|
1823
1823
|
default: z(() => [s("div", {
|
|
1824
1824
|
class: _(["me-nav__tab", { "is-active": B.value === e[f.value] }]),
|
|
1825
1825
|
ref_for: !0,
|
|
1826
|
-
ref: (t) =>
|
|
1826
|
+
ref: (t) => de(e[f.value], t),
|
|
1827
1827
|
role: "tab",
|
|
1828
1828
|
"aria-selected": B.value === e[f.value],
|
|
1829
1829
|
tabindex: B.value === e[f.value] ? 0 : -1,
|
|
@@ -1879,7 +1879,7 @@ var It = {
|
|
|
1879
1879
|
class: _(["me-nav__arrow me-nav__arrow--right", { "is-hidden": !P(W) }]),
|
|
1880
1880
|
role: "button",
|
|
1881
1881
|
"aria-label": "向右滚动",
|
|
1882
|
-
onClick: r[4] ||= (...e) => P(
|
|
1882
|
+
onClick: r[4] ||= (...e) => P(ne) && P(ne)(...e)
|
|
1883
1883
|
}, [u(Me, {
|
|
1884
1884
|
name: "ChevronRight",
|
|
1885
1885
|
size: 14
|
|
@@ -2149,10 +2149,10 @@ var Kt = Gt, qt = { class: "me-skeleton__card-body" }, Jt = { class: "me-skeleto
|
|
|
2149
2149
|
type: "button",
|
|
2150
2150
|
title: g.value ? "退出全屏" : "全屏",
|
|
2151
2151
|
onClick: V(S, ["stop"])
|
|
2152
|
-
}, [g.value ? (C(), i(P(
|
|
2152
|
+
}, [g.value ? (C(), i(P(X), {
|
|
2153
2153
|
key: 1,
|
|
2154
2154
|
size: 16
|
|
2155
|
-
})) : (C(), i(P(
|
|
2155
|
+
})) : (C(), i(P(ne), {
|
|
2156
2156
|
key: 0,
|
|
2157
2157
|
size: 16
|
|
2158
2158
|
}))], 8, tn)) : a("", !0), e.closable ? (C(), o("button", {
|
|
@@ -2161,7 +2161,7 @@ var Kt = Gt, qt = { class: "me-skeleton__card-body" }, Jt = { class: "me-skeleto
|
|
|
2161
2161
|
type: "button",
|
|
2162
2162
|
title: "关闭",
|
|
2163
2163
|
onClick: V(w, ["stop"])
|
|
2164
|
-
}, [u(P(
|
|
2164
|
+
}, [u(P(ie), { size: 16 })])) : a("", !0)])]),
|
|
2165
2165
|
s("div", {
|
|
2166
2166
|
class: "me-modal__body",
|
|
2167
2167
|
style: y(e.bodyStyle)
|
|
@@ -2605,8 +2605,10 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
2605
2605
|
default: () => []
|
|
2606
2606
|
}
|
|
2607
2607
|
},
|
|
2608
|
-
setup(
|
|
2609
|
-
let
|
|
2608
|
+
setup(e, { expose: t }) {
|
|
2609
|
+
let n = e;
|
|
2610
|
+
I();
|
|
2611
|
+
let o = E(), c = r(() => {
|
|
2610
2612
|
let e = [
|
|
2611
2613
|
"id",
|
|
2612
2614
|
"parentId",
|
|
@@ -2620,179 +2622,199 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
2620
2622
|
"hideFlag",
|
|
2621
2623
|
"enableFlag"
|
|
2622
2624
|
], t = {};
|
|
2623
|
-
for (let
|
|
2625
|
+
for (let r of e) t[r] = Object.prototype.hasOwnProperty.call(n.form, r);
|
|
2624
2626
|
return t;
|
|
2625
|
-
}),
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2627
|
+
}), d = r({
|
|
2628
|
+
get: () => (n.form.meta || (n.form.meta = {}), n.form.meta),
|
|
2629
|
+
set: (e) => {
|
|
2630
|
+
n.form.meta = e;
|
|
2631
|
+
}
|
|
2632
|
+
}), f = r({
|
|
2633
|
+
get: () => d.value.type || "default",
|
|
2634
|
+
set: (e) => {
|
|
2635
|
+
d.value.type = e;
|
|
2636
|
+
}
|
|
2637
|
+
}), p = r(() => ({
|
|
2629
2638
|
title: [{
|
|
2630
2639
|
required: !0,
|
|
2631
2640
|
message: "请输入名称",
|
|
2632
2641
|
trigger: "blur"
|
|
2633
2642
|
}],
|
|
2634
|
-
...
|
|
2635
|
-
})),
|
|
2636
|
-
switch (
|
|
2637
|
-
case "copy": return `复制添加${
|
|
2638
|
-
case "create": return `新建${
|
|
2639
|
-
case "create-child": return `添加子${
|
|
2640
|
-
case "edit": return `编辑${
|
|
2641
|
-
default: return
|
|
2643
|
+
...n.rules
|
|
2644
|
+
})), m = r(() => {
|
|
2645
|
+
switch (n.titleType) {
|
|
2646
|
+
case "copy": return `复制添加${n.label}`;
|
|
2647
|
+
case "create": return `新建${n.label}`;
|
|
2648
|
+
case "create-child": return `添加子${n.label}`;
|
|
2649
|
+
case "edit": return `编辑${n.label}`;
|
|
2650
|
+
default: return n.label;
|
|
2642
2651
|
}
|
|
2643
|
-
}),
|
|
2644
|
-
|
|
2645
|
-
},
|
|
2646
|
-
|
|
2647
|
-
},
|
|
2648
|
-
if (!
|
|
2652
|
+
}), h = E(!1), g = () => {
|
|
2653
|
+
h.value = !0;
|
|
2654
|
+
}, _ = () => {
|
|
2655
|
+
h.value = !1;
|
|
2656
|
+
}, v = async () => {
|
|
2657
|
+
if (!o.value) return !1;
|
|
2649
2658
|
try {
|
|
2650
|
-
return await
|
|
2659
|
+
return await o.value.validate(), !0;
|
|
2651
2660
|
} catch {
|
|
2652
2661
|
return !1;
|
|
2653
2662
|
}
|
|
2654
|
-
},
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2663
|
+
}, y = r(() => {
|
|
2664
|
+
let e = n.list;
|
|
2665
|
+
if (n.titleType === "edit" && n.form?.id != null) {
|
|
2666
|
+
let t = /* @__PURE__ */ new Set(), r = (e) => {
|
|
2667
|
+
for (let i of e) if (String(i.id) === String(n.form.id)) {
|
|
2668
|
+
let e = (n) => {
|
|
2669
|
+
t.add(String(n.id)), n.children?.forEach(e);
|
|
2670
|
+
};
|
|
2671
|
+
e(i);
|
|
2672
|
+
} else r(i.children || []);
|
|
2673
|
+
};
|
|
2674
|
+
r(e);
|
|
2675
|
+
let i = (e) => e.filter((e) => !t.has(String(e.id))).map((e) => ({
|
|
2676
|
+
...e,
|
|
2677
|
+
children: i(e.children || [])
|
|
2678
|
+
}));
|
|
2679
|
+
e = i(e);
|
|
2680
|
+
}
|
|
2681
|
+
return [{
|
|
2682
|
+
title: `顶级${n.label}`,
|
|
2683
|
+
id: "0",
|
|
2684
|
+
children: e
|
|
2685
|
+
}];
|
|
2686
|
+
});
|
|
2687
|
+
return t({
|
|
2688
|
+
open: g,
|
|
2689
|
+
close: _,
|
|
2690
|
+
validate: v
|
|
2691
|
+
}), (t, r) => {
|
|
2692
|
+
let g = A("a-form-item"), _ = A("a-col"), v = A("a-tree-select"), b = A("a-input"), x = A("a-input-number"), S = A("a-switch"), w = A("a-divider"), T = A("a-radio-button"), E = A("a-radio-group"), D = A("a-textarea"), O = A("a-row"), j = A("a-form");
|
|
2665
2693
|
return B((C(), i(vn, {
|
|
2666
|
-
title:
|
|
2694
|
+
title: n.editTitle || m.value,
|
|
2667
2695
|
class: "me-tree-menu-edit"
|
|
2668
2696
|
}, {
|
|
2669
|
-
"header-right": z(() => [k(
|
|
2670
|
-
default: z(() => [s("div", An, [s("div", jn, [u(
|
|
2697
|
+
"header-right": z(() => [k(t.$slots, "header-submit", {}, void 0, !0)]),
|
|
2698
|
+
default: z(() => [s("div", An, [s("div", jn, [u(j, {
|
|
2671
2699
|
ref_key: "formRef",
|
|
2672
|
-
ref:
|
|
2673
|
-
model:
|
|
2674
|
-
rules:
|
|
2700
|
+
ref: o,
|
|
2701
|
+
model: e.form,
|
|
2702
|
+
rules: p.value,
|
|
2675
2703
|
"label-col": { span: 6 },
|
|
2676
2704
|
"wrapper-col": { span: 18 }
|
|
2677
2705
|
}, {
|
|
2678
|
-
default: z(() => [u(
|
|
2706
|
+
default: z(() => [u(O, { gutter: 20 }, {
|
|
2679
2707
|
default: z(() => [
|
|
2680
|
-
|
|
2708
|
+
c.value.id && e.titleType === "edit" ? (C(), i(_, {
|
|
2681
2709
|
key: 0,
|
|
2682
2710
|
span: 24
|
|
2683
2711
|
}, {
|
|
2684
|
-
default: z(() => [u(
|
|
2685
|
-
default: z(() => [s("span", Mn, N(
|
|
2712
|
+
default: z(() => [u(g, { label: "ID" }, {
|
|
2713
|
+
default: z(() => [s("span", Mn, N(e.form.id), 1)]),
|
|
2686
2714
|
_: 1
|
|
2687
2715
|
})]),
|
|
2688
2716
|
_: 1
|
|
2689
2717
|
})) : a("", !0),
|
|
2690
|
-
|
|
2718
|
+
c.value.parentId ? (C(), i(_, {
|
|
2691
2719
|
key: 1,
|
|
2692
2720
|
span: 24
|
|
2693
2721
|
}, {
|
|
2694
|
-
default: z(() => [u(
|
|
2695
|
-
label: `上级${
|
|
2722
|
+
default: z(() => [u(g, {
|
|
2723
|
+
label: `上级${e.label}`,
|
|
2696
2724
|
name: "parentId"
|
|
2697
2725
|
}, {
|
|
2698
|
-
default: z(() => [u(
|
|
2699
|
-
value:
|
|
2700
|
-
"onUpdate:value": r[0] ||= (
|
|
2726
|
+
default: z(() => [u(v, {
|
|
2727
|
+
value: e.form.parentId,
|
|
2728
|
+
"onUpdate:value": r[0] ||= (t) => e.form.parentId = t,
|
|
2701
2729
|
"tree-default-expand-all": "",
|
|
2702
|
-
"tree-
|
|
2730
|
+
"tree-line": "",
|
|
2731
|
+
"tree-data": y.value,
|
|
2703
2732
|
"field-names": {
|
|
2704
2733
|
children: "children",
|
|
2705
2734
|
label: "title",
|
|
2706
2735
|
value: "id"
|
|
2707
2736
|
},
|
|
2708
|
-
"tree-node-filter-prop":
|
|
2737
|
+
"tree-node-filter-prop": "title",
|
|
2709
2738
|
"show-search": "",
|
|
2710
2739
|
style: { width: "100%" },
|
|
2711
|
-
size:
|
|
2740
|
+
size: n.size
|
|
2712
2741
|
}, null, 8, [
|
|
2713
2742
|
"value",
|
|
2714
2743
|
"tree-data",
|
|
2715
|
-
"tree-node-filter-prop",
|
|
2716
2744
|
"size"
|
|
2717
2745
|
])]),
|
|
2718
2746
|
_: 1
|
|
2719
2747
|
}, 8, ["label"])]),
|
|
2720
2748
|
_: 1
|
|
2721
2749
|
})) : a("", !0),
|
|
2722
|
-
|
|
2750
|
+
c.value.title ? (C(), i(_, {
|
|
2723
2751
|
key: 2,
|
|
2724
2752
|
span: 12
|
|
2725
2753
|
}, {
|
|
2726
|
-
default: z(() => [u(
|
|
2754
|
+
default: z(() => [u(g, {
|
|
2727
2755
|
label: "名称",
|
|
2728
2756
|
name: "title"
|
|
2729
2757
|
}, {
|
|
2730
2758
|
default: z(() => [u(b, {
|
|
2731
|
-
value:
|
|
2732
|
-
"onUpdate:value": r[1] ||= (
|
|
2759
|
+
value: e.form.title,
|
|
2760
|
+
"onUpdate:value": r[1] ||= (t) => e.form.title = t,
|
|
2733
2761
|
"allow-clear": "",
|
|
2734
|
-
size:
|
|
2762
|
+
size: n.size
|
|
2735
2763
|
}, null, 8, ["value", "size"])]),
|
|
2736
2764
|
_: 1
|
|
2737
2765
|
})]),
|
|
2738
2766
|
_: 1
|
|
2739
2767
|
})) : a("", !0),
|
|
2740
|
-
|
|
2768
|
+
c.value.enTitle ? (C(), i(_, {
|
|
2741
2769
|
key: 3,
|
|
2742
2770
|
span: 12
|
|
2743
2771
|
}, {
|
|
2744
|
-
default: z(() => [u(
|
|
2772
|
+
default: z(() => [u(g, { label: "英文名称" }, {
|
|
2745
2773
|
default: z(() => [u(b, {
|
|
2746
|
-
value:
|
|
2747
|
-
"onUpdate:value": r[2] ||= (
|
|
2774
|
+
value: e.form.enTitle,
|
|
2775
|
+
"onUpdate:value": r[2] ||= (t) => e.form.enTitle = t,
|
|
2748
2776
|
"allow-clear": "",
|
|
2749
|
-
size:
|
|
2777
|
+
size: n.size
|
|
2750
2778
|
}, null, 8, ["value", "size"])]),
|
|
2751
2779
|
_: 1
|
|
2752
2780
|
})]),
|
|
2753
2781
|
_: 1
|
|
2754
2782
|
})) : a("", !0),
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
span: 12
|
|
2758
|
-
}, {
|
|
2759
|
-
default: z(() => [u(d, { label: "别名" }, {
|
|
2783
|
+
u(_, { span: 12 }, {
|
|
2784
|
+
default: z(() => [u(g, { label: "别名" }, {
|
|
2760
2785
|
default: z(() => [u(b, {
|
|
2761
|
-
value:
|
|
2762
|
-
"onUpdate:value": r[3] ||= (
|
|
2786
|
+
value: e.form.aliasTitle,
|
|
2787
|
+
"onUpdate:value": r[3] ||= (t) => e.form.aliasTitle = t,
|
|
2763
2788
|
"allow-clear": "",
|
|
2764
|
-
size:
|
|
2789
|
+
size: n.size
|
|
2765
2790
|
}, null, 8, ["value", "size"])]),
|
|
2766
2791
|
_: 1
|
|
2767
2792
|
})]),
|
|
2768
2793
|
_: 1
|
|
2769
|
-
})
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
span: 12
|
|
2773
|
-
}, {
|
|
2774
|
-
default: z(() => [u(d, { label: "英文别名" }, {
|
|
2794
|
+
}),
|
|
2795
|
+
u(_, { span: 12 }, {
|
|
2796
|
+
default: z(() => [u(g, { label: "英文别名" }, {
|
|
2775
2797
|
default: z(() => [u(b, {
|
|
2776
|
-
value:
|
|
2777
|
-
"onUpdate:value": r[4] ||= (
|
|
2798
|
+
value: e.form.aliasEnTitle,
|
|
2799
|
+
"onUpdate:value": r[4] ||= (t) => e.form.aliasEnTitle = t,
|
|
2778
2800
|
"allow-clear": "",
|
|
2779
|
-
size:
|
|
2801
|
+
size: n.size
|
|
2780
2802
|
}, null, 8, ["value", "size"])]),
|
|
2781
2803
|
_: 1
|
|
2782
2804
|
})]),
|
|
2783
2805
|
_: 1
|
|
2784
|
-
})
|
|
2785
|
-
|
|
2786
|
-
key:
|
|
2806
|
+
}),
|
|
2807
|
+
c.value.icon ? (C(), i(_, {
|
|
2808
|
+
key: 4,
|
|
2787
2809
|
span: 12
|
|
2788
2810
|
}, {
|
|
2789
|
-
default: z(() => [u(
|
|
2790
|
-
default: z(() => [k(
|
|
2791
|
-
modelValue:
|
|
2792
|
-
"onUpdate:modelValue": r[5] ||= (
|
|
2793
|
-
sources:
|
|
2794
|
-
"iconfont-data":
|
|
2795
|
-
size:
|
|
2811
|
+
default: z(() => [u(g, { label: "图标" }, {
|
|
2812
|
+
default: z(() => [k(t.$slots, "edit-icon-selector", {}, () => [u(P(On), {
|
|
2813
|
+
modelValue: e.form.icon,
|
|
2814
|
+
"onUpdate:modelValue": r[5] ||= (t) => e.form.icon = t,
|
|
2815
|
+
sources: e.iconSources,
|
|
2816
|
+
"iconfont-data": e.iconfontData,
|
|
2817
|
+
size: n.size,
|
|
2796
2818
|
placeholder: "请选择图标"
|
|
2797
2819
|
}, null, 8, [
|
|
2798
2820
|
"modelValue",
|
|
@@ -2804,77 +2826,259 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
2804
2826
|
})]),
|
|
2805
2827
|
_: 3
|
|
2806
2828
|
})) : a("", !0),
|
|
2807
|
-
|
|
2808
|
-
key:
|
|
2829
|
+
c.value.sort ? (C(), i(_, {
|
|
2830
|
+
key: 5,
|
|
2809
2831
|
span: 12
|
|
2810
2832
|
}, {
|
|
2811
|
-
default: z(() => [u(
|
|
2812
|
-
default: z(() => [u(
|
|
2813
|
-
value:
|
|
2814
|
-
"onUpdate:value": r[6] ||= (
|
|
2833
|
+
default: z(() => [u(g, { label: "排序" }, {
|
|
2834
|
+
default: z(() => [u(x, {
|
|
2835
|
+
value: e.form.sort,
|
|
2836
|
+
"onUpdate:value": r[6] ||= (t) => e.form.sort = t,
|
|
2815
2837
|
min: 0,
|
|
2816
2838
|
style: { width: "100%" },
|
|
2817
|
-
size:
|
|
2839
|
+
size: n.size
|
|
2818
2840
|
}, null, 8, ["value", "size"])]),
|
|
2819
2841
|
_: 1
|
|
2820
2842
|
})]),
|
|
2821
2843
|
_: 1
|
|
2822
2844
|
})) : a("", !0),
|
|
2823
|
-
|
|
2824
|
-
key:
|
|
2845
|
+
c.value.cover ? (C(), i(_, {
|
|
2846
|
+
key: 6,
|
|
2825
2847
|
span: 24
|
|
2826
2848
|
}, {
|
|
2827
|
-
default: z(() => [u(
|
|
2828
|
-
default: z(() => [k(
|
|
2849
|
+
default: z(() => [u(g, { label: "封面" }, {
|
|
2850
|
+
default: z(() => [k(t.$slots, "edit-cover", {}, () => [r[18] ||= s("span", { class: "me-tree-menu-edit__placeholder" }, "请通过 edit-cover 插槽传入封面上传组件", -1)], !0)]),
|
|
2829
2851
|
_: 3
|
|
2830
2852
|
})]),
|
|
2831
2853
|
_: 3
|
|
2832
2854
|
})) : a("", !0),
|
|
2833
|
-
|
|
2834
|
-
key:
|
|
2855
|
+
c.value.hideFlag ? (C(), i(_, {
|
|
2856
|
+
key: 7,
|
|
2835
2857
|
span: 12
|
|
2836
2858
|
}, {
|
|
2837
|
-
default: z(() => [u(
|
|
2838
|
-
default: z(() => [u(
|
|
2839
|
-
checked:
|
|
2840
|
-
"onUpdate:checked": r[7] ||= (
|
|
2841
|
-
size:
|
|
2859
|
+
default: z(() => [u(g, { label: "隐藏" }, {
|
|
2860
|
+
default: z(() => [u(S, {
|
|
2861
|
+
checked: e.form.hideFlag,
|
|
2862
|
+
"onUpdate:checked": r[7] ||= (t) => e.form.hideFlag = t,
|
|
2863
|
+
size: n.size === "small" ? "small" : "medium"
|
|
2842
2864
|
}, null, 8, ["checked", "size"])]),
|
|
2843
2865
|
_: 1
|
|
2844
2866
|
})]),
|
|
2845
2867
|
_: 1
|
|
2846
2868
|
})) : a("", !0),
|
|
2847
|
-
|
|
2848
|
-
key:
|
|
2869
|
+
c.value.enableFlag ? (C(), i(_, {
|
|
2870
|
+
key: 8,
|
|
2849
2871
|
span: 12
|
|
2850
2872
|
}, {
|
|
2851
|
-
default: z(() => [u(
|
|
2852
|
-
default: z(() => [u(
|
|
2853
|
-
checked:
|
|
2854
|
-
"onUpdate:checked": r[8] ||= (
|
|
2855
|
-
size:
|
|
2873
|
+
default: z(() => [u(g, { label: "启用" }, {
|
|
2874
|
+
default: z(() => [u(S, {
|
|
2875
|
+
checked: e.form.enableFlag,
|
|
2876
|
+
"onUpdate:checked": r[8] ||= (t) => e.form.enableFlag = t,
|
|
2877
|
+
size: n.size === "small" ? "small" : "medium"
|
|
2856
2878
|
}, null, 8, ["checked", "size"])]),
|
|
2857
2879
|
_: 1
|
|
2858
2880
|
})]),
|
|
2859
2881
|
_: 1
|
|
2860
2882
|
})) : a("", !0),
|
|
2861
|
-
|
|
2862
|
-
default: z(() => [u(
|
|
2863
|
-
default: z(() => [...r[
|
|
2883
|
+
u(_, { span: 24 }, {
|
|
2884
|
+
default: z(() => [u(w, null, {
|
|
2885
|
+
default: z(() => [...r[19] ||= [l("Meta", -1)]]),
|
|
2886
|
+
_: 1
|
|
2887
|
+
})]),
|
|
2888
|
+
_: 1
|
|
2889
|
+
}),
|
|
2890
|
+
u(_, { span: 24 }, {
|
|
2891
|
+
default: z(() => [u(g, { label: "类型" }, {
|
|
2892
|
+
default: z(() => [u(E, {
|
|
2893
|
+
value: f.value,
|
|
2894
|
+
"onUpdate:value": r[9] ||= (e) => f.value = e,
|
|
2895
|
+
"button-style": "solid"
|
|
2896
|
+
}, {
|
|
2897
|
+
default: z(() => [
|
|
2898
|
+
u(T, { value: "default" }, {
|
|
2899
|
+
default: z(() => [...r[20] ||= [l("默认", -1)]]),
|
|
2900
|
+
_: 1
|
|
2901
|
+
}),
|
|
2902
|
+
u(T, { value: "group" }, {
|
|
2903
|
+
default: z(() => [...r[21] ||= [l("分组", -1)]]),
|
|
2904
|
+
_: 1
|
|
2905
|
+
}),
|
|
2906
|
+
u(T, { value: "link" }, {
|
|
2907
|
+
default: z(() => [...r[22] ||= [l("链接", -1)]]),
|
|
2908
|
+
_: 1
|
|
2909
|
+
}),
|
|
2910
|
+
u(T, { value: "iframe" }, {
|
|
2911
|
+
default: z(() => [...r[23] ||= [l("iframe", -1)]]),
|
|
2912
|
+
_: 1
|
|
2913
|
+
})
|
|
2914
|
+
]),
|
|
2915
|
+
_: 1
|
|
2916
|
+
}, 8, ["value"])]),
|
|
2917
|
+
_: 1
|
|
2918
|
+
})]),
|
|
2919
|
+
_: 1
|
|
2920
|
+
}),
|
|
2921
|
+
u(_, { span: 24 }, {
|
|
2922
|
+
default: z(() => [u(g, { label: "meta标题" }, {
|
|
2923
|
+
default: z(() => [u(b, {
|
|
2924
|
+
value: d.value.metaTitle,
|
|
2925
|
+
"onUpdate:value": r[10] ||= (e) => d.value.metaTitle = e,
|
|
2926
|
+
"allow-clear": "",
|
|
2927
|
+
size: n.size
|
|
2928
|
+
}, null, 8, ["value", "size"])]),
|
|
2929
|
+
_: 1
|
|
2930
|
+
})]),
|
|
2931
|
+
_: 1
|
|
2932
|
+
}),
|
|
2933
|
+
f.value === "default" ? (C(), i(_, {
|
|
2934
|
+
key: 9,
|
|
2935
|
+
span: 24
|
|
2936
|
+
}, {
|
|
2937
|
+
default: z(() => [u(g, { label: "path" }, {
|
|
2938
|
+
default: z(() => [u(b, {
|
|
2939
|
+
value: d.value.path,
|
|
2940
|
+
"onUpdate:value": r[11] ||= (e) => d.value.path = e,
|
|
2941
|
+
"allow-clear": "",
|
|
2942
|
+
size: n.size
|
|
2943
|
+
}, null, 8, ["value", "size"])]),
|
|
2944
|
+
_: 1
|
|
2945
|
+
})]),
|
|
2946
|
+
_: 1
|
|
2947
|
+
})) : a("", !0),
|
|
2948
|
+
f.value === "default" ? (C(), i(_, {
|
|
2949
|
+
key: 10,
|
|
2950
|
+
span: 24
|
|
2951
|
+
}, {
|
|
2952
|
+
default: z(() => [u(g, { label: "path参数" }, {
|
|
2953
|
+
default: z(() => [u(D, {
|
|
2954
|
+
value: d.value.pathParams,
|
|
2955
|
+
"onUpdate:value": r[12] ||= (e) => d.value.pathParams = e,
|
|
2956
|
+
rows: 2,
|
|
2957
|
+
"allow-clear": "",
|
|
2958
|
+
size: n.size
|
|
2959
|
+
}, null, 8, ["value", "size"])]),
|
|
2960
|
+
_: 1
|
|
2961
|
+
})]),
|
|
2962
|
+
_: 1
|
|
2963
|
+
})) : a("", !0),
|
|
2964
|
+
f.value === "default" ? (C(), i(_, {
|
|
2965
|
+
key: 11,
|
|
2966
|
+
span: 24
|
|
2967
|
+
}, {
|
|
2968
|
+
default: z(() => [u(g, { label: "关联菜单" }, {
|
|
2969
|
+
default: z(() => [u(v, {
|
|
2970
|
+
value: d.value.activeMenu,
|
|
2971
|
+
"onUpdate:value": r[13] ||= (e) => d.value.activeMenu = e,
|
|
2972
|
+
"tree-data": y.value,
|
|
2973
|
+
"tree-default-expand-all": "",
|
|
2974
|
+
"tree-line": "",
|
|
2975
|
+
"tree-node-filter-prop": "title",
|
|
2976
|
+
"show-search": "",
|
|
2977
|
+
"allow-clear": "",
|
|
2978
|
+
"field-names": {
|
|
2979
|
+
children: "children",
|
|
2980
|
+
label: "title",
|
|
2981
|
+
value: "id"
|
|
2982
|
+
},
|
|
2983
|
+
placeholder: "请选择",
|
|
2984
|
+
style: { width: "100%" },
|
|
2985
|
+
size: n.size
|
|
2986
|
+
}, null, 8, [
|
|
2987
|
+
"value",
|
|
2988
|
+
"tree-data",
|
|
2989
|
+
"size"
|
|
2990
|
+
]), r[24] ||= s("div", { class: "me-tree-menu-edit__hint" }, "设置关联菜单后,将隐藏全部子菜单。", -1)]),
|
|
2991
|
+
_: 1
|
|
2992
|
+
})]),
|
|
2993
|
+
_: 1
|
|
2994
|
+
})) : a("", !0),
|
|
2995
|
+
f.value === "default" ? (C(), i(_, {
|
|
2996
|
+
key: 12,
|
|
2997
|
+
span: 24
|
|
2998
|
+
}, {
|
|
2999
|
+
default: z(() => [u(g, { label: "高亮菜单" }, {
|
|
3000
|
+
default: z(() => [u(v, {
|
|
3001
|
+
value: d.value.highlightMenu,
|
|
3002
|
+
"onUpdate:value": r[14] ||= (e) => d.value.highlightMenu = e,
|
|
3003
|
+
"tree-data": y.value,
|
|
3004
|
+
"tree-default-expand-all": "",
|
|
3005
|
+
"tree-line": "",
|
|
3006
|
+
"tree-node-filter-prop": "title",
|
|
3007
|
+
"show-search": "",
|
|
3008
|
+
"allow-clear": "",
|
|
3009
|
+
"field-names": {
|
|
3010
|
+
children: "children",
|
|
3011
|
+
label: "title",
|
|
3012
|
+
value: "id"
|
|
3013
|
+
},
|
|
3014
|
+
placeholder: "请选择",
|
|
3015
|
+
style: { width: "100%" },
|
|
3016
|
+
size: n.size
|
|
3017
|
+
}, null, 8, [
|
|
3018
|
+
"value",
|
|
3019
|
+
"tree-data",
|
|
3020
|
+
"size"
|
|
3021
|
+
])]),
|
|
3022
|
+
_: 1
|
|
3023
|
+
})]),
|
|
3024
|
+
_: 1
|
|
3025
|
+
})) : a("", !0),
|
|
3026
|
+
f.value === "default" || f.value === "link" ? (C(), i(_, {
|
|
3027
|
+
key: 13,
|
|
3028
|
+
span: 24
|
|
3029
|
+
}, {
|
|
3030
|
+
default: z(() => [u(g, { label: "徽章" }, {
|
|
3031
|
+
default: z(() => [u(b, {
|
|
3032
|
+
value: d.value.badge,
|
|
3033
|
+
"onUpdate:value": r[15] ||= (e) => d.value.badge = e,
|
|
3034
|
+
"allow-clear": "",
|
|
3035
|
+
size: n.size
|
|
3036
|
+
}, null, 8, ["value", "size"])]),
|
|
2864
3037
|
_: 1
|
|
2865
3038
|
})]),
|
|
2866
3039
|
_: 1
|
|
2867
|
-
})
|
|
3040
|
+
})) : a("", !0),
|
|
3041
|
+
f.value === "link" ? (C(), i(_, {
|
|
3042
|
+
key: 14,
|
|
3043
|
+
span: 24
|
|
3044
|
+
}, {
|
|
3045
|
+
default: z(() => [u(g, { label: "外链URL" }, {
|
|
3046
|
+
default: z(() => [u(b, {
|
|
3047
|
+
value: d.value.linkURL,
|
|
3048
|
+
"onUpdate:value": r[16] ||= (e) => d.value.linkURL = e,
|
|
3049
|
+
"allow-clear": "",
|
|
3050
|
+
size: n.size
|
|
3051
|
+
}, null, 8, ["value", "size"])]),
|
|
3052
|
+
_: 1
|
|
3053
|
+
})]),
|
|
3054
|
+
_: 1
|
|
3055
|
+
})) : a("", !0),
|
|
3056
|
+
f.value === "iframe" ? (C(), i(_, {
|
|
3057
|
+
key: 15,
|
|
3058
|
+
span: 24
|
|
3059
|
+
}, {
|
|
3060
|
+
default: z(() => [u(g, { label: "iframeURL" }, {
|
|
3061
|
+
default: z(() => [u(b, {
|
|
3062
|
+
value: d.value.iframeURL,
|
|
3063
|
+
"onUpdate:value": r[17] ||= (e) => d.value.iframeURL = e,
|
|
3064
|
+
"allow-clear": "",
|
|
3065
|
+
size: n.size
|
|
3066
|
+
}, null, 8, ["value", "size"])]),
|
|
3067
|
+
_: 1
|
|
3068
|
+
})]),
|
|
3069
|
+
_: 1
|
|
3070
|
+
})) : a("", !0),
|
|
3071
|
+
k(t.$slots, "default", {}, void 0, !0)
|
|
2868
3072
|
]),
|
|
2869
3073
|
_: 3
|
|
2870
3074
|
})]),
|
|
2871
3075
|
_: 3
|
|
2872
3076
|
}, 8, ["model", "rules"])])])]),
|
|
2873
3077
|
_: 3
|
|
2874
|
-
}, 8, ["title"])), [[L,
|
|
3078
|
+
}, 8, ["title"])), [[L, h.value]]);
|
|
2875
3079
|
};
|
|
2876
3080
|
}
|
|
2877
|
-
}), [["__scopeId", "data-v-
|
|
3081
|
+
}), [["__scopeId", "data-v-f142cf99"]]), Pn = { class: "me-tree-menu__left" }, Fn = { class: "me-tree-menu__left-header" }, In = { class: "me-tree-menu__toolbar" }, Ln = { class: "me-tree-menu__tree-wrap" }, Rn = { class: "me-tree-menu__tree-scroll" }, zn = { class: "me-tree-menu__custom-node" }, Bn = { class: "me-tree-menu__node-label" }, Vn = { class: "me-tree-menu__right" }, Hn = /* @__PURE__ */ d({
|
|
2878
3082
|
name: "MeTreeMenu",
|
|
2879
3083
|
__name: "index",
|
|
2880
3084
|
props: {
|
|
@@ -3000,39 +3204,39 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3000
3204
|
}, { deep: !0 });
|
|
3001
3205
|
let g = (e) => {
|
|
3002
3206
|
h.value = e, d("update:actions", e);
|
|
3003
|
-
},
|
|
3207
|
+
}, v = E([]), b = E([]);
|
|
3004
3208
|
x(() => {
|
|
3005
3209
|
if (c.expandKeys && c.expandKeys.length > 0) {
|
|
3006
3210
|
let e = Array.isArray(c.expandKeys) ? c.expandKeys : [c.expandKeys];
|
|
3007
|
-
|
|
3211
|
+
v.value = e;
|
|
3008
3212
|
}
|
|
3009
3213
|
});
|
|
3010
|
-
let
|
|
3011
|
-
e ?
|
|
3012
|
-
},
|
|
3013
|
-
|
|
3014
|
-
},
|
|
3214
|
+
let S = (e) => {
|
|
3215
|
+
e ? v.value = I(c.list) : v.value = [];
|
|
3216
|
+
}, w = (e) => {
|
|
3217
|
+
v.value = e;
|
|
3218
|
+
}, T = r(() => ({ "--me-tree-menu-left-width": typeof c.leftWidth == "number" ? `${c.leftWidth}px` : c.leftWidth })), D = r(() => c.draggable ? { icon: !1 } : !1), O = r(() => ({
|
|
3015
3219
|
title: c.treeProps.title || "title",
|
|
3016
3220
|
key: c.treeProps.key || c.nodeKey,
|
|
3017
3221
|
children: c.treeProps.children || "children"
|
|
3018
|
-
})),
|
|
3019
|
-
R(
|
|
3020
|
-
|
|
3021
|
-
e && (
|
|
3222
|
+
})), j = (e) => e[O.value.title || "title"] || "", M = E(""), F = null;
|
|
3223
|
+
R(M, (e) => {
|
|
3224
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
3225
|
+
e && (v.value = I(c.list));
|
|
3022
3226
|
}, c.filterDebounce);
|
|
3023
3227
|
});
|
|
3024
|
-
let
|
|
3025
|
-
let t = [], n =
|
|
3228
|
+
let I = (e) => {
|
|
3229
|
+
let t = [], n = O.value.children || "children", r = O.value.key || "id", i = (e) => {
|
|
3026
3230
|
for (let a of e) t.push(a[r]), a[n] && a[n].length > 0 && i(a[n]);
|
|
3027
3231
|
};
|
|
3028
3232
|
return i(e), t;
|
|
3029
|
-
},
|
|
3030
|
-
if (!
|
|
3031
|
-
let e =
|
|
3233
|
+
}, L = r(() => {
|
|
3234
|
+
if (!M.value) return c.list;
|
|
3235
|
+
let e = M.value.toLowerCase(), t = O.value.title || "title", n = O.value.children || "children", r = (i) => {
|
|
3032
3236
|
let a = [];
|
|
3033
3237
|
for (let o of i) {
|
|
3034
3238
|
let i = o[n], s = i && i.length > 0 ? r(i) : [];
|
|
3035
|
-
((c.filterNodeMethod ? c.filterNodeMethod(
|
|
3239
|
+
((c.filterNodeMethod ? c.filterNodeMethod(M.value, o) : String(o[t] || "").toLowerCase().includes(e)) || s.length > 0) && a.push({
|
|
3036
3240
|
...o,
|
|
3037
3241
|
[n]: s.length > 0 ? s : i || []
|
|
3038
3242
|
});
|
|
@@ -3040,41 +3244,41 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3040
3244
|
return a;
|
|
3041
3245
|
};
|
|
3042
3246
|
return r(c.list);
|
|
3043
|
-
}),
|
|
3044
|
-
|
|
3045
|
-
},
|
|
3247
|
+
}), B = E(""), H = () => {
|
|
3248
|
+
B.value = "create", Y(), d("create");
|
|
3249
|
+
}, ee = async () => {
|
|
3046
3250
|
await m.value?.validate() && d("update", c.form);
|
|
3047
|
-
},
|
|
3251
|
+
}, U = (e) => [
|
|
3048
3252
|
{
|
|
3049
3253
|
label: `添加子${c.label}`,
|
|
3050
3254
|
icon: "PlusCircle",
|
|
3051
3255
|
onClick: () => {
|
|
3052
|
-
|
|
3256
|
+
B.value = "create-child", Y(), d("context-menu-add", e);
|
|
3053
3257
|
}
|
|
3054
3258
|
},
|
|
3055
3259
|
{
|
|
3056
3260
|
label: `编辑${c.label}`,
|
|
3057
3261
|
icon: "Pencil",
|
|
3058
3262
|
onClick: () => {
|
|
3059
|
-
|
|
3263
|
+
B.value = "edit", Y(), d("context-menu-edit", e);
|
|
3060
3264
|
}
|
|
3061
3265
|
},
|
|
3062
3266
|
{
|
|
3063
3267
|
label: `复制${c.label}`,
|
|
3064
3268
|
icon: "Copy",
|
|
3065
3269
|
onClick: () => {
|
|
3066
|
-
|
|
3270
|
+
B.value = "copy", Y(), d("context-menu-copy", e);
|
|
3067
3271
|
}
|
|
3068
3272
|
},
|
|
3069
3273
|
{
|
|
3070
3274
|
label: `删除${c.label}`,
|
|
3071
3275
|
icon: "Trash2",
|
|
3072
3276
|
onClick: () => {
|
|
3073
|
-
|
|
3277
|
+
B.value = "delete", d("context-menu-remove", e);
|
|
3074
3278
|
}
|
|
3075
3279
|
}
|
|
3076
|
-
],
|
|
3077
|
-
items:
|
|
3280
|
+
], W = (e) => c.nodeMenuItemHandle ? c.nodeMenuItemHandle(e) : U(e), te = (e) => ({
|
|
3281
|
+
items: W(e).map((t, n) => ({
|
|
3078
3282
|
key: String(n),
|
|
3079
3283
|
label: t.label,
|
|
3080
3284
|
disabled: t.disabled,
|
|
@@ -3087,18 +3291,18 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3087
3291
|
}
|
|
3088
3292
|
})),
|
|
3089
3293
|
onClick: () => {}
|
|
3090
|
-
}),
|
|
3294
|
+
}), G = (e) => {
|
|
3091
3295
|
e.event.preventDefault();
|
|
3092
|
-
let t = e.node?.dataRef || e.node || {}, n =
|
|
3093
|
-
|
|
3094
|
-
},
|
|
3095
|
-
if (
|
|
3296
|
+
let t = e.node?.dataRef || e.node || {}, n = O.value.key || "id";
|
|
3297
|
+
b.value = [t[n]];
|
|
3298
|
+
}, K = (e, t) => {
|
|
3299
|
+
if (b.value = e, e.length > 0 && t?.node) {
|
|
3096
3300
|
let e = t.node.dataRef || t.node || {};
|
|
3097
|
-
|
|
3301
|
+
B.value = "edit", Y(), d("node-click", e);
|
|
3098
3302
|
}
|
|
3099
|
-
},
|
|
3303
|
+
}, q = (e) => {
|
|
3100
3304
|
if (!c.fetchDataHandle) return;
|
|
3101
|
-
let t = e.dragNode, n = e.node, r = e.dropPosition, i =
|
|
3305
|
+
let t = e.dragNode, n = e.node, r = e.dropPosition, i = O.value.key || "id", a = O.value.children || "children", o = String(t[i]), s = r === 0 ? String(n[i]) : n.parentId || n.parentNode?.[i] || "0", l = J(n, r, o, i, a), u = c.moveConfirm.title || "提示", d = c.moveConfirm.message || "确定保存移动吗?", f = c.moveConfirm.type || "danger";
|
|
3102
3306
|
if (!c.showMoveConfirm) {
|
|
3103
3307
|
c.apiMoveHandle?.({
|
|
3104
3308
|
id: o,
|
|
@@ -3134,31 +3338,31 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3134
3338
|
cancel: () => (c.fetchDataHandle?.({ expandKeys: [s] }), !0)
|
|
3135
3339
|
}
|
|
3136
3340
|
});
|
|
3137
|
-
},
|
|
3341
|
+
}, J = (e, t, n, r, i) => {
|
|
3138
3342
|
let a = e.parentNode?.[i] || e.parent?.children || c.list, o = [];
|
|
3139
3343
|
for (let i of a) {
|
|
3140
3344
|
let a = String(i[r]);
|
|
3141
3345
|
a !== n && t !== 0 && (t === -1 && a === String(e[r]) ? (o.push(n), o.push(a)) : t === 1 && a === String(e[r]) ? (o.push(a), o.push(n)) : o.push(a));
|
|
3142
3346
|
}
|
|
3143
3347
|
return t === 0 ? [...e[i]?.map((e) => String(e[r])) || [], n] : o;
|
|
3144
|
-
},
|
|
3348
|
+
}, Y = () => {
|
|
3145
3349
|
c.openHandle ? c.openHandle() : m.value?.open();
|
|
3146
3350
|
};
|
|
3147
3351
|
return t({
|
|
3148
|
-
open:
|
|
3352
|
+
open: Y,
|
|
3149
3353
|
close: () => {
|
|
3150
3354
|
m.value?.close();
|
|
3151
3355
|
},
|
|
3152
3356
|
setExpandKeys: (e, t = !0) => {
|
|
3153
|
-
let n = Array.isArray(e) ? e : [e], r = new Set(
|
|
3154
|
-
t ? n.forEach((e) => r.add(String(e))) : n.forEach((e) => r.delete(String(e))),
|
|
3357
|
+
let n = Array.isArray(e) ? e : [e], r = new Set(v.value.map(String));
|
|
3358
|
+
t ? n.forEach((e) => r.add(String(e))) : n.forEach((e) => r.delete(String(e))), v.value = Array.from(r);
|
|
3155
3359
|
},
|
|
3156
|
-
getExpandKeys: () =>
|
|
3360
|
+
getExpandKeys: () => v.value.map(String)
|
|
3157
3361
|
}), (t, n) => {
|
|
3158
3362
|
let r = A("a-button"), c = A("a-input"), d = A("a-dropdown"), p = A("a-tree"), x = A("a-splitter-panel"), E = A("a-splitter");
|
|
3159
3363
|
return C(), o("div", {
|
|
3160
3364
|
class: "me-tree-menu",
|
|
3161
|
-
style: y(
|
|
3365
|
+
style: y(T.value)
|
|
3162
3366
|
}, [u(E, { class: "me-tree-menu__splitter" }, {
|
|
3163
3367
|
default: z(() => [u(x, {
|
|
3164
3368
|
"default-size": e.leftWidth,
|
|
@@ -3167,9 +3371,10 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3167
3371
|
}, {
|
|
3168
3372
|
default: z(() => [s("div", Pn, [
|
|
3169
3373
|
s("div", Fn, [k(t.$slots, "header")]),
|
|
3374
|
+
k(t.$slots, "toolbar-prepend"),
|
|
3170
3375
|
s("div", In, [u(r, {
|
|
3171
3376
|
type: "primary",
|
|
3172
|
-
onClick:
|
|
3377
|
+
onClick: H
|
|
3173
3378
|
}, {
|
|
3174
3379
|
default: z(() => [...n[3] ||= [l("新建", -1)]]),
|
|
3175
3380
|
_: 1
|
|
@@ -3177,15 +3382,15 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3177
3382
|
key: 0,
|
|
3178
3383
|
actions: h.value,
|
|
3179
3384
|
"onUpdate:actions": g,
|
|
3180
|
-
onToggleExpandAll:
|
|
3385
|
+
onToggleExpandAll: S
|
|
3181
3386
|
}, {
|
|
3182
3387
|
"dropdown-item": z(() => [k(t.$slots, "dropdown-item")]),
|
|
3183
3388
|
_: 3
|
|
3184
3389
|
}, 8, ["actions"])) : a("", !0)]),
|
|
3185
3390
|
s("div", Ln, [e.showFilter ? (C(), i(c, {
|
|
3186
3391
|
key: 0,
|
|
3187
|
-
value:
|
|
3188
|
-
"onUpdate:value": n[0] ||= (e) =>
|
|
3392
|
+
value: M.value,
|
|
3393
|
+
"onUpdate:value": n[0] ||= (e) => M.value = e,
|
|
3189
3394
|
class: "me-tree-menu__search",
|
|
3190
3395
|
"allow-clear": "",
|
|
3191
3396
|
placeholder: "搜索"
|
|
@@ -3198,21 +3403,28 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3198
3403
|
}, 8, ["value"])) : a("", !0), s("div", Rn, [u(p, {
|
|
3199
3404
|
ref_key: "treeRef",
|
|
3200
3405
|
ref: f,
|
|
3201
|
-
"tree-data":
|
|
3202
|
-
"field-names":
|
|
3203
|
-
draggable:
|
|
3406
|
+
"tree-data": L.value,
|
|
3407
|
+
"field-names": O.value,
|
|
3408
|
+
draggable: D.value,
|
|
3204
3409
|
"block-node": !0,
|
|
3205
3410
|
"show-line": e.showLine,
|
|
3206
|
-
"expanded-keys":
|
|
3207
|
-
"selected-keys":
|
|
3208
|
-
"
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3411
|
+
"expanded-keys": v.value,
|
|
3412
|
+
"selected-keys": b.value,
|
|
3413
|
+
"expand-action": "click",
|
|
3414
|
+
"onUpdate:expandedKeys": w,
|
|
3415
|
+
onSelect: K,
|
|
3416
|
+
onRightClick: G,
|
|
3417
|
+
onDrop: q
|
|
3212
3418
|
}, {
|
|
3419
|
+
switcherIcon: z(({ isLeaf: e, expanded: t }) => [e ? a("", !0) : (C(), i(P(Fe), {
|
|
3420
|
+
key: 0,
|
|
3421
|
+
class: _(["me-tree-menu__switcher", { "is-expanded": t }]),
|
|
3422
|
+
name: "ChevronRight",
|
|
3423
|
+
size: 14
|
|
3424
|
+
}, null, 8, ["class"]))]),
|
|
3213
3425
|
titleRender: z((e) => [s("div", zn, [s("div", Bn, [k(t.$slots, "label", { data: e }, () => [u(un, {
|
|
3214
3426
|
actions: h.value,
|
|
3215
|
-
"node-title":
|
|
3427
|
+
"node-title": j(e),
|
|
3216
3428
|
data: e
|
|
3217
3429
|
}, null, 8, [
|
|
3218
3430
|
"actions",
|
|
@@ -3222,7 +3434,7 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3222
3434
|
trigger: ["click"],
|
|
3223
3435
|
placement: "bottomRight",
|
|
3224
3436
|
class: "me-tree-menu__node-more",
|
|
3225
|
-
menu:
|
|
3437
|
+
menu: te(e),
|
|
3226
3438
|
onClick: n[2] ||= V(() => {}, ["stop"])
|
|
3227
3439
|
}, {
|
|
3228
3440
|
default: z(() => [u(P(Fe), {
|
|
@@ -3251,7 +3463,7 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3251
3463
|
ref: m,
|
|
3252
3464
|
list: e.list,
|
|
3253
3465
|
form: e.form,
|
|
3254
|
-
"title-type":
|
|
3466
|
+
"title-type": B.value,
|
|
3255
3467
|
label: e.label,
|
|
3256
3468
|
"edit-title": e.editTitle,
|
|
3257
3469
|
size: e.formSize,
|
|
@@ -3260,9 +3472,9 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3260
3472
|
}, {
|
|
3261
3473
|
"header-submit": z(() => [u(r, {
|
|
3262
3474
|
type: "primary",
|
|
3263
|
-
onClick:
|
|
3475
|
+
onClick: ee
|
|
3264
3476
|
}, {
|
|
3265
|
-
default: z(() => [l(N(
|
|
3477
|
+
default: z(() => [l(N(B.value === "edit" ? "更新" : "保存"), 1)]),
|
|
3266
3478
|
_: 1
|
|
3267
3479
|
})]),
|
|
3268
3480
|
"edit-icon-selector": z(() => [k(t.$slots, "edit-icon-selector")]),
|
|
@@ -3291,7 +3503,7 @@ var kn = On, An = { class: "me-tree-menu-edit__scroll" }, jn = { class: "me-tree
|
|
|
3291
3503
|
Hn.install = (e) => {
|
|
3292
3504
|
e.component("MeTreeMenu", Hn);
|
|
3293
3505
|
};
|
|
3294
|
-
var Un = Hn, Wn = /* @__PURE__ */ me((/* @__PURE__ */
|
|
3506
|
+
var Un = Hn, Wn = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
3295
3507
|
(function(n, r) {
|
|
3296
3508
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self, n.AMapLoader = r());
|
|
3297
3509
|
})(e, function() {
|
|
@@ -3906,7 +4118,7 @@ function ar(e = {}) {
|
|
|
3906
4118
|
}
|
|
3907
4119
|
//#endregion
|
|
3908
4120
|
//#region node_modules/jsoneditor/dist/jsoneditor.min.css
|
|
3909
|
-
var or = /* @__PURE__ */ me((/* @__PURE__ */
|
|
4121
|
+
var or = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
3910
4122
|
((n, r) => {
|
|
3911
4123
|
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.JSONEditor = r() : n.JSONEditor = r();
|
|
3912
4124
|
})(self, function() {
|
|
@@ -7315,7 +7527,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
7315
7527
|
})(e);
|
|
7316
7528
|
}
|
|
7317
7529
|
n.r(t), n.d(t, { treeModeMixins: function() {
|
|
7318
|
-
return
|
|
7530
|
+
return ne;
|
|
7319
7531
|
} });
|
|
7320
7532
|
function i(e) {
|
|
7321
7533
|
return c(e) ? e : String(e);
|
|
@@ -9787,7 +9999,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
9787
9999
|
}
|
|
9788
10000
|
]) && q(t.prototype, n), r && q(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
9789
10001
|
var t, n, r;
|
|
9790
|
-
})(), t = n(1746),
|
|
10002
|
+
})(), t = n(1746), Y = n.n(t), n = {
|
|
9791
10003
|
create: function(e, t) {
|
|
9792
10004
|
if (!e) throw Error("No container element provided.");
|
|
9793
10005
|
this.container = e, this.dom = {}, this.highlighter = new g(), this.selection = void 0, this.multiselection = { nodes: [] }, this.validateSchema = null, this.validationSequence = 0, this.errorNodes = [], this.lastSchemaErrors = void 0, this.node = null, this.focusTarget = null, this._setOptions(t), t.autocomplete && (this.autocomplete = d(t.autocomplete)), this.options.history && this.options.mode !== "view" && (this.history = new U(this)), this._createFrame(), this._createTable();
|
|
@@ -9812,7 +10024,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
9812
10024
|
colorPicker: !0,
|
|
9813
10025
|
onColorPicker: function(e, t, n) {
|
|
9814
10026
|
var r;
|
|
9815
|
-
|
|
10027
|
+
Y() ? (r = e.getBoundingClientRect().top, r = (0, S.getWindow)(e).innerHeight - r < 300 && 300 < r, new (Y())({
|
|
9816
10028
|
parent: e,
|
|
9817
10029
|
color: t,
|
|
9818
10030
|
popup: r ? "top" : "bottom",
|
|
@@ -10272,7 +10484,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10272
10484
|
n.push(e.serialize());
|
|
10273
10485
|
}), n;
|
|
10274
10486
|
}
|
|
10275
|
-
},
|
|
10487
|
+
}, ne = [
|
|
10276
10488
|
{
|
|
10277
10489
|
mode: "tree",
|
|
10278
10490
|
mixin: n,
|
|
@@ -10321,13 +10533,13 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10321
10533
|
return v;
|
|
10322
10534
|
},
|
|
10323
10535
|
compileJSONPointer: function() {
|
|
10324
|
-
return
|
|
10536
|
+
return Q;
|
|
10325
10537
|
},
|
|
10326
10538
|
contains: function() {
|
|
10327
10539
|
return ge;
|
|
10328
10540
|
},
|
|
10329
10541
|
debounce: function() {
|
|
10330
|
-
return
|
|
10542
|
+
return Y;
|
|
10331
10543
|
},
|
|
10332
10544
|
escapeUnicodeChars: function() {
|
|
10333
10545
|
return h;
|
|
@@ -10336,13 +10548,13 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10336
10548
|
return _;
|
|
10337
10549
|
},
|
|
10338
10550
|
findUniqueName: function() {
|
|
10339
|
-
return
|
|
10551
|
+
return se;
|
|
10340
10552
|
},
|
|
10341
10553
|
formatSize: function() {
|
|
10342
|
-
return
|
|
10554
|
+
return pe;
|
|
10343
10555
|
},
|
|
10344
10556
|
get: function() {
|
|
10345
|
-
return
|
|
10557
|
+
return oe;
|
|
10346
10558
|
},
|
|
10347
10559
|
getAbsoluteLeft: function() {
|
|
10348
10560
|
return w;
|
|
@@ -10351,25 +10563,25 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10351
10563
|
return T;
|
|
10352
10564
|
},
|
|
10353
10565
|
getChildPaths: function() {
|
|
10354
|
-
return
|
|
10566
|
+
return ce;
|
|
10355
10567
|
},
|
|
10356
10568
|
getColorCSS: function() {
|
|
10357
|
-
return
|
|
10569
|
+
return ie;
|
|
10358
10570
|
},
|
|
10359
10571
|
getIndexForPosition: function() {
|
|
10360
|
-
return
|
|
10572
|
+
return X;
|
|
10361
10573
|
},
|
|
10362
10574
|
getInnerText: function() {
|
|
10363
10575
|
return I;
|
|
10364
10576
|
},
|
|
10365
10577
|
getInputSelection: function() {
|
|
10366
|
-
return
|
|
10578
|
+
return re;
|
|
10367
10579
|
},
|
|
10368
10580
|
getInternetExplorerVersion: function() {
|
|
10369
10581
|
return z;
|
|
10370
10582
|
},
|
|
10371
10583
|
getPositionForPath: function() {
|
|
10372
|
-
return
|
|
10584
|
+
return Z;
|
|
10373
10585
|
},
|
|
10374
10586
|
getSelection: function() {
|
|
10375
10587
|
return M;
|
|
@@ -10408,13 +10620,13 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10408
10620
|
return K;
|
|
10409
10621
|
},
|
|
10410
10622
|
isTimestamp: function() {
|
|
10411
|
-
return
|
|
10623
|
+
return fe;
|
|
10412
10624
|
},
|
|
10413
10625
|
isUrl: function() {
|
|
10414
10626
|
return x;
|
|
10415
10627
|
},
|
|
10416
10628
|
isValidColor: function() {
|
|
10417
|
-
return
|
|
10629
|
+
return ae;
|
|
10418
10630
|
},
|
|
10419
10631
|
isValidValidationError: function() {
|
|
10420
10632
|
return q;
|
|
@@ -10426,7 +10638,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10426
10638
|
return me;
|
|
10427
10639
|
},
|
|
10428
10640
|
makeFieldTooltip: function() {
|
|
10429
|
-
return
|
|
10641
|
+
return $;
|
|
10430
10642
|
},
|
|
10431
10643
|
parse: function() {
|
|
10432
10644
|
return p;
|
|
@@ -10435,7 +10647,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10435
10647
|
return W;
|
|
10436
10648
|
},
|
|
10437
10649
|
parseString: function() {
|
|
10438
|
-
return
|
|
10650
|
+
return de;
|
|
10439
10651
|
},
|
|
10440
10652
|
removeAllClassNames: function() {
|
|
10441
10653
|
return D;
|
|
@@ -10462,10 +10674,10 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10462
10674
|
return F;
|
|
10463
10675
|
},
|
|
10464
10676
|
sort: function() {
|
|
10465
|
-
return
|
|
10677
|
+
return le;
|
|
10466
10678
|
},
|
|
10467
10679
|
sortObjectKeys: function() {
|
|
10468
|
-
return
|
|
10680
|
+
return ue;
|
|
10469
10681
|
},
|
|
10470
10682
|
stringifyPath: function() {
|
|
10471
10683
|
return te;
|
|
@@ -10474,7 +10686,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10474
10686
|
return k;
|
|
10475
10687
|
},
|
|
10476
10688
|
textDiff: function() {
|
|
10477
|
-
return
|
|
10689
|
+
return ne;
|
|
10478
10690
|
},
|
|
10479
10691
|
tryJsonRepair: function() {
|
|
10480
10692
|
return m;
|
|
@@ -10716,7 +10928,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10716
10928
|
function J(e, t, n) {
|
|
10717
10929
|
return n = n === void 0 ? 0 : n, t.left - n >= e.left && t.right + n <= e.right && t.top - n >= e.top && t.bottom + n <= e.bottom;
|
|
10718
10930
|
}
|
|
10719
|
-
function
|
|
10931
|
+
function Y(e, t, n) {
|
|
10720
10932
|
var r;
|
|
10721
10933
|
return function() {
|
|
10722
10934
|
var i = this, a = arguments, o = n && !r;
|
|
@@ -10725,7 +10937,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10725
10937
|
}, t), o && e.apply(i, a);
|
|
10726
10938
|
};
|
|
10727
10939
|
}
|
|
10728
|
-
function
|
|
10940
|
+
function ne(e, t) {
|
|
10729
10941
|
for (var n = t.length, r = 0, i = e.length, a = t.length; t.charAt(r) === e.charAt(r) && r < n;) r++;
|
|
10730
10942
|
for (; t.charAt(a - 1) === e.charAt(i - 1) && r < a && 0 < i;) a--, i--;
|
|
10731
10943
|
return {
|
|
@@ -10733,7 +10945,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10733
10945
|
end: a
|
|
10734
10946
|
};
|
|
10735
10947
|
}
|
|
10736
|
-
function
|
|
10948
|
+
function re(e) {
|
|
10737
10949
|
var t, n, r, i, a = 0, o = 0;
|
|
10738
10950
|
return typeof e.selectionStart == "number" && typeof e.selectionEnd == "number" ? (a = e.selectionStart, o = e.selectionEnd) : (i = document.selection.createRange()) && i.parentElement() === e && (r = e.value.length, t = e.value.replace(/\r\n/g, "\n"), (n = e.createTextRange()).moveToBookmark(i.getBookmark()), (i = e.createTextRange()).collapse(!1), -1 < n.compareEndPoints("StartToEnd", i) ? a = o = r : (a = -n.moveStart("character", -r), a += t.slice(0, a).split("\n").length - 1, -1 < n.compareEndPoints("EndToEnd", i) ? o = r : (o = -n.moveEnd("character", -r), o += t.slice(0, o).split("\n").length - 1))), {
|
|
10739
10951
|
startIndex: a,
|
|
@@ -10748,11 +10960,11 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10748
10960
|
};
|
|
10749
10961
|
}
|
|
10750
10962
|
}
|
|
10751
|
-
function
|
|
10963
|
+
function X(e, t, n) {
|
|
10752
10964
|
var e = e.value || "";
|
|
10753
10965
|
return 0 < t && 0 < n ? (e = e.split("\n", t), t = Math.min(e.length, t), n = Math.min(e[t - 1].length, n - 1), n = t === 1 ? n : n + 1, e.slice(0, t - 1).join("\n").length + n) : -1;
|
|
10754
10966
|
}
|
|
10755
|
-
function
|
|
10967
|
+
function Z(e, t) {
|
|
10756
10968
|
var n, r = [];
|
|
10757
10969
|
if (t && t.length) {
|
|
10758
10970
|
try {
|
|
@@ -10761,7 +10973,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10761
10973
|
return r;
|
|
10762
10974
|
}
|
|
10763
10975
|
t.forEach(function(e) {
|
|
10764
|
-
var t =
|
|
10976
|
+
var t = Q(W(e)), t = n.pointers[t];
|
|
10765
10977
|
t && r.push({
|
|
10766
10978
|
path: e,
|
|
10767
10979
|
line: t.key ? t.key.line : t.value ? t.value.line : 0,
|
|
@@ -10771,34 +10983,34 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10771
10983
|
}
|
|
10772
10984
|
return r;
|
|
10773
10985
|
}
|
|
10774
|
-
function
|
|
10986
|
+
function Q(e) {
|
|
10775
10987
|
return e.map(function(e) {
|
|
10776
10988
|
return "/" + String(e).replace(/~/g, "~0").replace(/\//g, "~1");
|
|
10777
10989
|
}).join("");
|
|
10778
10990
|
}
|
|
10779
|
-
function
|
|
10991
|
+
function ie(e) {
|
|
10780
10992
|
var t = document.createElement("div");
|
|
10781
10993
|
return t.style.color = e, t.style.color.split(/\s+/).join("").toLowerCase() || null;
|
|
10782
10994
|
}
|
|
10783
|
-
function
|
|
10784
|
-
return !!
|
|
10995
|
+
function ae(e) {
|
|
10996
|
+
return !!ie(e);
|
|
10785
10997
|
}
|
|
10786
|
-
function
|
|
10998
|
+
function $(e, t) {
|
|
10787
10999
|
var n;
|
|
10788
11000
|
return e ? (n = "", e.title && (n += e.title), e.description && (0 < n.length && (n += "\n"), n += e.description), e.default && (0 < n.length && (n += "\n\n"), n = (n += (0, s.Tl)("default", void 0, t) + "\n") + JSON.stringify(e.default, null, 2)), Array.isArray(e.examples) && 0 < e.examples.length && (0 < n.length && (n += "\n\n"), n += (0, s.Tl)("examples", void 0, t) + "\n", e.examples.forEach(function(t, r) {
|
|
10789
11001
|
n += JSON.stringify(t, null, 2), r !== e.examples.length - 1 && (n += "\n");
|
|
10790
11002
|
})), n) : "";
|
|
10791
11003
|
}
|
|
10792
|
-
function
|
|
11004
|
+
function oe(e, t) {
|
|
10793
11005
|
for (var n = e, r = 0; r < t.length && n != null; r++) n = n[t[r]];
|
|
10794
11006
|
return n;
|
|
10795
11007
|
}
|
|
10796
|
-
function
|
|
11008
|
+
function se(e, t) {
|
|
10797
11009
|
if (t.indexOf(e) === -1) return e;
|
|
10798
11010
|
for (var n = e.replace(/ \(copy( \d+)?\)$/, ""), r = n, i = 1; t.indexOf(r) !== -1;) r = n + " (" + ("copy" + (1 < i ? " " + i : "")) + ")", i++;
|
|
10799
11011
|
return r;
|
|
10800
11012
|
}
|
|
10801
|
-
function
|
|
11013
|
+
function ce(e, t) {
|
|
10802
11014
|
var n = {};
|
|
10803
11015
|
if (Array.isArray(e)) for (var r = Math.min(e.length, d), i = 0; i < r; i++) (function e(t, n, r, i) {
|
|
10804
11016
|
(Array.isArray(t) || he(t)) && !i || (n[r || ""] = !0), he(t) && Object.keys(t).forEach(function(a) {
|
|
@@ -10808,13 +11020,13 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10808
11020
|
else n[""] = !0;
|
|
10809
11021
|
return Object.keys(n).sort();
|
|
10810
11022
|
}
|
|
10811
|
-
function
|
|
11023
|
+
function le(e, t, n) {
|
|
10812
11024
|
var r = t && t !== "." ? W(t) : [], i = n === "desc" ? -1 : 1, t = e.slice();
|
|
10813
11025
|
return t.sort(function(e, t) {
|
|
10814
|
-
return e =
|
|
11026
|
+
return e = oe(e, r), t = oe(t, r), i * (t < e ? 1 : e < t ? -1 : 0);
|
|
10815
11027
|
}), t;
|
|
10816
11028
|
}
|
|
10817
|
-
function
|
|
11029
|
+
function ue(e, t) {
|
|
10818
11030
|
var n = t === "desc" ? -1 : 1, t = Object.keys(e).sort(function(e, t) {
|
|
10819
11031
|
return n * r()(e, t);
|
|
10820
11032
|
}), i = {};
|
|
@@ -10822,14 +11034,14 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
10822
11034
|
i[t] = e[t];
|
|
10823
11035
|
}), i;
|
|
10824
11036
|
}
|
|
10825
|
-
function
|
|
11037
|
+
function de(e) {
|
|
10826
11038
|
var t, n, r, i;
|
|
10827
11039
|
return e === "" ? "" : (t = e.toLowerCase()) === "null" ? null : t === "true" || t !== "false" && (/^0\d+$/.test(e) || /^0[xbo]/i.test(e) || (t = Number(e), n = parseFloat(e), n = !isNaN(t) && !isNaN(n) && isFinite(t), r = t <= 2 ** 53 - 1 && t >= -(2 ** 53 - 1), i = /^\d+$/.test(e), !n) || !r && i ? e : t);
|
|
10828
11040
|
}
|
|
10829
|
-
function
|
|
11041
|
+
function fe(e, t) {
|
|
10830
11042
|
return typeof t == "number" && f < t && isFinite(t) && Math.floor(t) === t && !isNaN(new Date(t).valueOf());
|
|
10831
11043
|
}
|
|
10832
|
-
function
|
|
11044
|
+
function pe(e) {
|
|
10833
11045
|
return e < 900 ? e.toFixed() + " B" : (e /= 1e3) < 900 ? e.toFixed(1) + " KB" : (e /= 1e3) < 900 ? e.toFixed(1) + " MB" : (e /= 1e3) < 900 ? e.toFixed(1) + " GB" : (e / 1e3).toFixed(1) + " TB";
|
|
10834
11046
|
}
|
|
10835
11047
|
function me(e, t) {
|
|
@@ -24906,25 +25118,25 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
24906
25118
|
}
|
|
24907
25119
|
if (x.length) {
|
|
24908
25120
|
var F = x;
|
|
24909
|
-
if (F) for (var I = -1, L = F.length - 1; I < L;)
|
|
25121
|
+
if (F) for (var I = -1, L = F.length - 1; I < L;) ne = F[I += 1], i += " || " + e.usePattern(ne) + ".test(" + h + ") ";
|
|
24910
25122
|
}
|
|
24911
25123
|
i += " ); if (isAdditional" + a + ") { ";
|
|
24912
25124
|
}
|
|
24913
|
-
E == "all" ? i += " delete " + d + "[" + h + "]; " : (W = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (te = l, l = e.errSchemaPath + "/additionalProperties", (K ||= []).push(i += " " + m + " = false; "), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { additionalProperty: '" + A + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is an invalid additional property" : i += "should NOT have additional properties", i += "' "), e.opts.verbose && (i += " , schema: false , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), q = i, i = K.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + q + "]); " : i += " validate.errors = [" + q + "]; return false; " : i += " var err = " + q + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = te, u && (i += " break; ")) : T && (E == "failing" ? (i += " var " + t + " = errors; ", D = e.compositeRule, e.compositeRule = f.compositeRule = !0, f.schema = S, f.schemaPath = e.schemaPath + ".additionalProperties", f.errSchemaPath = e.errSchemaPath + "/additionalProperties", f.errorPath = e.opts._errorDataPathProperty ? e.errorPath : e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers),
|
|
25125
|
+
E == "all" ? i += " delete " + d + "[" + h + "]; " : (W = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (te = l, l = e.errSchemaPath + "/additionalProperties", (K ||= []).push(i += " " + m + " = false; "), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { additionalProperty: '" + A + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is an invalid additional property" : i += "should NOT have additional properties", i += "' "), e.opts.verbose && (i += " , schema: false , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), q = i, i = K.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + q + "]); " : i += " validate.errors = [" + q + "]; return false; " : i += " var err = " + q + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = te, u && (i += " break; ")) : T && (E == "failing" ? (i += " var " + t + " = errors; ", D = e.compositeRule, e.compositeRule = f.compositeRule = !0, f.schema = S, f.schemaPath = e.schemaPath + ".additionalProperties", f.errSchemaPath = e.errSchemaPath + "/additionalProperties", f.errorPath = e.opts._errorDataPathProperty ? e.errorPath : e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", i += " if (!" + m + ") { errors = " + t + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + d + "[" + h + "]; } ", e.compositeRule = f.compositeRule = D) : (f.schema = S, f.schemaPath = e.schemaPath + ".additionalProperties", f.errSchemaPath = e.errSchemaPath + "/additionalProperties", f.errorPath = e.opts._errorDataPathProperty ? e.errorPath : e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", u && (i += " if (!" + m + ") break; "))), e.errorPath = W), C && (i += " } "), i += " } ", u && (i += " if (" + m + ") { ", p += "}");
|
|
24914
25126
|
}
|
|
24915
25127
|
var R = e.opts.useDefaults && !e.compositeRule;
|
|
24916
25128
|
if (o.length) {
|
|
24917
25129
|
var z = o;
|
|
24918
25130
|
if (z) for (var B, V = -1, H = z.length - 1; V < H;) {
|
|
24919
25131
|
var ee, U, W, te, G, K, q, J = s[B = z[V += 1]];
|
|
24920
|
-
(e.opts.strictKeywords ? typeof J == "object" && 0 < Object.keys(J).length || !1 === J : e.util.schemaHasRules(J, e.RULES.all)) && (
|
|
25132
|
+
(e.opts.strictKeywords ? typeof J == "object" && 0 < Object.keys(J).length || !1 === J : e.util.schemaHasRules(J, e.RULES.all)) && (Z = d + (G = e.util.getProperty(B)), ee = R && J.default !== void 0, f.schema = J, f.schemaPath = c + G, f.errSchemaPath = l + "/" + e.util.escapeFragment(B), f.errorPath = e.util.getPath(e.errorPath, B, e.opts.jsonPointers), f.dataPathArr[_] = e.util.toQuotedString(B), Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? (Q = e.util.varReplace(Q, v, Z), U = Z) : i += " var " + (U = v) + " = " + Z + "; ", ee ? i += " " + Q + " " : (r && r[B] ? (i += " if ( " + U + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = false; ", W = e.errorPath, te = l, G = e.util.escapeQuotes(B), e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(W, B, e.opts.jsonPointers)), l = e.errSchemaPath + "/required", (K ||= []).push(i), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { missingProperty: '" + G + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is a required property" : i += "should have required property \\'" + G + "\\'", i += "' "), e.opts.verbose && (i += " , schema: validate.schema" + c + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), q = i, i = K.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + q + "]); " : i += " validate.errors = [" + q + "]; return false; " : i += " var err = " + q + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = te, e.errorPath = W, i += " } else { ") : u ? (i += " if ( " + U + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = true; } else { ") : (i += " if (" + U + " !== undefined ", O && (i += " && Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += " ) { "), i += " " + Q + " } ")), u && (i += " if (" + m + ") { ", p += "}");
|
|
24921
25133
|
}
|
|
24922
25134
|
}
|
|
24923
25135
|
if (x.length) {
|
|
24924
|
-
var
|
|
24925
|
-
if (
|
|
24926
|
-
var
|
|
24927
|
-
(e.opts.strictKeywords ? typeof J == "object" && 0 < Object.keys(J).length || !1 === J : e.util.schemaHasRules(J, e.RULES.all)) && (f.schema = J, f.schemaPath = e.schemaPath + ".patternProperties" + e.util.getProperty(
|
|
25136
|
+
var Y = x;
|
|
25137
|
+
if (Y) for (var ne, re = -1, X = Y.length - 1; re < X;) {
|
|
25138
|
+
var Z, Q, J = b[ne = Y[re += 1]];
|
|
25139
|
+
(e.opts.strictKeywords ? typeof J == "object" && 0 < Object.keys(J).length || !1 === J : e.util.schemaHasRules(J, e.RULES.all)) && (f.schema = J, f.schemaPath = e.schemaPath + ".patternProperties" + e.util.getProperty(ne), f.errSchemaPath = e.errSchemaPath + "/patternProperties/" + e.util.escapeFragment(ne), i = (i += O ? " " + y + " = " + y + " || Object.keys(" + d + "); for (var " + g + "=0; " + g + "<" + y + ".length; " + g + "++) { var " + h + " = " + y + "[" + g + "]; " : " for (var " + h + " in " + d + ") { ") + " if (" + e.usePattern(ne) + ".test(" + h + ")) { ", f.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", u && (i += " if (!" + m + ") break; "), i += " } ", u && (i += " else " + m + " = true; "), i += " } ", u) && (i += " if (" + m + ") { ", p += "}");
|
|
24928
25140
|
}
|
|
24929
25141
|
}
|
|
24930
25142
|
return u && (i += " " + p + " if (" + t + " == errors) {"), i;
|
|
@@ -26986,7 +27198,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
26986
27198
|
function J(e) {
|
|
26987
27199
|
return typeof e.secure == "boolean" ? e.secure : String(e.scheme).toLowerCase() === "wss";
|
|
26988
27200
|
}
|
|
26989
|
-
var
|
|
27201
|
+
var Y = {
|
|
26990
27202
|
scheme: "ws",
|
|
26991
27203
|
domainHost: !0,
|
|
26992
27204
|
parse: function(e, t) {
|
|
@@ -26996,17 +27208,17 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
26996
27208
|
var n, r;
|
|
26997
27209
|
return e.port !== (J(e) ? 443 : 80) && e.port !== "" || (e.port = void 0), typeof e.secure == "boolean" && (e.scheme = e.secure ? "wss" : "ws", e.secure = void 0), e.resourceName &&= (r = e.resourceName.split("?"), n = (r = c(r, 2))[0], r = r[1], e.path = n && n !== "/" ? n : void 0, e.query = r, void 0), e.fragment = void 0, e;
|
|
26998
27210
|
}
|
|
26999
|
-
},
|
|
27211
|
+
}, ne = {
|
|
27000
27212
|
scheme: "wss",
|
|
27001
|
-
domainHost:
|
|
27002
|
-
parse:
|
|
27003
|
-
serialize:
|
|
27004
|
-
},
|
|
27005
|
-
function
|
|
27213
|
+
domainHost: Y.domainHost,
|
|
27214
|
+
parse: Y.parse,
|
|
27215
|
+
serialize: Y.serialize
|
|
27216
|
+
}, re = {}, X = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", Z = t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", "[\\\"\\\\]"), Q = new RegExp(X, "g"), ie = /* @__PURE__ */ RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))", "g"), ae = new RegExp(t("[^]", "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", "[\\.]", "[\\\"]", Z), "g"), $ = new RegExp(t("[^]", X, "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"), "g"), oe = $;
|
|
27217
|
+
function se(e) {
|
|
27006
27218
|
var t = M(e);
|
|
27007
|
-
return t.match(
|
|
27219
|
+
return t.match(Q) ? t : e;
|
|
27008
27220
|
}
|
|
27009
|
-
var
|
|
27221
|
+
var Z = {
|
|
27010
27222
|
scheme: "mailto",
|
|
27011
27223
|
parse: function(e, t) {
|
|
27012
27224
|
var n = e, r = n.to = n.path ? n.path.split(",") : [];
|
|
@@ -27045,7 +27257,7 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
27045
27257
|
var n, r = e, a = (n = e.to) == null ? [] : n instanceof Array ? n : typeof n.length != "number" || n.split || n.setInterval || n.call ? [n] : Array.prototype.slice.call(n);
|
|
27046
27258
|
if (a) {
|
|
27047
27259
|
for (var o = 0, s = a.length; o < s; ++o) {
|
|
27048
|
-
var c = String(a[o]), l = c.lastIndexOf("@"), u = c.slice(0, l).replace(
|
|
27260
|
+
var c = String(a[o]), l = c.lastIndexOf("@"), u = c.slice(0, l).replace(ie, se).replace(ie, i).replace(ae, j), c = c.slice(l + 1);
|
|
27049
27261
|
try {
|
|
27050
27262
|
c = t.iri ? k(c) : O(G(c, t).toLowerCase());
|
|
27051
27263
|
} catch (e) {
|
|
@@ -27056,30 +27268,30 @@ var or = /* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
27056
27268
|
r.path = a.join(",");
|
|
27057
27269
|
}
|
|
27058
27270
|
var d, f = e.headers = e.headers || {}, p = (e.subject && (f.subject = e.subject), e.body && (f.body = e.body), []);
|
|
27059
|
-
for (d in f) f[d] !==
|
|
27271
|
+
for (d in f) f[d] !== re[d] && p.push(d.replace(ie, se).replace(ie, i).replace($, j) + "=" + f[d].replace(ie, se).replace(ie, i).replace(oe, j));
|
|
27060
27272
|
return p.length && (r.query = p.join("&")), r;
|
|
27061
27273
|
}
|
|
27062
|
-
},
|
|
27274
|
+
}, ce = /^([^\:]+)\:(.*)/, X = {
|
|
27063
27275
|
scheme: "urn",
|
|
27064
27276
|
parse: function(e, t) {
|
|
27065
|
-
var n, r, i = e.path && e.path.match(
|
|
27277
|
+
var n, r, i = e.path && e.path.match(ce);
|
|
27066
27278
|
return i ? (r = t.scheme || e.scheme || "urn", n = i[1].toLowerCase(), i = i[2], r = r + ":" + (t.nid || n), r = A[r], e.nid = n, e.nss = i, e.path = void 0, r && (e = r.parse(e, t))) : e.error = e.error || "URN can not be parsed.", e;
|
|
27067
27279
|
},
|
|
27068
27280
|
serialize: function(e, t) {
|
|
27069
27281
|
var n = t.scheme || e.scheme || "urn", r = e.nid, n = A[n + ":" + (t.nid || r)], n = e = n ? n.serialize(e, t) : e, e = e.nss;
|
|
27070
27282
|
return n.path = (r || t.nid) + ":" + e, n;
|
|
27071
27283
|
}
|
|
27072
|
-
},
|
|
27284
|
+
}, le = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/, ue = {
|
|
27073
27285
|
scheme: "urn:uuid",
|
|
27074
27286
|
parse: function(e, t) {
|
|
27075
|
-
return e.uuid = e.nss, e.nss = void 0, t.tolerant || e.uuid && e.uuid.match(
|
|
27287
|
+
return e.uuid = e.nss, e.nss = void 0, t.tolerant || e.uuid && e.uuid.match(le) || (e.error = e.error || "UUID is not valid."), e;
|
|
27076
27288
|
},
|
|
27077
27289
|
serialize: function(e, t) {
|
|
27078
27290
|
var n = e;
|
|
27079
27291
|
return n.nss = (e.uuid || "").toLowerCase(), n;
|
|
27080
27292
|
}
|
|
27081
27293
|
};
|
|
27082
|
-
A[K.scheme] = K, A[q.scheme] = q, A[
|
|
27294
|
+
A[K.scheme] = K, A[q.scheme] = q, A[Y.scheme] = Y, A[ne.scheme] = ne, A[Z.scheme] = Z, A[X.scheme] = X, A[ue.scheme] = ue, e.SCHEMES = A, e.pctEncChar = j, e.pctDecChars = M, e.parse = z, e.removeDotSegments = U, e.serialize = W, e.resolveComponents = te, e.resolve = function(e, t, n) {
|
|
27083
27295
|
return n = ((e, t) => {
|
|
27084
27296
|
var n = e;
|
|
27085
27297
|
if (t) for (var r in t) n[r] = t[r];
|
|
@@ -28206,7 +28418,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28206
28418
|
size: "small",
|
|
28207
28419
|
onClick: _
|
|
28208
28420
|
}, {
|
|
28209
|
-
icon: z(() => [u(P(
|
|
28421
|
+
icon: z(() => [u(P(Q), { size: 14 })]),
|
|
28210
28422
|
default: z(() => [n[3] ||= l(" 导入 ", -1)]),
|
|
28211
28423
|
_: 1
|
|
28212
28424
|
}),
|
|
@@ -28618,7 +28830,7 @@ var Dr = Er, Or = { class: "me-card__title-wrapper" }, kr = { class: "me-card__t
|
|
|
28618
28830
|
class: "me-card__action-btn",
|
|
28619
28831
|
onClick: O
|
|
28620
28832
|
}, {
|
|
28621
|
-
default: z(() => [(C(), i(j(w.value ? P(
|
|
28833
|
+
default: z(() => [(C(), i(j(w.value ? P(Z) : P(re)), { size: 16 }))]),
|
|
28622
28834
|
_: 1
|
|
28623
28835
|
})) : a("", !0),
|
|
28624
28836
|
n.collapsible && !D.value ? (C(), i(r, {
|
|
@@ -28727,7 +28939,7 @@ function Yr(e, t) {
|
|
|
28727
28939
|
if (t === "boolean") return Zr(e);
|
|
28728
28940
|
if (t === "int" || t === "float") return Xr(e, t === "float");
|
|
28729
28941
|
let n = t === "date" ? zr : Br;
|
|
28730
|
-
return e == null || e === "" ? "" :
|
|
28942
|
+
return e == null || e === "" ? "" : $.isDayjs(e) ? e.format(n) : typeof e == "string" ? e : "";
|
|
28731
28943
|
}
|
|
28732
28944
|
function Xr(e, t) {
|
|
28733
28945
|
if (e == null) return e;
|
|
@@ -28747,8 +28959,8 @@ function Zr(e) {
|
|
|
28747
28959
|
}
|
|
28748
28960
|
function Qr(e, t) {
|
|
28749
28961
|
if (e == null || e === "") return "";
|
|
28750
|
-
if (
|
|
28751
|
-
let n =
|
|
28962
|
+
if ($.isDayjs(e)) return e.format(t);
|
|
28963
|
+
let n = $(e);
|
|
28752
28964
|
return n.isValid() ? n.format(t) : e;
|
|
28753
28965
|
}
|
|
28754
28966
|
function $r(e) {
|
|
@@ -29113,41 +29325,41 @@ var pi = {
|
|
|
29113
29325
|
function J(e) {
|
|
29114
29326
|
return ti(e, m.value);
|
|
29115
29327
|
}
|
|
29116
|
-
function
|
|
29328
|
+
function Y(e) {
|
|
29117
29329
|
return c.validate ? e.trim() ? J(e) ? "Key 不能重复(忽略大小写)" : "" : "Key 不能为空" : "";
|
|
29118
29330
|
}
|
|
29119
|
-
function
|
|
29331
|
+
function ne(e) {
|
|
29120
29332
|
return c.validate ? !e.key.trim() || J(e.key) : !1;
|
|
29121
29333
|
}
|
|
29122
|
-
function
|
|
29334
|
+
function re(e) {
|
|
29123
29335
|
return c.disabled || !c.validate ? "" : di(e.value, e.type, e.rules) ?? "";
|
|
29124
29336
|
}
|
|
29125
|
-
function
|
|
29337
|
+
function X(e) {
|
|
29126
29338
|
return !!oi(e.rules);
|
|
29127
29339
|
}
|
|
29128
|
-
let
|
|
29129
|
-
let e =
|
|
29130
|
-
return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${
|
|
29340
|
+
let Z = E(!1), Q = E(null), ie = E(), $ = T({}), oe = r(() => Q.value?.type ?? "string"), se = Object.fromEntries(Lr.map((e) => [e.value, e.label])), ce = r(() => {
|
|
29341
|
+
let e = Q.value;
|
|
29342
|
+
return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${se[e.type] ?? e.type})` : "校验规则";
|
|
29131
29343
|
});
|
|
29132
|
-
function
|
|
29344
|
+
function le(e) {
|
|
29133
29345
|
return e === "int" || e === "float";
|
|
29134
29346
|
}
|
|
29135
|
-
function
|
|
29136
|
-
|
|
29347
|
+
function ue(e) {
|
|
29348
|
+
Q.value = e, Object.keys($).forEach((e) => delete $[e]), Object.assign($, oi(e.rules) ?? {}), Z.value = !0;
|
|
29137
29349
|
}
|
|
29138
|
-
function
|
|
29139
|
-
|
|
29140
|
-
|
|
29350
|
+
function de() {
|
|
29351
|
+
Q.value && ie.value?.validate().then(() => {
|
|
29352
|
+
Q.value && (Q.value.rules = oi($), Z.value = !1, Q.value = null, q(), M());
|
|
29141
29353
|
}).catch(() => {});
|
|
29142
29354
|
}
|
|
29143
|
-
function
|
|
29144
|
-
|
|
29355
|
+
function fe() {
|
|
29356
|
+
Z.value = !1, Q.value = null;
|
|
29145
29357
|
}
|
|
29146
|
-
function
|
|
29358
|
+
function pe(e, t) {
|
|
29147
29359
|
return typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : Number(e) - Number(t);
|
|
29148
29360
|
}
|
|
29149
29361
|
let me = r(() => {
|
|
29150
|
-
let e =
|
|
29362
|
+
let e = $.minLength ?? null, t = $.maxLength ?? null, n = $.min ?? null, r = $.max ?? null;
|
|
29151
29363
|
return {
|
|
29152
29364
|
minLength: [{ validator: (e, n) => n != null && t != null && n > t ? Promise.reject(/* @__PURE__ */ Error("最短长度不能大于最大长度")) : Promise.resolve() }],
|
|
29153
29365
|
maxLength: [{ validator: (t, n) => n != null && e != null && n < e ? Promise.reject(/* @__PURE__ */ Error("最大长度不能小于最短长度")) : Promise.resolve() }],
|
|
@@ -29159,8 +29371,8 @@ var pi = {
|
|
|
29159
29371
|
}
|
|
29160
29372
|
return Promise.resolve();
|
|
29161
29373
|
} }],
|
|
29162
|
-
min: [{ validator: (e, t) => t != null && r != null &&
|
|
29163
|
-
max: [{ validator: (e, t) => t != null && n != null &&
|
|
29374
|
+
min: [{ validator: (e, t) => t != null && r != null && pe(t, r) > 0 ? Promise.reject(/* @__PURE__ */ Error("最小值不能大于最大值")) : Promise.resolve() }],
|
|
29375
|
+
max: [{ validator: (e, t) => t != null && n != null && pe(t, n) < 0 ? Promise.reject(/* @__PURE__ */ Error("最大值不能小于最小值")) : Promise.resolve() }]
|
|
29164
29376
|
};
|
|
29165
29377
|
}), he = E(null), ge = E(null);
|
|
29166
29378
|
function _e() {
|
|
@@ -29214,7 +29426,7 @@ var pi = {
|
|
|
29214
29426
|
onEnd: () => {
|
|
29215
29427
|
xe(), q(), M();
|
|
29216
29428
|
}
|
|
29217
|
-
}), Te =
|
|
29429
|
+
}), Te = ae(ge, p, {
|
|
29218
29430
|
...we,
|
|
29219
29431
|
immediate: !1
|
|
29220
29432
|
});
|
|
@@ -29275,13 +29487,13 @@ var pi = {
|
|
|
29275
29487
|
_: 1
|
|
29276
29488
|
}, 8, ["disabled", "onClick"])])) : e.key === "key" ? (C(), i(d, {
|
|
29277
29489
|
key: 1,
|
|
29278
|
-
title: t.disabled ? "" :
|
|
29279
|
-
visible: !t.disabled &&
|
|
29490
|
+
title: t.disabled ? "" : Y(n.key),
|
|
29491
|
+
visible: !t.disabled && ne(n)
|
|
29280
29492
|
}, {
|
|
29281
29493
|
default: z(() => [u(m, {
|
|
29282
29494
|
value: n.key,
|
|
29283
29495
|
"onUpdate:value": [(e) => n.key = e, (e) => ee(n)],
|
|
29284
|
-
class: _(["me-input-property__key-input", { "me-input-property__field--error": !t.disabled &&
|
|
29496
|
+
class: _(["me-input-property__key-input", { "me-input-property__field--error": !t.disabled && ne(n) }]),
|
|
29285
29497
|
disabled: t.disabled,
|
|
29286
29498
|
placeholder: t.keyPlaceholder
|
|
29287
29499
|
}, null, 8, [
|
|
@@ -29294,12 +29506,12 @@ var pi = {
|
|
|
29294
29506
|
_: 2
|
|
29295
29507
|
}, 1032, ["title", "visible"])) : e.key === "value" ? (C(), i(d, {
|
|
29296
29508
|
key: 2,
|
|
29297
|
-
title:
|
|
29298
|
-
visible: !!
|
|
29509
|
+
title: re(n),
|
|
29510
|
+
visible: !!re(n)
|
|
29299
29511
|
}, {
|
|
29300
29512
|
default: z(() => [u(x, {
|
|
29301
29513
|
block: !0,
|
|
29302
|
-
class: _(["me-input-property__value", { "me-input-property__field--error": !!
|
|
29514
|
+
class: _(["me-input-property__value", { "me-input-property__field--error": !!re(n) }])
|
|
29303
29515
|
}, {
|
|
29304
29516
|
default: z(() => [t.showType ? (C(), i(h, {
|
|
29305
29517
|
key: 0,
|
|
@@ -29398,9 +29610,9 @@ var pi = {
|
|
|
29398
29610
|
default: z(() => [u(c, {
|
|
29399
29611
|
type: "text",
|
|
29400
29612
|
size: "small",
|
|
29401
|
-
class: _(["me-input-property__rules-btn", { "is-active":
|
|
29613
|
+
class: _(["me-input-property__rules-btn", { "is-active": X(n) }]),
|
|
29402
29614
|
disabled: t.disabled,
|
|
29403
|
-
onClick: (e) =>
|
|
29615
|
+
onClick: (e) => ue(n)
|
|
29404
29616
|
}, {
|
|
29405
29617
|
default: z(() => [u(P(Fe), {
|
|
29406
29618
|
name: "WandSparkles",
|
|
@@ -29423,20 +29635,20 @@ var pi = {
|
|
|
29423
29635
|
"locale"
|
|
29424
29636
|
]),
|
|
29425
29637
|
u(P(an), {
|
|
29426
|
-
open:
|
|
29427
|
-
"onUpdate:open": r[11] ||= (e) =>
|
|
29638
|
+
open: Z.value,
|
|
29639
|
+
"onUpdate:open": r[11] ||= (e) => Z.value = e,
|
|
29428
29640
|
width: 480,
|
|
29429
29641
|
fullscreen: !1,
|
|
29430
|
-
title:
|
|
29642
|
+
title: ce.value,
|
|
29431
29643
|
"ok-text": "保存",
|
|
29432
29644
|
"cancel-text": "取消",
|
|
29433
|
-
onOk:
|
|
29434
|
-
onCancel:
|
|
29645
|
+
onOk: de,
|
|
29646
|
+
onCancel: fe
|
|
29435
29647
|
}, {
|
|
29436
29648
|
default: z(() => [u(O, {
|
|
29437
29649
|
ref_key: "ruleFormRef",
|
|
29438
|
-
ref:
|
|
29439
|
-
model:
|
|
29650
|
+
ref: ie,
|
|
29651
|
+
model: $,
|
|
29440
29652
|
rules: me.value,
|
|
29441
29653
|
layout: "vertical",
|
|
29442
29654
|
class: "me-input-property__rule-form"
|
|
@@ -29444,22 +29656,22 @@ var pi = {
|
|
|
29444
29656
|
default: z(() => [
|
|
29445
29657
|
u(D, { name: "required" }, {
|
|
29446
29658
|
default: z(() => [u(E, {
|
|
29447
|
-
checked:
|
|
29448
|
-
"onUpdate:checked": r[0] ||= (e) =>
|
|
29659
|
+
checked: $.required,
|
|
29660
|
+
"onUpdate:checked": r[0] ||= (e) => $.required = e
|
|
29449
29661
|
}, {
|
|
29450
29662
|
default: z(() => [...r[12] ||= [l("必填(值不能为空)", -1)]]),
|
|
29451
29663
|
_: 1
|
|
29452
29664
|
}, 8, ["checked"])]),
|
|
29453
29665
|
_: 1
|
|
29454
29666
|
}),
|
|
29455
|
-
|
|
29667
|
+
oe.value === "string" ? (C(), o(e, { key: 0 }, [
|
|
29456
29668
|
u(D, {
|
|
29457
29669
|
name: "minLength",
|
|
29458
29670
|
label: "最短长度"
|
|
29459
29671
|
}, {
|
|
29460
29672
|
default: z(() => [u(g, {
|
|
29461
|
-
value:
|
|
29462
|
-
"onUpdate:value": r[1] ||= (e) =>
|
|
29673
|
+
value: $.minLength,
|
|
29674
|
+
"onUpdate:value": r[1] ||= (e) => $.minLength = e,
|
|
29463
29675
|
min: 0,
|
|
29464
29676
|
precision: 0,
|
|
29465
29677
|
placeholder: "不限",
|
|
@@ -29472,8 +29684,8 @@ var pi = {
|
|
|
29472
29684
|
label: "最大长度"
|
|
29473
29685
|
}, {
|
|
29474
29686
|
default: z(() => [u(g, {
|
|
29475
|
-
value:
|
|
29476
|
-
"onUpdate:value": r[2] ||= (e) =>
|
|
29687
|
+
value: $.maxLength,
|
|
29688
|
+
"onUpdate:value": r[2] ||= (e) => $.maxLength = e,
|
|
29477
29689
|
min: 0,
|
|
29478
29690
|
precision: 0,
|
|
29479
29691
|
placeholder: "不限",
|
|
@@ -29487,22 +29699,22 @@ var pi = {
|
|
|
29487
29699
|
extra: "校验值格式,如 ^[a-zA-Z0-9]+$"
|
|
29488
29700
|
}, {
|
|
29489
29701
|
default: z(() => [u(m, {
|
|
29490
|
-
value:
|
|
29491
|
-
"onUpdate:value": r[3] ||= (e) =>
|
|
29702
|
+
value: $.pattern,
|
|
29703
|
+
"onUpdate:value": r[3] ||= (e) => $.pattern = e,
|
|
29492
29704
|
placeholder: "如 ^[a-zA-Z0-9]+$",
|
|
29493
29705
|
"allow-clear": ""
|
|
29494
29706
|
}, null, 8, ["value"])]),
|
|
29495
29707
|
_: 1
|
|
29496
29708
|
})
|
|
29497
29709
|
], 64)) : a("", !0),
|
|
29498
|
-
|
|
29710
|
+
le(oe.value) ? (C(), o(e, { key: 1 }, [u(D, {
|
|
29499
29711
|
name: "min",
|
|
29500
29712
|
label: "最小值"
|
|
29501
29713
|
}, {
|
|
29502
29714
|
default: z(() => [u(g, {
|
|
29503
|
-
value:
|
|
29504
|
-
"onUpdate:value": r[4] ||= (e) =>
|
|
29505
|
-
precision:
|
|
29715
|
+
value: $.min,
|
|
29716
|
+
"onUpdate:value": r[4] ||= (e) => $.min = e,
|
|
29717
|
+
precision: oe.value === "float" ? P(2) : 0,
|
|
29506
29718
|
placeholder: "不限",
|
|
29507
29719
|
class: "me-input-property__rule-input"
|
|
29508
29720
|
}, null, 8, ["value", "precision"])]),
|
|
@@ -29512,28 +29724,28 @@ var pi = {
|
|
|
29512
29724
|
label: "最大值"
|
|
29513
29725
|
}, {
|
|
29514
29726
|
default: z(() => [u(g, {
|
|
29515
|
-
value:
|
|
29516
|
-
"onUpdate:value": r[5] ||= (e) =>
|
|
29517
|
-
precision:
|
|
29727
|
+
value: $.max,
|
|
29728
|
+
"onUpdate:value": r[5] ||= (e) => $.max = e,
|
|
29729
|
+
precision: oe.value === "float" ? P(2) : 0,
|
|
29518
29730
|
placeholder: "不限",
|
|
29519
29731
|
class: "me-input-property__rule-input"
|
|
29520
29732
|
}, null, 8, ["value", "precision"])]),
|
|
29521
29733
|
_: 1
|
|
29522
29734
|
})], 64)) : a("", !0),
|
|
29523
|
-
|
|
29735
|
+
oe.value === "date" || oe.value === "time" ? (C(), o(e, { key: 2 }, [u(D, {
|
|
29524
29736
|
name: "min",
|
|
29525
29737
|
label: "最早边界"
|
|
29526
29738
|
}, {
|
|
29527
|
-
default: z(() => [
|
|
29739
|
+
default: z(() => [oe.value === "date" ? (C(), i(y, {
|
|
29528
29740
|
key: 0,
|
|
29529
|
-
value:
|
|
29530
|
-
"onUpdate:value": r[6] ||= (e) =>
|
|
29741
|
+
value: $.min,
|
|
29742
|
+
"onUpdate:value": r[6] ||= (e) => $.min = e,
|
|
29531
29743
|
"value-format": P(zr),
|
|
29532
29744
|
style: { width: "100%" }
|
|
29533
29745
|
}, null, 8, ["value", "value-format"])) : (C(), i(b, {
|
|
29534
29746
|
key: 1,
|
|
29535
|
-
value:
|
|
29536
|
-
"onUpdate:value": r[7] ||= (e) =>
|
|
29747
|
+
value: $.min,
|
|
29748
|
+
"onUpdate:value": r[7] ||= (e) => $.min = e,
|
|
29537
29749
|
"value-format": P(Br),
|
|
29538
29750
|
style: { width: "100%" }
|
|
29539
29751
|
}, null, 8, ["value", "value-format"]))]),
|
|
@@ -29542,16 +29754,16 @@ var pi = {
|
|
|
29542
29754
|
name: "max",
|
|
29543
29755
|
label: "最晚边界"
|
|
29544
29756
|
}, {
|
|
29545
|
-
default: z(() => [
|
|
29757
|
+
default: z(() => [oe.value === "date" ? (C(), i(y, {
|
|
29546
29758
|
key: 0,
|
|
29547
|
-
value:
|
|
29548
|
-
"onUpdate:value": r[8] ||= (e) =>
|
|
29759
|
+
value: $.max,
|
|
29760
|
+
"onUpdate:value": r[8] ||= (e) => $.max = e,
|
|
29549
29761
|
"value-format": P(zr),
|
|
29550
29762
|
style: { width: "100%" }
|
|
29551
29763
|
}, null, 8, ["value", "value-format"])) : (C(), i(b, {
|
|
29552
29764
|
key: 1,
|
|
29553
|
-
value:
|
|
29554
|
-
"onUpdate:value": r[9] ||= (e) =>
|
|
29765
|
+
value: $.max,
|
|
29766
|
+
"onUpdate:value": r[9] ||= (e) => $.max = e,
|
|
29555
29767
|
"value-format": P(Br),
|
|
29556
29768
|
style: { width: "100%" }
|
|
29557
29769
|
}, null, 8, ["value", "value-format"]))]),
|
|
@@ -29563,8 +29775,8 @@ var pi = {
|
|
|
29563
29775
|
extra: "可选,覆盖所有校验规则的默认提示文案"
|
|
29564
29776
|
}, {
|
|
29565
29777
|
default: z(() => [u(m, {
|
|
29566
|
-
value:
|
|
29567
|
-
"onUpdate:value": r[10] ||= (e) =>
|
|
29778
|
+
value: $.message,
|
|
29779
|
+
"onUpdate:value": r[10] ||= (e) => $.message = e,
|
|
29568
29780
|
placeholder: "如:该属性不合法",
|
|
29569
29781
|
"allow-clear": ""
|
|
29570
29782
|
}, null, 8, ["value"])]),
|
|
@@ -29755,7 +29967,7 @@ var gi = hi, _i = /* @__PURE__ */ d({
|
|
|
29755
29967
|
_i.install = (e) => {
|
|
29756
29968
|
e.component("MeInputNumber", _i);
|
|
29757
29969
|
};
|
|
29758
|
-
var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */
|
|
29970
|
+
var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
29759
29971
|
function n(e) {
|
|
29760
29972
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
29761
29973
|
throw Error("map is read-only");
|
|
@@ -30085,49 +30297,49 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30085
30297
|
function i(e, n) {
|
|
30086
30298
|
t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
|
|
30087
30299
|
let n = t.split("|");
|
|
30088
|
-
r[n[0]] = [e,
|
|
30300
|
+
r[n[0]] = [e, Y(n[0], n[1])];
|
|
30089
30301
|
});
|
|
30090
30302
|
}
|
|
30091
30303
|
}
|
|
30092
|
-
function
|
|
30093
|
-
return t ? Number(t) : +!
|
|
30304
|
+
function Y(e, t) {
|
|
30305
|
+
return t ? Number(t) : +!ne(e);
|
|
30094
30306
|
}
|
|
30095
|
-
function
|
|
30307
|
+
function ne(e) {
|
|
30096
30308
|
return K.includes(e.toLowerCase());
|
|
30097
30309
|
}
|
|
30098
|
-
var
|
|
30310
|
+
var re = {}, X = (e) => {
|
|
30099
30311
|
console.error(e);
|
|
30100
|
-
},
|
|
30312
|
+
}, Z = (e, ...t) => {
|
|
30101
30313
|
console.log(`WARN: ${e}`, ...t);
|
|
30102
|
-
},
|
|
30103
|
-
|
|
30104
|
-
},
|
|
30105
|
-
function
|
|
30314
|
+
}, Q = (e, t) => {
|
|
30315
|
+
re[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), re[`${e}/${t}`] = !0);
|
|
30316
|
+
}, ie = /* @__PURE__ */ Error();
|
|
30317
|
+
function ae(e, t, { key: n }) {
|
|
30106
30318
|
let r = 0, i = e[n], a = {}, o = {};
|
|
30107
30319
|
for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += b(t[e - 1]);
|
|
30108
30320
|
e[n] = o, e[n]._emit = a, e[n]._multi = !0;
|
|
30109
30321
|
}
|
|
30110
|
-
function
|
|
30322
|
+
function $(e) {
|
|
30111
30323
|
if (Array.isArray(e.begin)) {
|
|
30112
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
30113
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
30114
|
-
|
|
30324
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw X("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), ie;
|
|
30325
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw X("beginScope must be object"), ie;
|
|
30326
|
+
ae(e, e.begin, { key: "beginScope" }), e.begin = C(e.begin, { joinWith: "" });
|
|
30115
30327
|
}
|
|
30116
30328
|
}
|
|
30117
|
-
function
|
|
30329
|
+
function oe(e) {
|
|
30118
30330
|
if (Array.isArray(e.end)) {
|
|
30119
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
30120
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
30121
|
-
|
|
30331
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw X("skip, excludeEnd, returnEnd not compatible with endScope: {}"), ie;
|
|
30332
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw X("endScope must be object"), ie;
|
|
30333
|
+
ae(e, e.end, { key: "endScope" }), e.end = C(e.end, { joinWith: "" });
|
|
30122
30334
|
}
|
|
30123
30335
|
}
|
|
30124
|
-
function
|
|
30336
|
+
function se(e) {
|
|
30125
30337
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
30126
30338
|
}
|
|
30127
|
-
function
|
|
30128
|
-
|
|
30339
|
+
function ce(e) {
|
|
30340
|
+
se(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), $(e), oe(e);
|
|
30129
30341
|
}
|
|
30130
|
-
function
|
|
30342
|
+
function le(e) {
|
|
30131
30343
|
function t(t, n) {
|
|
30132
30344
|
return new RegExp(p(t), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : ""));
|
|
30133
30345
|
}
|
|
@@ -30193,7 +30405,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30193
30405
|
[
|
|
30194
30406
|
H,
|
|
30195
30407
|
W,
|
|
30196
|
-
|
|
30408
|
+
ce,
|
|
30197
30409
|
G
|
|
30198
30410
|
].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
|
|
30199
30411
|
ee,
|
|
@@ -30202,7 +30414,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30202
30414
|
].forEach((e) => e(n, r)), n.isCompiled = !0;
|
|
30203
30415
|
let s = null;
|
|
30204
30416
|
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= J(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
|
|
30205
|
-
return
|
|
30417
|
+
return de(e === "self" ? n : e);
|
|
30206
30418
|
})), n.contains.forEach(function(e) {
|
|
30207
30419
|
o(e, a);
|
|
30208
30420
|
}), n.starts && o(n.starts, r), a.matcher = i(a), a;
|
|
@@ -30210,15 +30422,15 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30210
30422
|
if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
30211
30423
|
return e.classNameAliases = a(e.classNameAliases || {}), o(e);
|
|
30212
30424
|
}
|
|
30213
|
-
function
|
|
30214
|
-
return e ? e.endsWithParent ||
|
|
30425
|
+
function ue(e) {
|
|
30426
|
+
return e ? e.endsWithParent || ue(e.starts) : !1;
|
|
30215
30427
|
}
|
|
30216
|
-
function
|
|
30428
|
+
function de(e) {
|
|
30217
30429
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
|
|
30218
30430
|
return a(e, { variants: null }, t);
|
|
30219
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
30431
|
+
})), e.cachedVariants ? e.cachedVariants : ue(e) ? a(e, { starts: e.starts ? a(e.starts) : null }) : Object.isFrozen(e) ? a(e) : e;
|
|
30220
30432
|
}
|
|
30221
|
-
var
|
|
30433
|
+
var fe = "11.12.0", pe = class extends Error {
|
|
30222
30434
|
constructor(e, t) {
|
|
30223
30435
|
super(e), this.name = "HTMLInjectionError", this.html = t;
|
|
30224
30436
|
}
|
|
@@ -30246,13 +30458,13 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30246
30458
|
let n = l.languageDetectRe.exec(t);
|
|
30247
30459
|
if (n) {
|
|
30248
30460
|
let t = N(n[1]);
|
|
30249
|
-
return t || (
|
|
30461
|
+
return t || (Z(s.replace("{}", n[1])), Z("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
|
|
30250
30462
|
}
|
|
30251
30463
|
return t.split(/\s+/).find((e) => u(e) || N(e));
|
|
30252
30464
|
}
|
|
30253
30465
|
function p(e, t, n) {
|
|
30254
30466
|
let r = "", i = "";
|
|
30255
|
-
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (
|
|
30467
|
+
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (Q("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Q("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
|
|
30256
30468
|
let a = {
|
|
30257
30469
|
code: r,
|
|
30258
30470
|
language: i
|
|
@@ -30383,8 +30595,8 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30383
30595
|
return P += a, a.length;
|
|
30384
30596
|
}
|
|
30385
30597
|
let D = N(e);
|
|
30386
|
-
if (!D) throw
|
|
30387
|
-
let O =
|
|
30598
|
+
if (!D) throw X(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
30599
|
+
let O = le(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
|
|
30388
30600
|
w();
|
|
30389
30601
|
let P = "", F = 0, I = 0, L = 0, R = !1;
|
|
30390
30602
|
try {
|
|
@@ -30472,7 +30684,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30472
30684
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
30473
30685
|
return;
|
|
30474
30686
|
}
|
|
30475
|
-
if (e.children.length > 0 && (l.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), l.throwUnescapedHTML)) throw new
|
|
30687
|
+
if (e.children.length > 0 && (l.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), l.throwUnescapedHTML)) throw new pe("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
30476
30688
|
t = e;
|
|
30477
30689
|
let r = t.textContent, i = n ? p(r, {
|
|
30478
30690
|
language: n,
|
|
@@ -30495,10 +30707,10 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30495
30707
|
l = he(l, e);
|
|
30496
30708
|
}
|
|
30497
30709
|
let E = () => {
|
|
30498
|
-
k(),
|
|
30710
|
+
k(), Q("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
30499
30711
|
};
|
|
30500
30712
|
function D() {
|
|
30501
|
-
k(),
|
|
30713
|
+
k(), Q("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
30502
30714
|
}
|
|
30503
30715
|
let O = !1;
|
|
30504
30716
|
function k() {
|
|
@@ -30516,7 +30728,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30516
30728
|
try {
|
|
30517
30729
|
i = r(e);
|
|
30518
30730
|
} catch (e) {
|
|
30519
|
-
if (
|
|
30731
|
+
if (X("Language definition for '{}' could not be registered.".replace("{}", n)), o) X(e);
|
|
30520
30732
|
else throw e;
|
|
30521
30733
|
i = c;
|
|
30522
30734
|
}
|
|
@@ -30562,7 +30774,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30562
30774
|
});
|
|
30563
30775
|
}
|
|
30564
30776
|
function V(e) {
|
|
30565
|
-
return
|
|
30777
|
+
return Q("10.7.0", "highlightBlock will be removed entirely in v12.0"), Q("10.7.0", "Please use highlightElement now."), w(e);
|
|
30566
30778
|
}
|
|
30567
30779
|
Object.assign(e, {
|
|
30568
30780
|
highlight: p,
|
|
@@ -30586,7 +30798,7 @@ var vi = _i, yi = (/* @__PURE__ */ me((/* @__PURE__ */ pe(((e, t) => {
|
|
|
30586
30798
|
o = !1;
|
|
30587
30799
|
}, e.safeMode = function() {
|
|
30588
30800
|
o = !0;
|
|
30589
|
-
}, e.versionString =
|
|
30801
|
+
}, e.versionString = fe, e.regex = {
|
|
30590
30802
|
concat: _,
|
|
30591
30803
|
lookahead: m,
|
|
30592
30804
|
either: y,
|
|
@@ -32345,7 +32557,7 @@ var sa = /\r\n|\r|\n/g, ca = (e) => e.length === 0 ? [] : e.split(sa), la = (e)
|
|
|
32345
32557
|
class: _(["me-code-box__tab", { "me-code-box__tab--active": t === v.value }]),
|
|
32346
32558
|
"aria-selected": t === v.value,
|
|
32347
32559
|
onClick: (e) => j(t)
|
|
32348
|
-
}, N(e.label), 11, ga))), 128))])) : x.value ? (C(), o("div", _a, [u(P(
|
|
32560
|
+
}, N(e.label), 11, ga))), 128))])) : x.value ? (C(), o("div", _a, [u(P(Y), { size: 14 }), s("span", null, N(x.value), 1)])) : a("", !0),
|
|
32349
32561
|
n[0] ||= s("div", { class: "me-code-box__spacer" }, null, -1),
|
|
32350
32562
|
c.showCopy ? (C(), o("button", {
|
|
32351
32563
|
key: 2,
|
|
@@ -32710,7 +32922,7 @@ var Da = Ea, Oa = [
|
|
|
32710
32922
|
typeof window < "u" && window.Vue && ka(window.Vue);
|
|
32711
32923
|
var Aa = {
|
|
32712
32924
|
install: ka,
|
|
32713
|
-
version: "0.0.
|
|
32925
|
+
version: "0.0.41"
|
|
32714
32926
|
};
|
|
32715
32927
|
//#endregion
|
|
32716
32928
|
export { Oe as $message, Oe as MeMessage, Vr as BOOLEAN_OPTIONS, zr as DATE_FORMAT, Rr as FLOAT_PRECISION, it as MeBody, Be as MeBox, Ge as MeBreadcrumb, Fr as MeCard, Ca as MeCodeBox, Sa as MeCodeItem, Fe as MeIcon, Xn as MeInputGps, kn as MeInputIconSelector, Da as MeInputJson, vi as MeInputNumber, gi as MeInputProperty, ir as MeInputRadio, pr as MeLoadJson, Dr as MeLoginPage, Nt as MeMenu, ye as MeMessageComponent, an as MeModal, Kt as MeNav, Ir as MeSkeleton, Ta as MeText, Un as MeTreeMenu, Br as TIME_FORMAT, Lr as VALUE_TYPE_OPTIONS, ei as checkDuplicateKeys, Aa as default, Yr as exportValue, Hr as genId, Kr as inferValueType, ka as install, ti as isDuplicateKey, ii as isRuleApplicable, Pe as loadIconfont, $r as normalizeKey, oi as normalizeRuleSet, qr as normalizeValue, si as sanitizeRulesForType, ui as toRuleMap, fi as toValueErrorMap, li as validateValue, di as valueError };
|