@me-framework/me-ui-antdv-next 0.0.17 → 0.0.19
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.css +1 -1
- package/dist/me-ui-antdv-next.js +271 -254
- package/dist/me-ui-antdv-next.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/me-ui-antdv-next.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, h as d, inject as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, reactive as S, ref as C, render as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, shallowRef as k, toDisplayString as A, unref as j, useAttrs as M, useSlots as N, vShow as P, watch as F, withCtx as I, withDirectives as L, withModifiers as R } from "vue";
|
|
2
2
|
import { message as z, theme as B } from "antdv-next";
|
|
3
3
|
import * as V from "@lucide/vue";
|
|
4
|
-
import { ChevronDown as H, ChevronLeft as U, ChevronRight as W, Download as G, Maximize as
|
|
4
|
+
import { ChevronDown as H, ChevronLeft as U, ChevronRight as W, Download as G, Maximize as K, Maximize2 as q, Minimize as J, Minimize2 as Y, Upload as X } from "@lucide/vue";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
|
-
var
|
|
6
|
+
var ee = Object.create, te = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = Object.getOwnPropertyNames, Z = Object.getPrototypeOf, Q = Object.prototype.hasOwnProperty, ie = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ae = (e, t, n, r) => {
|
|
7
7
|
if (t && typeof t == "object" || typeof t == "function") for (var i = re(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Q.call(e, s) && s !== n && te(e, s, {
|
|
8
8
|
get: ((e) => t[e]).bind(null, s),
|
|
9
9
|
enumerable: !(r = ne(t, s)) || r.enumerable
|
|
10
10
|
});
|
|
11
11
|
return e;
|
|
12
|
-
}, oe = (e, t, n) => (n = e == null ? {} :
|
|
12
|
+
}, oe = (e, t, n) => (n = e == null ? {} : ee(Z(e)), ae(t || !e || !e.__esModule || !Q.call(e, "default") ? te(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
15
|
}) : n, e)), se = { class: "me-message__footer" }, ce = { class: "me-message__actions" }, le = { class: "me-message__header" }, ue = ["innerHTML"], de = /* @__PURE__ */ u({
|
|
@@ -91,7 +91,7 @@ var X = Object.create, te = Object.defineProperty, ne = Object.getOwnPropertyDes
|
|
|
91
91
|
algorithm: L.value ? u : s,
|
|
92
92
|
token: { borderRadius: 6 },
|
|
93
93
|
components: { Modal: { titleFontSize: 18 } }
|
|
94
|
-
})), H = n(() => S.value === "process" ? d.data.process?.title ?? d.data.normal?.title : d.data.normal?.title), U = n(() => S.value === "process" ? d.data.process?.message ?? d.data.normal?.message : d.data.normal?.message), W = n(() => S.value === "process" ? d.data.process?.loading ?? !1 : d.data.normal?.loading ?? !1), G = n(() => S.value === "process" ? d.data.process?.type ?? d.data.normal?.type ?? "default" : d.data.normal?.type ?? "default"),
|
|
94
|
+
})), H = n(() => S.value === "process" ? d.data.process?.title ?? d.data.normal?.title : d.data.normal?.title), U = n(() => S.value === "process" ? d.data.process?.message ?? d.data.normal?.message : d.data.normal?.message), W = n(() => S.value === "process" ? d.data.process?.loading ?? !1 : d.data.normal?.loading ?? !1), G = n(() => S.value === "process" ? d.data.process?.type ?? d.data.normal?.type ?? "default" : d.data.normal?.type ?? "default"), K = n(() => !!d.handler?.cancel), q = n(() => G.value === "default" ? "default" : "primary"), J = n(() => G.value === "danger");
|
|
95
95
|
F(x, async (e) => {
|
|
96
96
|
if (e ? (k && d.closeOnRouteChange && (j.value = k.currentRoute.value.fullPath), M || (T = !1)) : !T && !M && (j.value = null), e && !d.centered && d.top !== void 0) {
|
|
97
97
|
await m();
|
|
@@ -99,14 +99,14 @@ var X = Object.create, te = Object.defineProperty, ne = Object.getOwnPropertyDes
|
|
|
99
99
|
n && (n.style.marginTop = e);
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
let
|
|
102
|
+
let Y = (e, ...t) => new Promise((n) => {
|
|
103
103
|
if (!e) {
|
|
104
104
|
n(!0);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
let r = e(...t);
|
|
108
108
|
r instanceof Promise ? r.then((e) => n(e !== !1)).catch(() => n(!1)) : n(r !== !1);
|
|
109
|
-
}),
|
|
109
|
+
}), X = () => {
|
|
110
110
|
O = null;
|
|
111
111
|
let e = d.data.request;
|
|
112
112
|
return !e || new Promise((t) => {
|
|
@@ -120,17 +120,17 @@ var X = Object.create, te = Object.defineProperty, ne = Object.getOwnPropertyDes
|
|
|
120
120
|
t(!0);
|
|
121
121
|
}) : t(!0);
|
|
122
122
|
});
|
|
123
|
-
},
|
|
123
|
+
}, ee = async () => {
|
|
124
124
|
if (T) {
|
|
125
125
|
T = !1, w = !1;
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
w || (w = !0, await
|
|
128
|
+
w || (w = !0, await Y(d.handler?.cancel) ? x.value = !1 : (S.value = "normal", w = !1));
|
|
129
129
|
}, te = async () => {
|
|
130
130
|
if (w) return;
|
|
131
131
|
w = !0, S.value = "process";
|
|
132
132
|
let e = !0;
|
|
133
|
-
d.data.request && (e = await
|
|
133
|
+
d.data.request && (e = await X()), e && d.handler?.confirm ? await Y(d.handler.confirm, O) ? x.value = !1 : (S.value = "normal", w = !1) : x.value = !1;
|
|
134
134
|
};
|
|
135
135
|
return (t, n) => {
|
|
136
136
|
let a = D("a-button"), s = D("a-modal"), u = D("a-config-provider");
|
|
@@ -145,20 +145,20 @@ var X = Object.create, te = Object.defineProperty, ne = Object.getOwnPropertyDes
|
|
|
145
145
|
"mask-closable": !1,
|
|
146
146
|
keyboard: !1,
|
|
147
147
|
"wrap-class-name": "me-message-modal",
|
|
148
|
-
onCancel:
|
|
148
|
+
onCancel: ee
|
|
149
149
|
}, {
|
|
150
|
-
footer: I(() => [o("div", se, [E(t.$slots, "me-message-footer", {}, () => [n[3] ||= o("div", null, null, -1), o("div", ce, [
|
|
150
|
+
footer: I(() => [o("div", se, [E(t.$slots, "me-message-footer", {}, () => [n[3] ||= o("div", null, null, -1), o("div", ce, [K.value ? (b(), r(a, {
|
|
151
151
|
key: 0,
|
|
152
152
|
type: "link",
|
|
153
153
|
class: "me-message__cancel",
|
|
154
154
|
autoInsertSpace: !1,
|
|
155
|
-
onClick:
|
|
155
|
+
onClick: ee
|
|
156
156
|
}, {
|
|
157
157
|
default: I(() => [...n[1] ||= [c("取消 ", -1)]]),
|
|
158
158
|
_: 1
|
|
159
159
|
})) : i("", !0), l(a, {
|
|
160
|
-
type:
|
|
161
|
-
danger:
|
|
160
|
+
type: q.value,
|
|
161
|
+
danger: J.value,
|
|
162
162
|
loading: W.value,
|
|
163
163
|
autoInsertSpace: !1,
|
|
164
164
|
class: h(["me-message__confirm", `me-message__confirm--${G.value}`]),
|
|
@@ -1045,60 +1045,73 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1045
1045
|
return d.showHidden;
|
|
1046
1046
|
},
|
|
1047
1047
|
get selectedId() {
|
|
1048
|
-
return
|
|
1048
|
+
return le.value;
|
|
1049
1049
|
},
|
|
1050
1050
|
get expandedSections() {
|
|
1051
|
-
return
|
|
1051
|
+
return O.value;
|
|
1052
1052
|
}
|
|
1053
1053
|
}));
|
|
1054
|
-
let _ = C(d.defaultActiveId || d.activeId),
|
|
1054
|
+
let _ = C(d.defaultActiveId || d.activeId), w = C(d.defaultSelectedId || d.selectedId), O = C(/* @__PURE__ */ new Set()), k = C(d.collapsed);
|
|
1055
1055
|
F(() => d.activeId, (e) => {
|
|
1056
1056
|
e && (_.value = e);
|
|
1057
1057
|
}), F(() => d.selectedId, (e) => {
|
|
1058
|
-
e && (
|
|
1058
|
+
e && (w.value = e);
|
|
1059
1059
|
}), F(() => d.collapsed, (e) => {
|
|
1060
|
-
|
|
1060
|
+
k.value = e;
|
|
1061
1061
|
});
|
|
1062
|
-
let
|
|
1062
|
+
let M = C(!1), N = () => {
|
|
1063
|
+
typeof document < "u" && (M.value = document.documentElement.classList.contains("dark"));
|
|
1064
|
+
}, R = null;
|
|
1065
|
+
v(() => {
|
|
1066
|
+
N(), typeof document < "u" && (R = new MutationObserver(() => {
|
|
1067
|
+
N();
|
|
1068
|
+
}), R.observe(document.documentElement, {
|
|
1069
|
+
attributes: !0,
|
|
1070
|
+
attributeFilter: ["class"]
|
|
1071
|
+
}));
|
|
1072
|
+
}), y(() => {
|
|
1073
|
+
R?.disconnect(), R = null;
|
|
1074
|
+
});
|
|
1075
|
+
let z = n(() => typeof d.height == "number" ? `${d.height}px` : d.height), B = n(() => {
|
|
1063
1076
|
if (!d.background) return {};
|
|
1064
1077
|
let e = d.background.trim();
|
|
1065
1078
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("data:") ? {
|
|
1066
|
-
backgroundImage: `url(${e})`,
|
|
1079
|
+
backgroundImage: M.value ? `linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 80%)), url(${e})` : `url(${e})`,
|
|
1067
1080
|
backgroundSize: "cover"
|
|
1068
1081
|
} : { background: e };
|
|
1069
|
-
}),
|
|
1070
|
-
if (!
|
|
1071
|
-
|
|
1082
|
+
}), V = n(() => k.value), G = n(() => typeof d.collapsedWidth == "number" ? `${d.collapsedWidth}px` : d.collapsedWidth), K = n(() => V.value ? G.value : typeof d.leftWidth == "number" ? `${d.leftWidth}px` : d.leftWidth), q = C(!1), J = C(null), Y = C({}), X = null, ee = (e, t) => {
|
|
1083
|
+
if (!V.value) return;
|
|
1084
|
+
X &&= (clearTimeout(X), null), J.value = e;
|
|
1072
1085
|
let n = t.currentTarget.getBoundingClientRect(), r = t.currentTarget.closest(".me-menu")?.getBoundingClientRect();
|
|
1073
|
-
r && (
|
|
1086
|
+
r && (Y.value = {
|
|
1074
1087
|
top: "0",
|
|
1075
1088
|
left: `${n.right - r.left}px`,
|
|
1076
1089
|
height: "100%"
|
|
1077
1090
|
});
|
|
1078
|
-
let i =
|
|
1079
|
-
i !==
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
|
|
1091
|
+
let i = Q(e);
|
|
1092
|
+
i !== oe.value && (_.value = i, p("update:activeId", i), p("change", e)), q.value = !0;
|
|
1093
|
+
}, te = () => {
|
|
1094
|
+
V.value && (X && clearTimeout(X), X = setTimeout(() => {
|
|
1095
|
+
q.value = !1, X = null;
|
|
1083
1096
|
}, 150));
|
|
1084
|
-
},
|
|
1085
|
-
|
|
1086
|
-
},
|
|
1087
|
-
|
|
1088
|
-
},
|
|
1089
|
-
F(() =>
|
|
1097
|
+
}, ne = () => {
|
|
1098
|
+
V.value && (X &&= (clearTimeout(X), null));
|
|
1099
|
+
}, re = () => {
|
|
1100
|
+
k.value = !k.value, p("update:collapsed", k.value), k.value && (q.value = !1);
|
|
1101
|
+
}, Z = n(() => typeof d.rightWidth == "number" ? `${d.rightWidth}px` : d.rightWidth), Q = (e) => e[d.keyField] ?? e.id, ie = (e) => !(!d.showHidden && e.hideFlag || e.meta?.hideMenu || d.hideDisabled && !e.enableFlag), ae = n(() => d.data.filter((e) => e.parentId === "0" && ie(e)).sort((e, t) => e.sort - t.sort)), oe = n(() => _.value ? _.value : d.activeId ? d.activeId : d.defaultActiveId ? d.defaultActiveId : ae.value[0] ? Q(ae.value[0]) : ""), se = n(() => oe.value && ae.value.find((e) => Q(e) === oe.value) || null), ce = n(() => se.value?.children ? se.value.children.filter((e) => ie(e)).sort((e, t) => e.sort - t.sort) : []), le = n(() => w.value ? w.value : d.selectedId ? d.selectedId : d.defaultSelectedId ? d.defaultSelectedId : ""), ue = n(() => le.value ? fe(d.data, le.value) : null);
|
|
1102
|
+
F(() => le.value, (e) => {
|
|
1090
1103
|
if (!e) return;
|
|
1091
|
-
|
|
1092
|
-
let t =
|
|
1093
|
-
if (t && !
|
|
1094
|
-
let e =
|
|
1104
|
+
ge(e);
|
|
1105
|
+
let t = _e(e);
|
|
1106
|
+
if (t && !be(t)) {
|
|
1107
|
+
let e = xe(t);
|
|
1095
1108
|
if (e) {
|
|
1096
|
-
let t =
|
|
1097
|
-
|
|
1109
|
+
let t = Q(e);
|
|
1110
|
+
w.value = t, p("update:selectedId", t), p("select", e), ye(e);
|
|
1098
1111
|
}
|
|
1099
1112
|
}
|
|
1100
1113
|
});
|
|
1101
|
-
let
|
|
1114
|
+
let de = (e) => {
|
|
1102
1115
|
if (e) return {
|
|
1103
1116
|
danger: "error",
|
|
1104
1117
|
info: "default",
|
|
@@ -1106,123 +1119,123 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1106
1119
|
success: "success",
|
|
1107
1120
|
warning: "warning"
|
|
1108
1121
|
}[e] || e;
|
|
1109
|
-
},
|
|
1122
|
+
}, fe = (e, t) => {
|
|
1110
1123
|
for (let n of e) {
|
|
1111
|
-
if (
|
|
1124
|
+
if (Q(n) === t) return n;
|
|
1112
1125
|
if (n.children && n.children.length > 0) {
|
|
1113
|
-
let e =
|
|
1126
|
+
let e = fe(n.children, t);
|
|
1114
1127
|
if (e) return e;
|
|
1115
1128
|
}
|
|
1116
1129
|
}
|
|
1117
1130
|
return null;
|
|
1118
|
-
},
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1131
|
+
}, pe = (e) => !e.children || e.meta?.hideChildrenMenu ? [] : e.children.filter((e) => ie(e)).sort((e, t) => e.sort - t.sort), $ = (e) => {
|
|
1132
|
+
O.value.has(e) ? O.value.delete(e) : O.value.add(e);
|
|
1133
|
+
}, me = (e) => O.value.has(e), he = (e, t = ce.value) => {
|
|
1121
1134
|
for (let n of t) {
|
|
1122
|
-
let t =
|
|
1123
|
-
if (t.some((t) =>
|
|
1135
|
+
let t = pe(n);
|
|
1136
|
+
if (t.some((t) => Q(t) === e)) return [Q(n)];
|
|
1124
1137
|
if (t.length > 0) {
|
|
1125
|
-
let r =
|
|
1126
|
-
if (r.length > 0) return [
|
|
1138
|
+
let r = he(e, t);
|
|
1139
|
+
if (r.length > 0) return [Q(n), ...r];
|
|
1127
1140
|
}
|
|
1128
1141
|
}
|
|
1129
1142
|
return [];
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
|
|
1143
|
+
}, ge = (e) => {
|
|
1144
|
+
he(e).forEach((e) => {
|
|
1145
|
+
O.value.add(e);
|
|
1133
1146
|
});
|
|
1134
|
-
},
|
|
1135
|
-
if (!e || !
|
|
1136
|
-
for (let t of
|
|
1137
|
-
if (
|
|
1138
|
-
let n =
|
|
1147
|
+
}, _e = (e) => {
|
|
1148
|
+
if (!e || !ce.value) return null;
|
|
1149
|
+
for (let t of ce.value) {
|
|
1150
|
+
if (Q(t) === e) return t;
|
|
1151
|
+
let n = pe(t);
|
|
1139
1152
|
if (n.length > 0) {
|
|
1140
|
-
let t =
|
|
1153
|
+
let t = fe(n, e);
|
|
1141
1154
|
if (t) return t;
|
|
1142
1155
|
}
|
|
1143
1156
|
}
|
|
1144
1157
|
return null;
|
|
1145
|
-
},
|
|
1158
|
+
}, ve = (e) => {
|
|
1146
1159
|
if (e.length === 0) return null;
|
|
1147
|
-
let t = e[0], n =
|
|
1148
|
-
return n.length > 0 ? (
|
|
1149
|
-
},
|
|
1160
|
+
let t = e[0], n = pe(t);
|
|
1161
|
+
return n.length > 0 ? (O.value.add(Q(t)), ve(n)) : t;
|
|
1162
|
+
}, ye = (e) => {
|
|
1150
1163
|
if (!d.router || !m) return;
|
|
1151
1164
|
let t = e.meta?.path;
|
|
1152
1165
|
t && m.push(t);
|
|
1153
|
-
},
|
|
1154
|
-
if (
|
|
1155
|
-
let t =
|
|
1156
|
-
return t.length === 0 ? null :
|
|
1166
|
+
}, be = (e) => e.meta?.type !== "group" && pe(e).length === 0, xe = (e) => {
|
|
1167
|
+
if (be(e)) return e;
|
|
1168
|
+
let t = pe(e);
|
|
1169
|
+
return t.length === 0 ? null : ve(t);
|
|
1157
1170
|
};
|
|
1158
|
-
F(() =>
|
|
1159
|
-
let e = d.selectedId ||
|
|
1160
|
-
if (t &&
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1171
|
+
F(() => oe.value, () => {
|
|
1172
|
+
let e = d.selectedId || w.value || d.defaultSelectedId, t = _e(e);
|
|
1173
|
+
if (t && ce.value.length > 0) {
|
|
1174
|
+
if (ge(e), be(t)) {
|
|
1175
|
+
w.value !== e && (w.value = e);
|
|
1163
1176
|
return;
|
|
1164
1177
|
}
|
|
1165
|
-
let n =
|
|
1178
|
+
let n = xe(t);
|
|
1166
1179
|
if (n) {
|
|
1167
|
-
let e =
|
|
1168
|
-
|
|
1180
|
+
let e = Q(n);
|
|
1181
|
+
w.value = e, p("update:selectedId", e), p("select", n), ye(n);
|
|
1169
1182
|
return;
|
|
1170
1183
|
}
|
|
1171
1184
|
}
|
|
1172
|
-
let n =
|
|
1185
|
+
let n = ve(ce.value);
|
|
1173
1186
|
if (n) {
|
|
1174
|
-
let e =
|
|
1175
|
-
|
|
1176
|
-
} else
|
|
1187
|
+
let e = Q(n);
|
|
1188
|
+
w.value = e, p("update:selectedId", e), p("select", n), ye(n);
|
|
1189
|
+
} else w.value = "", p("update:selectedId", "");
|
|
1177
1190
|
}, { immediate: !0 });
|
|
1178
|
-
let
|
|
1191
|
+
let Se = (e) => {
|
|
1179
1192
|
if (!e.enableFlag) return;
|
|
1180
|
-
let t =
|
|
1181
|
-
_.value !== t && (_.value = t,
|
|
1182
|
-
},
|
|
1193
|
+
let t = Q(e);
|
|
1194
|
+
_.value !== t && (_.value = t, w.value = "", p("update:activeId", t), p("change", e));
|
|
1195
|
+
}, Ce = (e) => {
|
|
1183
1196
|
if (!e.enableFlag) return;
|
|
1184
|
-
let t =
|
|
1185
|
-
|
|
1197
|
+
let t = Q(e);
|
|
1198
|
+
w.value = t, p("update:selectedId", t), p("select", e), ye(e);
|
|
1186
1199
|
};
|
|
1187
1200
|
return c({
|
|
1188
1201
|
setBadge: (e, t, n) => {
|
|
1189
|
-
let r =
|
|
1202
|
+
let r = fe(d.data, e);
|
|
1190
1203
|
r && (r.meta ||= {}, t === !0 ? (r.meta.dot = !0, r.meta.badge = "") : (r.meta.badge = String(t), r.meta.dot = !1), n && (r.meta.badgeColor = n));
|
|
1191
1204
|
},
|
|
1192
1205
|
removeBadge: (e) => {
|
|
1193
|
-
let t =
|
|
1206
|
+
let t = fe(d.data, e);
|
|
1194
1207
|
!t || !t.meta || (t.meta.badge = "", t.meta.dot = !1);
|
|
1195
1208
|
},
|
|
1196
|
-
selectedItem:
|
|
1197
|
-
toggleCollapse:
|
|
1198
|
-
isCollapsed:
|
|
1209
|
+
selectedItem: ue,
|
|
1210
|
+
toggleCollapse: re,
|
|
1211
|
+
isCollapsed: V
|
|
1199
1212
|
}), (n, s) => {
|
|
1200
1213
|
let c = D("a-badge");
|
|
1201
1214
|
return b(), a("div", {
|
|
1202
|
-
class: h(["me-menu", { "is-collapsed":
|
|
1203
|
-
style: g({ height:
|
|
1215
|
+
class: h(["me-menu", { "is-collapsed": V.value }]),
|
|
1216
|
+
style: g({ height: z.value })
|
|
1204
1217
|
}, [
|
|
1205
1218
|
o("div", {
|
|
1206
1219
|
class: "me-menu__left",
|
|
1207
1220
|
style: g({
|
|
1208
|
-
width:
|
|
1209
|
-
...
|
|
1221
|
+
width: K.value,
|
|
1222
|
+
...B.value
|
|
1210
1223
|
})
|
|
1211
1224
|
}, [
|
|
1212
|
-
o("div", et, [E(n.$slots, "logo", {}, () => [
|
|
1225
|
+
o("div", et, [E(n.$slots, "logo", {}, () => [V.value ? (b(), r(j(Ee), {
|
|
1213
1226
|
key: 1,
|
|
1214
1227
|
name: "LayoutDashboard",
|
|
1215
1228
|
size: 24
|
|
1216
1229
|
})) : (b(), a("span", tt, "MeMenu"))])]),
|
|
1217
|
-
o("div", nt, [(b(!0), a(e, null, T(
|
|
1230
|
+
o("div", nt, [(b(!0), a(e, null, T(ae.value, (t) => (b(), a(e, { key: Q(t) }, [t.meta?.divider && !V.value ? (b(), a("div", rt)) : i("", !0), o("div", {
|
|
1218
1231
|
class: h(["me-menu__left-item", {
|
|
1219
|
-
"is-active":
|
|
1232
|
+
"is-active": oe.value === Q(t),
|
|
1220
1233
|
"is-disabled": !t.enableFlag,
|
|
1221
|
-
"is-collapsed":
|
|
1234
|
+
"is-collapsed": V.value
|
|
1222
1235
|
}]),
|
|
1223
|
-
onClick: (e) =>
|
|
1236
|
+
onClick: (e) => Se(t),
|
|
1224
1237
|
onMouseenter: (e) => ee(t, e),
|
|
1225
|
-
onMouseleave:
|
|
1238
|
+
onMouseleave: te
|
|
1226
1239
|
}, [
|
|
1227
1240
|
t.icon ? (b(), r(j(Ee), {
|
|
1228
1241
|
key: 0,
|
|
@@ -1230,22 +1243,22 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1230
1243
|
size: 16,
|
|
1231
1244
|
class: "me-menu__left-icon"
|
|
1232
1245
|
}, null, 8, ["name"])) : i("", !0),
|
|
1233
|
-
|
|
1234
|
-
!
|
|
1246
|
+
V.value ? i("", !0) : (b(), a("span", at, A(t.title), 1)),
|
|
1247
|
+
!V.value && (t.meta?.badge || t.meta?.dot) ? (b(), r(c, {
|
|
1235
1248
|
key: 2,
|
|
1236
1249
|
count: t.meta?.dot ? void 0 : t.meta?.badge,
|
|
1237
1250
|
dot: !!t.meta?.dot,
|
|
1238
|
-
color:
|
|
1251
|
+
color: de(t.meta?.badgeColor),
|
|
1239
1252
|
class: "me-menu__left-badge"
|
|
1240
1253
|
}, null, 8, [
|
|
1241
1254
|
"count",
|
|
1242
1255
|
"dot",
|
|
1243
1256
|
"color"
|
|
1244
|
-
])) :
|
|
1257
|
+
])) : V.value && (t.meta?.badge || t.meta?.dot) ? (b(), r(c, {
|
|
1245
1258
|
key: 3,
|
|
1246
1259
|
count: t.meta?.dot ? void 0 : t.meta?.badge,
|
|
1247
1260
|
dot: !!t.meta?.dot,
|
|
1248
|
-
color:
|
|
1261
|
+
color: de(t.meta?.badgeColor),
|
|
1249
1262
|
class: "me-menu__left-badge me-menu__left-badge--collapsed"
|
|
1250
1263
|
}, null, 8, [
|
|
1251
1264
|
"count",
|
|
@@ -1255,9 +1268,9 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1255
1268
|
], 42, it)], 64))), 128))]),
|
|
1256
1269
|
o("div", ot, [E(n.$slots, "footer"), o("div", {
|
|
1257
1270
|
class: "me-menu__collapse-btn",
|
|
1258
|
-
title:
|
|
1259
|
-
onClick:
|
|
1260
|
-
}, [
|
|
1271
|
+
title: V.value ? "展开菜单" : "收起菜单",
|
|
1272
|
+
onClick: re
|
|
1273
|
+
}, [V.value ? (b(), r(j(W), {
|
|
1261
1274
|
key: 1,
|
|
1262
1275
|
size: 16
|
|
1263
1276
|
})) : (b(), r(j(U), {
|
|
@@ -1268,46 +1281,46 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1268
1281
|
], 4),
|
|
1269
1282
|
L(o("div", {
|
|
1270
1283
|
class: "me-menu__popover",
|
|
1271
|
-
style: g(
|
|
1272
|
-
onMouseenter:
|
|
1273
|
-
onMouseleave:
|
|
1274
|
-
}, [o("div", ct, A(
|
|
1284
|
+
style: g(Y.value),
|
|
1285
|
+
onMouseenter: ne,
|
|
1286
|
+
onMouseleave: te
|
|
1287
|
+
}, [o("div", ct, A(J.value?.title), 1), o("div", lt, [(b(!0), a(e, null, T(ce.value, (n) => (b(), a(e, { key: "pop-" + Q(n) }, [n.meta?.type === "group" ? (b(), a(e, { key: 0 }, [o("div", ut, [o("div", {
|
|
1275
1288
|
class: "me-menu__section-header",
|
|
1276
|
-
onClick: (e) =>
|
|
1289
|
+
onClick: (e) => $(Q(n))
|
|
1277
1290
|
}, [l(j(H), {
|
|
1278
|
-
class: h(["me-menu__section-arrow", { "is-expanded":
|
|
1291
|
+
class: h(["me-menu__section-arrow", { "is-expanded": me(Q(n)) }]),
|
|
1279
1292
|
size: 12
|
|
1280
1293
|
}, null, 8, ["class"]), o("span", ft, A(n.title), 1)], 8, dt), l(t, { name: "me-menu-section" }, {
|
|
1281
|
-
default: I(() => [L(o("div", pt, [(b(!0), a(e, null, T(
|
|
1282
|
-
key: "pop-" +
|
|
1294
|
+
default: I(() => [L(o("div", pt, [(b(!0), a(e, null, T(pe(n), (e) => (b(), r($e, {
|
|
1295
|
+
key: "pop-" + Q(e),
|
|
1283
1296
|
item: e,
|
|
1284
1297
|
level: 0,
|
|
1285
|
-
onClick:
|
|
1286
|
-
onToggle:
|
|
1287
|
-
}, null, 8, ["item"]))), 128))], 512), [[P,
|
|
1298
|
+
onClick: Ce,
|
|
1299
|
+
onToggle: $
|
|
1300
|
+
}, null, 8, ["item"]))), 128))], 512), [[P, me(Q(n))]])]),
|
|
1288
1301
|
_: 2
|
|
1289
|
-
}, 1024)]), s[1] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) :
|
|
1302
|
+
}, 1024)]), s[1] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : pe(n).length > 0 ? (b(), a(e, { key: 1 }, [o("div", mt, [o("div", {
|
|
1290
1303
|
class: "me-menu__section-header",
|
|
1291
|
-
onClick: (e) =>
|
|
1304
|
+
onClick: (e) => $(Q(n))
|
|
1292
1305
|
}, [l(j(H), {
|
|
1293
|
-
class: h(["me-menu__section-arrow", { "is-expanded":
|
|
1306
|
+
class: h(["me-menu__section-arrow", { "is-expanded": me(Q(n)) }]),
|
|
1294
1307
|
size: 12
|
|
1295
1308
|
}, null, 8, ["class"]), o("span", gt, A(n.title), 1)], 8, ht), l(t, { name: "me-menu-section" }, {
|
|
1296
|
-
default: I(() => [L(o("div", _t, [(b(!0), a(e, null, T(
|
|
1297
|
-
key: "pop-" +
|
|
1309
|
+
default: I(() => [L(o("div", _t, [(b(!0), a(e, null, T(pe(n), (e) => (b(), r($e, {
|
|
1310
|
+
key: "pop-" + Q(e),
|
|
1298
1311
|
item: e,
|
|
1299
1312
|
level: 0,
|
|
1300
|
-
onClick:
|
|
1301
|
-
onToggle:
|
|
1302
|
-
}, null, 8, ["item"]))), 128))], 512), [[P,
|
|
1313
|
+
onClick: Ce,
|
|
1314
|
+
onToggle: $
|
|
1315
|
+
}, null, 8, ["item"]))), 128))], 512), [[P, me(Q(n))]])]),
|
|
1303
1316
|
_: 2
|
|
1304
1317
|
}, 1024)]), s[2] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : (b(), a("div", {
|
|
1305
1318
|
key: 2,
|
|
1306
1319
|
class: h(["me-menu__item me-menu__item--standalone", {
|
|
1307
|
-
"is-active":
|
|
1320
|
+
"is-active": le.value === Q(n),
|
|
1308
1321
|
"is-disabled": !n.enableFlag
|
|
1309
1322
|
}]),
|
|
1310
|
-
onClick: (e) =>
|
|
1323
|
+
onClick: (e) => Ce(n)
|
|
1311
1324
|
}, [
|
|
1312
1325
|
n.icon ? (b(), r(j(Ee), {
|
|
1313
1326
|
key: 0,
|
|
@@ -1320,54 +1333,54 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1320
1333
|
key: 1,
|
|
1321
1334
|
count: n.meta?.dot ? void 0 : n.meta?.badge,
|
|
1322
1335
|
dot: !!n.meta?.dot,
|
|
1323
|
-
color:
|
|
1336
|
+
color: de(n.meta?.badgeColor),
|
|
1324
1337
|
class: "me-menu__item-badge"
|
|
1325
1338
|
}, null, 8, [
|
|
1326
1339
|
"count",
|
|
1327
1340
|
"dot",
|
|
1328
1341
|
"color"
|
|
1329
1342
|
])) : i("", !0)
|
|
1330
|
-
], 10, vt))], 64))), 128)),
|
|
1343
|
+
], 10, vt))], 64))), 128)), ce.value.length === 0 ? (b(), a("div", bt, " 暂无菜单 ")) : i("", !0)])], 36), [[P, V.value && q.value && J.value]]),
|
|
1331
1344
|
L(o("div", {
|
|
1332
1345
|
class: "me-menu__right",
|
|
1333
|
-
style: g({ width:
|
|
1334
|
-
}, [o("div", xt, [(b(!0), a(e, null, T(
|
|
1346
|
+
style: g({ width: Z.value })
|
|
1347
|
+
}, [o("div", xt, [(b(!0), a(e, null, T(ce.value, (n) => (b(), a(e, { key: Q(n) }, [n.meta?.type === "group" ? (b(), a(e, { key: 0 }, [o("div", St, [o("div", {
|
|
1335
1348
|
class: "me-menu__section-header",
|
|
1336
|
-
onClick: (e) =>
|
|
1349
|
+
onClick: (e) => $(Q(n))
|
|
1337
1350
|
}, [l(j(H), {
|
|
1338
|
-
class: h(["me-menu__section-arrow", { "is-expanded":
|
|
1351
|
+
class: h(["me-menu__section-arrow", { "is-expanded": me(Q(n)) }]),
|
|
1339
1352
|
size: 12
|
|
1340
1353
|
}, null, 8, ["class"]), o("span", wt, A(n.title), 1)], 8, Ct), l(t, { name: "me-menu-section" }, {
|
|
1341
|
-
default: I(() => [L(o("div", Tt, [(b(!0), a(e, null, T(
|
|
1342
|
-
key:
|
|
1354
|
+
default: I(() => [L(o("div", Tt, [(b(!0), a(e, null, T(pe(n), (e) => (b(), r($e, {
|
|
1355
|
+
key: Q(e),
|
|
1343
1356
|
item: e,
|
|
1344
1357
|
level: 0,
|
|
1345
|
-
onClick:
|
|
1346
|
-
onToggle:
|
|
1347
|
-
}, null, 8, ["item"]))), 128))], 512), [[P,
|
|
1358
|
+
onClick: Ce,
|
|
1359
|
+
onToggle: $
|
|
1360
|
+
}, null, 8, ["item"]))), 128))], 512), [[P, me(Q(n))]])]),
|
|
1348
1361
|
_: 2
|
|
1349
|
-
}, 1024)]), s[3] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) :
|
|
1362
|
+
}, 1024)]), s[3] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : pe(n).length > 0 ? (b(), a(e, { key: 1 }, [o("div", Et, [o("div", {
|
|
1350
1363
|
class: "me-menu__section-header",
|
|
1351
|
-
onClick: (e) =>
|
|
1364
|
+
onClick: (e) => $(Q(n))
|
|
1352
1365
|
}, [l(j(H), {
|
|
1353
|
-
class: h(["me-menu__section-arrow", { "is-expanded":
|
|
1366
|
+
class: h(["me-menu__section-arrow", { "is-expanded": me(Q(n)) }]),
|
|
1354
1367
|
size: 12
|
|
1355
1368
|
}, null, 8, ["class"]), o("span", Ot, A(n.title), 1)], 8, Dt), l(t, { name: "me-menu-section" }, {
|
|
1356
|
-
default: I(() => [L(o("div", kt, [(b(!0), a(e, null, T(
|
|
1357
|
-
key:
|
|
1369
|
+
default: I(() => [L(o("div", kt, [(b(!0), a(e, null, T(pe(n), (e) => (b(), r($e, {
|
|
1370
|
+
key: Q(e),
|
|
1358
1371
|
item: e,
|
|
1359
1372
|
level: 0,
|
|
1360
|
-
onClick:
|
|
1361
|
-
onToggle:
|
|
1362
|
-
}, null, 8, ["item"]))), 128))], 512), [[P,
|
|
1373
|
+
onClick: Ce,
|
|
1374
|
+
onToggle: $
|
|
1375
|
+
}, null, 8, ["item"]))), 128))], 512), [[P, me(Q(n))]])]),
|
|
1363
1376
|
_: 2
|
|
1364
1377
|
}, 1024)]), s[4] ||= o("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : (b(), a("div", {
|
|
1365
1378
|
key: 2,
|
|
1366
1379
|
class: h(["me-menu__item me-menu__item--standalone", {
|
|
1367
|
-
"is-active":
|
|
1380
|
+
"is-active": le.value === Q(n),
|
|
1368
1381
|
"is-disabled": !n.enableFlag
|
|
1369
1382
|
}]),
|
|
1370
|
-
onClick: (e) =>
|
|
1383
|
+
onClick: (e) => Ce(n)
|
|
1371
1384
|
}, [
|
|
1372
1385
|
n.icon ? (b(), r(j(Ee), {
|
|
1373
1386
|
key: 0,
|
|
@@ -1380,14 +1393,14 @@ var Ye = Je, Xe = { class: "me-menu__tree-text" }, Ze = { class: "me-menu__tree-
|
|
|
1380
1393
|
key: 1,
|
|
1381
1394
|
count: n.meta?.dot ? void 0 : n.meta?.badge,
|
|
1382
1395
|
dot: !!n.meta?.dot,
|
|
1383
|
-
color:
|
|
1396
|
+
color: de(n.meta?.badgeColor),
|
|
1384
1397
|
class: "me-menu__item-badge"
|
|
1385
1398
|
}, null, 8, [
|
|
1386
1399
|
"count",
|
|
1387
1400
|
"dot",
|
|
1388
1401
|
"color"
|
|
1389
1402
|
])) : i("", !0)
|
|
1390
|
-
], 10, At))], 64))), 128)),
|
|
1403
|
+
], 10, At))], 64))), 128)), ce.value.length === 0 ? (b(), a("div", Mt, " 暂无菜单 ")) : i("", !0)])], 4), [[P, !V.value]])
|
|
1391
1404
|
], 6);
|
|
1392
1405
|
};
|
|
1393
1406
|
}
|
|
@@ -1590,7 +1603,7 @@ var Lt = {
|
|
|
1590
1603
|
"close-all"
|
|
1591
1604
|
],
|
|
1592
1605
|
setup(t, { expose: s, emit: c }) {
|
|
1593
|
-
let u = t, f = c, p = n(() => u.tabProps.key ?? "path"), y = n(() => u.tabProps.label ?? "title"), x = n(() => u.tabProps.isHome ?? "isHome"), S = n(() => u.tabProps.lock ?? "lock"), w = n(() => u.tabProps.icon ?? "icon"), k = n(() => u.width ? typeof u.width == "number" ? `${u.width}px` : u.width : ""), M = n(() => u.titleMaxWidth === void 0 ? {} : { maxWidth: typeof u.titleMaxWidth == "number" ? `${u.titleMaxWidth}px` : u.titleMaxWidth }), N = n(() => u.titleMaxWidth !== void 0), P = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, L = C(null), z = C(null), B = C(null), H = C(u.modelValue), { translateX: U, showLeftArrow: W, showRightArrow: G, isSmooth:
|
|
1606
|
+
let u = t, f = c, p = n(() => u.tabProps.key ?? "path"), y = n(() => u.tabProps.label ?? "title"), x = n(() => u.tabProps.isHome ?? "isHome"), S = n(() => u.tabProps.lock ?? "lock"), w = n(() => u.tabProps.icon ?? "icon"), k = n(() => u.width ? typeof u.width == "number" ? `${u.width}px` : u.width : ""), M = n(() => u.titleMaxWidth === void 0 ? {} : { maxWidth: typeof u.titleMaxWidth == "number" ? `${u.titleMaxWidth}px` : u.titleMaxWidth }), N = n(() => u.titleMaxWidth !== void 0), P = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, L = C(null), z = C(null), B = C(null), H = C(u.modelValue), { translateX: U, showLeftArrow: W, showRightArrow: G, isSmooth: K, isScrollable: q, withSmooth: J, updateArrowVisibility: Y, clampTranslateX: X, scrollLeft: ee, scrollRight: te, canScroll: ne } = Ft(z, B), re = null;
|
|
1594
1607
|
F(U, (e) => {
|
|
1595
1608
|
re === null && (re = requestAnimationFrame(() => {
|
|
1596
1609
|
re = null, f("scroll", e);
|
|
@@ -1601,13 +1614,13 @@ var Lt = {
|
|
|
1601
1614
|
let { isDragging: Z, handleDragStart: Q, handleTouchStart: ie, setDragRefs: ae, getHasDragged: oe, resetHasDragged: se } = It({
|
|
1602
1615
|
canScroll: ne,
|
|
1603
1616
|
translateX: U,
|
|
1604
|
-
clampTranslateX:
|
|
1605
|
-
updateArrowVisibility:
|
|
1617
|
+
clampTranslateX: X,
|
|
1618
|
+
updateArrowVisibility: Y
|
|
1606
1619
|
}), ce = 0, le = null, ue = (e) => {
|
|
1607
1620
|
if (!ne()) return;
|
|
1608
1621
|
let t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
|
|
1609
1622
|
t !== 0 && (e.preventDefault(), ce += t, le === null && (le = requestAnimationFrame(() => {
|
|
1610
|
-
le = null, U.value -= ce, ce = 0,
|
|
1623
|
+
le = null, U.value -= ce, ce = 0, X(), Y();
|
|
1611
1624
|
})));
|
|
1612
1625
|
};
|
|
1613
1626
|
_(() => {
|
|
@@ -1627,10 +1640,10 @@ var Lt = {
|
|
|
1627
1640
|
let n = z.value.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
1628
1641
|
if (r.left >= n.left && r.right <= n.right) return;
|
|
1629
1642
|
let i = u.scrollTargetOffset, a = i <= 1 ? n.width * i : i, o;
|
|
1630
|
-
o = r.left < n.left ? r.left - n.left - a : r.right - n.right + a, !(Math.abs(o) < 1) && (
|
|
1643
|
+
o = r.left < n.left ? r.left - n.left - a : r.right - n.right + a, !(Math.abs(o) < 1) && (K.value = !0, requestAnimationFrame(() => {
|
|
1631
1644
|
requestAnimationFrame(() => {
|
|
1632
|
-
U.value -= o,
|
|
1633
|
-
|
|
1645
|
+
U.value -= o, X(), Y(), setTimeout(() => {
|
|
1646
|
+
K.value = !1;
|
|
1634
1647
|
}, 300);
|
|
1635
1648
|
});
|
|
1636
1649
|
}));
|
|
@@ -1639,12 +1652,12 @@ var Lt = {
|
|
|
1639
1652
|
let t = e ?? H.value;
|
|
1640
1653
|
t && pe(t);
|
|
1641
1654
|
}, me = () => {
|
|
1642
|
-
|
|
1643
|
-
U.value = 0,
|
|
1655
|
+
J(() => {
|
|
1656
|
+
U.value = 0, X(), Y();
|
|
1644
1657
|
});
|
|
1645
1658
|
}, he = () => {
|
|
1646
|
-
|
|
1647
|
-
!z.value || !B.value || (U.value = z.value.clientWidth - B.value.scrollWidth,
|
|
1659
|
+
J(() => {
|
|
1660
|
+
!z.value || !B.value || (U.value = z.value.clientWidth - B.value.scrollWidth, X(), Y());
|
|
1648
1661
|
});
|
|
1649
1662
|
}, ge = (e) => u.closable ? !e[x.value] && !e[S.value] : !1, _e = {
|
|
1650
1663
|
refresh: "RefreshCw",
|
|
@@ -1805,22 +1818,22 @@ var Lt = {
|
|
|
1805
1818
|
H.value = e, $(e);
|
|
1806
1819
|
}), F(() => u.tabList, () => {
|
|
1807
1820
|
m(() => {
|
|
1808
|
-
$(H.value),
|
|
1821
|
+
$(H.value), Y();
|
|
1809
1822
|
});
|
|
1810
1823
|
}, {
|
|
1811
1824
|
flush: "post",
|
|
1812
1825
|
deep: !0
|
|
1813
1826
|
}), F(() => u.width, () => {
|
|
1814
1827
|
m(() => {
|
|
1815
|
-
|
|
1828
|
+
X(), Y(), $(H.value);
|
|
1816
1829
|
});
|
|
1817
1830
|
});
|
|
1818
1831
|
let De = null, Oe = () => {
|
|
1819
|
-
|
|
1832
|
+
X(), Y(), $(H.value);
|
|
1820
1833
|
};
|
|
1821
1834
|
return v(() => {
|
|
1822
1835
|
ae(z.value, B.value), m(() => {
|
|
1823
|
-
|
|
1836
|
+
Y(), H.value && $(H.value);
|
|
1824
1837
|
}), typeof ResizeObserver < "u" && z.value && (De = new ResizeObserver(() => {
|
|
1825
1838
|
Oe();
|
|
1826
1839
|
}), De.observe(z.value));
|
|
@@ -1847,7 +1860,7 @@ var Lt = {
|
|
|
1847
1860
|
class: h(["me-nav__arrow me-nav__arrow--left", { "is-hidden": !j(W) }]),
|
|
1848
1861
|
role: "button",
|
|
1849
1862
|
"aria-label": "向左滚动",
|
|
1850
|
-
onClick: s[0] ||= (...e) => j(
|
|
1863
|
+
onClick: s[0] ||= (...e) => j(ee) && j(ee)(...e)
|
|
1851
1864
|
}, [l(Ce, {
|
|
1852
1865
|
name: "ChevronLeft",
|
|
1853
1866
|
size: 14
|
|
@@ -1855,7 +1868,7 @@ var Lt = {
|
|
|
1855
1868
|
o("div", {
|
|
1856
1869
|
class: h(["me-nav__scroll", {
|
|
1857
1870
|
"is-dragging": j(Z),
|
|
1858
|
-
"is-scrollable": j(
|
|
1871
|
+
"is-scrollable": j(q)
|
|
1859
1872
|
}]),
|
|
1860
1873
|
ref_key: "scrollRef",
|
|
1861
1874
|
ref: z,
|
|
@@ -1866,7 +1879,7 @@ var Lt = {
|
|
|
1866
1879
|
}, [
|
|
1867
1880
|
t.edgeFade && j(W) ? (b(), a("div", Rt)) : i("", !0),
|
|
1868
1881
|
o("div", {
|
|
1869
|
-
class: h(["me-nav__list", { "is-smooth": j(
|
|
1882
|
+
class: h(["me-nav__list", { "is-smooth": j(K) }]),
|
|
1870
1883
|
ref_key: "listRef",
|
|
1871
1884
|
ref: B,
|
|
1872
1885
|
style: g({ transform: `translateX(${j(U)}px)` })
|
|
@@ -2041,7 +2054,7 @@ var qt = Kt, Jt = { class: "me-modal__title-row" }, Yt = { class: "me-modal__tit
|
|
|
2041
2054
|
"cancel"
|
|
2042
2055
|
],
|
|
2043
2056
|
setup(e, { expose: t, emit: s }) {
|
|
2044
|
-
let { defaultAlgorithm: u, darkAlgorithm: d } = B, f = e, m = s, h = M(), g =
|
|
2057
|
+
let { defaultAlgorithm: u, darkAlgorithm: d } = B, f = e, m = s, h = M(), g = K, _ = J, x = n(() => !!f.loading), S = n(() => f.title ?? ""), w = n(() => {
|
|
2045
2058
|
let { open: e, fullscreen: t, defaultFullscreen: n, width: r, loading: i, "onUpdate:open": a, "onFullscreen-change": o, onOk: s, onCancel: c, ...l } = h;
|
|
2046
2059
|
return l;
|
|
2047
2060
|
}), T = n(() => f.fullscreen), k = n({
|
|
@@ -2976,7 +2989,7 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
2976
2989
|
};
|
|
2977
2990
|
return r(u.list);
|
|
2978
2991
|
}), B = C(""), V = () => {
|
|
2979
|
-
B.value = "create",
|
|
2992
|
+
B.value = "create", X(), f("create");
|
|
2980
2993
|
}, H = async () => {
|
|
2981
2994
|
await m.value?.validate() && f("update", u.form);
|
|
2982
2995
|
}, U = (e) => [
|
|
@@ -2984,21 +2997,21 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
2984
2997
|
label: `添加子${u.label}`,
|
|
2985
2998
|
icon: "PlusCircle",
|
|
2986
2999
|
onClick: () => {
|
|
2987
|
-
B.value = "create-child",
|
|
3000
|
+
B.value = "create-child", X(), f("context-menu-add", e);
|
|
2988
3001
|
}
|
|
2989
3002
|
},
|
|
2990
3003
|
{
|
|
2991
3004
|
label: `编辑${u.label}`,
|
|
2992
3005
|
icon: "Pencil",
|
|
2993
3006
|
onClick: () => {
|
|
2994
|
-
B.value = "edit",
|
|
3007
|
+
B.value = "edit", X(), f("context-menu-edit", e);
|
|
2995
3008
|
}
|
|
2996
3009
|
},
|
|
2997
3010
|
{
|
|
2998
3011
|
label: `复制${u.label}`,
|
|
2999
3012
|
icon: "Copy",
|
|
3000
3013
|
onClick: () => {
|
|
3001
|
-
B.value = "copy",
|
|
3014
|
+
B.value = "copy", X(), f("context-menu-copy", e);
|
|
3002
3015
|
}
|
|
3003
3016
|
},
|
|
3004
3017
|
{
|
|
@@ -3022,18 +3035,18 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3022
3035
|
}
|
|
3023
3036
|
})),
|
|
3024
3037
|
onClick: () => {}
|
|
3025
|
-
}),
|
|
3038
|
+
}), K = (e) => {
|
|
3026
3039
|
e.event.preventDefault();
|
|
3027
3040
|
let t = e.node?.dataRef || e.node || {}, n = k.value.key || "id";
|
|
3028
3041
|
x.value = [t[n]];
|
|
3029
|
-
},
|
|
3042
|
+
}, q = (e, t) => {
|
|
3030
3043
|
if (x.value = e, e.length > 0 && t?.node) {
|
|
3031
3044
|
let e = t.node.dataRef || t.node || {};
|
|
3032
|
-
B.value = "edit",
|
|
3045
|
+
B.value = "edit", X(), f("node-click", e);
|
|
3033
3046
|
}
|
|
3034
|
-
},
|
|
3047
|
+
}, J = (e) => {
|
|
3035
3048
|
if (!u.fetchDataHandle) return;
|
|
3036
|
-
let t = e.dragNode, n = e.node, r = e.dropPosition, i = k.value.key || "id", a = k.value.children || "children", o = String(t[i]), s = r === 0 ? String(n[i]) : n.parentId || n.parentNode?.[i] || "0", c =
|
|
3049
|
+
let t = e.dragNode, n = e.node, r = e.dropPosition, i = k.value.key || "id", a = k.value.children || "children", o = String(t[i]), s = r === 0 ? String(n[i]) : n.parentId || n.parentNode?.[i] || "0", c = Y(n, r, o, i, a), l = u.moveConfirm.title || "提示", d = u.moveConfirm.message || "确定保存移动吗?", f = u.moveConfirm.type || "danger";
|
|
3037
3050
|
if (!u.showMoveConfirm) {
|
|
3038
3051
|
u.apiMoveHandle?.({
|
|
3039
3052
|
id: o,
|
|
@@ -3069,18 +3082,18 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3069
3082
|
cancel: () => (u.fetchDataHandle?.({ expandKeys: [s] }), !0)
|
|
3070
3083
|
}
|
|
3071
3084
|
});
|
|
3072
|
-
},
|
|
3085
|
+
}, Y = (e, t, n, r, i) => {
|
|
3073
3086
|
let a = e.parentNode?.[i] || e.parent?.children || u.list, o = [];
|
|
3074
3087
|
for (let i of a) {
|
|
3075
3088
|
let a = String(i[r]);
|
|
3076
3089
|
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));
|
|
3077
3090
|
}
|
|
3078
3091
|
return t === 0 ? [...e[i]?.map((e) => String(e[r])) || [], n] : o;
|
|
3079
|
-
},
|
|
3092
|
+
}, X = () => {
|
|
3080
3093
|
u.openHandle ? u.openHandle() : m.value?.open();
|
|
3081
3094
|
};
|
|
3082
3095
|
return t({
|
|
3083
|
-
open:
|
|
3096
|
+
open: X,
|
|
3084
3097
|
close: () => {
|
|
3085
3098
|
m.value?.close();
|
|
3086
3099
|
},
|
|
@@ -3141,9 +3154,9 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3141
3154
|
"expanded-keys": y.value,
|
|
3142
3155
|
"selected-keys": x.value,
|
|
3143
3156
|
"onUpdate:expandedKeys": w,
|
|
3144
|
-
onSelect:
|
|
3145
|
-
onRightClick:
|
|
3146
|
-
onDrop:
|
|
3157
|
+
onSelect: q,
|
|
3158
|
+
onRightClick: K,
|
|
3159
|
+
onDrop: J
|
|
3147
3160
|
}, {
|
|
3148
3161
|
titleRender: I((e) => [o("div", Nn, [o("div", Pn, [E(t.$slots, "label", { data: e }, () => [l(rn, {
|
|
3149
3162
|
actions: h.value,
|
|
@@ -9467,7 +9480,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9467
9480
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
9468
9481
|
})(e);
|
|
9469
9482
|
}
|
|
9470
|
-
function
|
|
9483
|
+
function K(e, t) {
|
|
9471
9484
|
for (var n = 0; n < t.length; n++) {
|
|
9472
9485
|
var r = t[n];
|
|
9473
9486
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ((e) => (e = ((e, t) => {
|
|
@@ -9479,7 +9492,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9479
9492
|
})(e, "string"), G(e) == "symbol" ? e : e + ""))(r.key), r);
|
|
9480
9493
|
}
|
|
9481
9494
|
}
|
|
9482
|
-
var
|
|
9495
|
+
var q = (() => {
|
|
9483
9496
|
function e(t, n) {
|
|
9484
9497
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function");
|
|
9485
9498
|
var r = this, t = (this.editor = t, this.timeout = void 0, this.delay = 200, this.lastText = void 0, this.results = null, this.dom = {}, this.dom.container = n, document.createElement("div")), n = ((this.dom.wrapper = t).className = "jsoneditor-search", n.appendChild(t), document.createElement("div")), n = ((this.dom.results = n).className = "jsoneditor-results", t.appendChild(n), document.createElement("div")), t = ((this.dom.input = n).className = "jsoneditor-frame", n.title = (0, _.Tl)("searchTitle"), t.appendChild(n), document.createElement("button")), i = (t.type = "button", t.className = "jsoneditor-refresh", n.appendChild(t), document.createElement("input")), t = (i.type = "text", (this.dom.search = i).oninput = function(e) {
|
|
@@ -9595,29 +9608,29 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9595
9608
|
this.editor = null, this.dom.container.removeChild(this.dom.wrapper), this.dom = null, this.results = null, this.activeResult = null, this._clearDelay();
|
|
9596
9609
|
}
|
|
9597
9610
|
}
|
|
9598
|
-
]) &&
|
|
9611
|
+
]) && K(t.prototype, n), r && K(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
9599
9612
|
var t, n, r;
|
|
9600
9613
|
})();
|
|
9601
|
-
function
|
|
9602
|
-
return (
|
|
9614
|
+
function J(e) {
|
|
9615
|
+
return (J = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
9603
9616
|
return typeof e;
|
|
9604
9617
|
} : function(e) {
|
|
9605
9618
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
9606
9619
|
})(e);
|
|
9607
9620
|
}
|
|
9608
|
-
function
|
|
9621
|
+
function Y(e, t) {
|
|
9609
9622
|
for (var n = 0; n < t.length; n++) {
|
|
9610
9623
|
var r = t[n];
|
|
9611
9624
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ((e) => (e = ((e, t) => {
|
|
9612
|
-
if (
|
|
9625
|
+
if (J(e) != "object" || !e) return e;
|
|
9613
9626
|
var n = e[Symbol.toPrimitive];
|
|
9614
9627
|
if (n === void 0) return (t === "string" ? String : Number)(e);
|
|
9615
|
-
if (
|
|
9628
|
+
if (J(n = n.call(e, t || "default")) != "object") return n;
|
|
9616
9629
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
9617
|
-
})(e, "string"),
|
|
9630
|
+
})(e, "string"), J(e) == "symbol" ? e : e + ""))(r.key), r);
|
|
9618
9631
|
}
|
|
9619
9632
|
}
|
|
9620
|
-
var
|
|
9633
|
+
var X = (() => {
|
|
9621
9634
|
function e(t, n) {
|
|
9622
9635
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function");
|
|
9623
9636
|
t && (this.root = n, this.path = document.createElement("div"), this.path.className = "jsoneditor-treepath", this.path.setAttribute("tabindex", 0), this.contentMenuClicked = !1, t.appendChild(this.path), this.reset());
|
|
@@ -9669,9 +9682,9 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9669
9682
|
typeof e == "function" && (this.contextMenuCallback = e);
|
|
9670
9683
|
}
|
|
9671
9684
|
}
|
|
9672
|
-
]) &&
|
|
9685
|
+
]) && Y(t.prototype, n), r && Y(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
9673
9686
|
var t, n, r;
|
|
9674
|
-
})(), t = n(1746),
|
|
9687
|
+
})(), t = n(1746), ee = n.n(t), n = {
|
|
9675
9688
|
create: function(e, t) {
|
|
9676
9689
|
if (!e) throw Error("No container element provided.");
|
|
9677
9690
|
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 W(this)), this._createFrame(), this._createTable();
|
|
@@ -9696,7 +9709,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9696
9709
|
colorPicker: !0,
|
|
9697
9710
|
onColorPicker: function(e, t, n) {
|
|
9698
9711
|
var r;
|
|
9699
|
-
|
|
9712
|
+
ee() ? (r = e.getBoundingClientRect().top, r = (0, S.getWindow)(e).innerHeight - r < 300 && 300 < r, new (ee())({
|
|
9700
9713
|
parent: e,
|
|
9701
9714
|
color: t,
|
|
9702
9715
|
popup: r ? "top" : "bottom",
|
|
@@ -9971,7 +9984,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
9971
9984
|
} catch (e) {
|
|
9972
9985
|
a._onError(e);
|
|
9973
9986
|
}
|
|
9974
|
-
})), this.options.search) && (this.searchBox = new
|
|
9987
|
+
})), this.options.search) && (this.searchBox = new q(this, this.menu)), this.options.navigationBar && (this.navBar = document.createElement("div"), this.navBar.className = "jsoneditor-navigation-bar nav-bar-empty", this.frame.appendChild(this.navBar), this.treePath = new X(this.navBar, this.getPopupAnchor()), this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)), this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)));
|
|
9975
9988
|
},
|
|
9976
9989
|
_onUndo: function() {
|
|
9977
9990
|
this.history && (this.history.undo(), this._onChange());
|
|
@@ -10211,7 +10224,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10211
10224
|
return ge;
|
|
10212
10225
|
},
|
|
10213
10226
|
debounce: function() {
|
|
10214
|
-
return
|
|
10227
|
+
return ee;
|
|
10215
10228
|
},
|
|
10216
10229
|
escapeUnicodeChars: function() {
|
|
10217
10230
|
return h;
|
|
@@ -10271,10 +10284,10 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10271
10284
|
return R;
|
|
10272
10285
|
},
|
|
10273
10286
|
improveSchemaError: function() {
|
|
10274
|
-
return
|
|
10287
|
+
return q;
|
|
10275
10288
|
},
|
|
10276
10289
|
insideRect: function() {
|
|
10277
|
-
return
|
|
10290
|
+
return X;
|
|
10278
10291
|
},
|
|
10279
10292
|
isArray: function() {
|
|
10280
10293
|
return S;
|
|
@@ -10289,7 +10302,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10289
10302
|
return he;
|
|
10290
10303
|
},
|
|
10291
10304
|
isPromise: function() {
|
|
10292
|
-
return
|
|
10305
|
+
return J;
|
|
10293
10306
|
},
|
|
10294
10307
|
isTimestamp: function() {
|
|
10295
10308
|
return pe;
|
|
@@ -10301,7 +10314,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10301
10314
|
return ae;
|
|
10302
10315
|
},
|
|
10303
10316
|
isValidValidationError: function() {
|
|
10304
|
-
return
|
|
10317
|
+
return Y;
|
|
10305
10318
|
},
|
|
10306
10319
|
isValidationErrorChanged: function() {
|
|
10307
10320
|
return _e;
|
|
@@ -10352,7 +10365,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10352
10365
|
return de;
|
|
10353
10366
|
},
|
|
10354
10367
|
stringifyPath: function() {
|
|
10355
|
-
return
|
|
10368
|
+
return K;
|
|
10356
10369
|
},
|
|
10357
10370
|
stripFormatting: function() {
|
|
10358
10371
|
return k;
|
|
@@ -10580,27 +10593,27 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
10580
10593
|
}
|
|
10581
10594
|
return t;
|
|
10582
10595
|
}
|
|
10583
|
-
function
|
|
10596
|
+
function K(e) {
|
|
10584
10597
|
return e.map(function(e) {
|
|
10585
10598
|
return typeof e == "number" ? "[" + e + "]" : typeof e == "string" && e.match(/^[A-Za-z0-9_$]+$/) ? "." + e : "[\"" + e + "\"]";
|
|
10586
10599
|
}).join("");
|
|
10587
10600
|
}
|
|
10588
|
-
function
|
|
10601
|
+
function q(e) {
|
|
10589
10602
|
var t, n;
|
|
10590
10603
|
return e.keyword === "enum" && Array.isArray(e.schema) && (n = e.schema) && (5 < (n = n.map(function(e) {
|
|
10591
10604
|
return JSON.stringify(e);
|
|
10592
10605
|
})).length && (t = ["(" + (n.length - 5) + " more...)"], (n = n.slice(0, 5)).push(t)), e.message = "should be equal to one of: " + n.join(", ")), e.keyword === "additionalProperties" && (e.message = "should NOT have additional property: " + e.params.additionalProperty), e;
|
|
10593
10606
|
}
|
|
10594
|
-
function
|
|
10607
|
+
function J(e) {
|
|
10595
10608
|
return e && typeof e.then == "function" && typeof e.catch == "function";
|
|
10596
10609
|
}
|
|
10597
|
-
function
|
|
10610
|
+
function Y(e) {
|
|
10598
10611
|
return u(e) === "object" && Array.isArray(e.path) && typeof e.message == "string";
|
|
10599
10612
|
}
|
|
10600
|
-
function
|
|
10613
|
+
function X(e, t, n) {
|
|
10601
10614
|
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;
|
|
10602
10615
|
}
|
|
10603
|
-
function
|
|
10616
|
+
function ee(e, t, n) {
|
|
10604
10617
|
var r;
|
|
10605
10618
|
return function() {
|
|
10606
10619
|
var i = this, a = arguments, o = n && !r;
|
|
@@ -24794,21 +24807,21 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
24794
24807
|
}
|
|
24795
24808
|
i += " ); if (isAdditional" + a + ") { ";
|
|
24796
24809
|
}
|
|
24797
|
-
E == "all" ? i += " delete " + d + "[" + h + "]; " : (G = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (
|
|
24810
|
+
E == "all" ? i += " delete " + d + "[" + h + "]; " : (G = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (K = l, l = e.errSchemaPath + "/additionalProperties", (J ||= []).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 += " } "), Y = i, i = J.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + Y + "]); " : i += " validate.errors = [" + Y + "]; return false; " : i += " var err = " + Y + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = K, 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 = G), C && (i += " } "), i += " } ", u && (i += " if (" + m + ") { ", p += "}");
|
|
24798
24811
|
}
|
|
24799
24812
|
var R = e.opts.useDefaults && !e.compositeRule;
|
|
24800
24813
|
if (o.length) {
|
|
24801
24814
|
var z = o;
|
|
24802
24815
|
if (z) for (var B, V = -1, H = z.length - 1; V < H;) {
|
|
24803
|
-
var U, W, G,
|
|
24804
|
-
(e.opts.strictKeywords ? typeof
|
|
24816
|
+
var U, W, G, K, q, J, Y, X = s[B = z[V += 1]];
|
|
24817
|
+
(e.opts.strictKeywords ? typeof X == "object" && 0 < Object.keys(X).length || !1 === X : e.util.schemaHasRules(X, e.RULES.all)) && (Z = d + (q = e.util.getProperty(B)), U = R && X.default !== void 0, f.schema = X, f.schemaPath = c + q, 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), W = Z) : i += " var " + (W = v) + " = " + Z + "; ", U ? i += " " + Q + " " : (r && r[B] ? (i += " if ( " + W + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = false; ", G = e.errorPath, K = l, q = e.util.escapeQuotes(B), e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(G, B, e.opts.jsonPointers)), l = e.errSchemaPath + "/required", (J ||= []).push(i), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { missingProperty: '" + q + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is a required property" : i += "should have required property \\'" + q + "\\'", i += "' "), e.opts.verbose && (i += " , schema: validate.schema" + c + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), Y = i, i = J.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + Y + "]); " : i += " validate.errors = [" + Y + "]; return false; " : i += " var err = " + Y + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = K, e.errorPath = G, i += " } else { ") : u ? (i += " if ( " + W + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = true; } else { ") : (i += " if (" + W + " !== undefined ", O && (i += " && Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += " ) { "), i += " " + Q + " } ")), u && (i += " if (" + m + ") { ", p += "}");
|
|
24805
24818
|
}
|
|
24806
24819
|
}
|
|
24807
24820
|
if (x.length) {
|
|
24808
|
-
var
|
|
24809
|
-
if (
|
|
24810
|
-
var Z, Q,
|
|
24811
|
-
(e.opts.strictKeywords ? typeof
|
|
24821
|
+
var ee = x;
|
|
24822
|
+
if (ee) for (var te, ne = -1, re = ee.length - 1; ne < re;) {
|
|
24823
|
+
var Z, Q, X = b[te = ee[ne += 1]];
|
|
24824
|
+
(e.opts.strictKeywords ? typeof X == "object" && 0 < Object.keys(X).length || !1 === X : e.util.schemaHasRules(X, e.RULES.all)) && (f.schema = X, f.schemaPath = e.schemaPath + ".patternProperties" + e.util.getProperty(te), f.errSchemaPath = e.errSchemaPath + "/patternProperties/" + e.util.escapeFragment(te), 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(te) + ".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 += "}");
|
|
24812
24825
|
}
|
|
24813
24826
|
}
|
|
24814
24827
|
return u && (i += " " + p + " if (" + t + " == errors) {"), i;
|
|
@@ -24930,7 +24943,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
24930
24943
|
if (e.schema.$comment && e.opts.$comment && (r += " " + e.RULES.all.$comment.code(e, "$comment")), _) {
|
|
24931
24944
|
e.opts.coerceTypes && (y = e.util.coerceToTypes(e.opts.coerceTypes, _));
|
|
24932
24945
|
var y, b = e.RULES.types[_];
|
|
24933
|
-
if (y || v || !0 === b || b && !
|
|
24946
|
+
if (y || v || !0 === b || b && !q(b)) {
|
|
24934
24947
|
var x = e.schemaPath + ".type", S = e.errSchemaPath + "/type", x = e.schemaPath + ".type", S = e.errSchemaPath + "/type";
|
|
24935
24948
|
if (r += " if (" + e.util[v ? "checkDataTypes" : "checkDataType"](_, d, e.opts.strictNumbers, !0) + ") { ", y) {
|
|
24936
24949
|
var C = "dataType" + l, w = "coerced" + l, T = (r += " var " + C + " = typeof " + d + "; var " + w + " = undefined; ", e.opts.coerceTypes == "array" && (r += " if (" + C + " == 'object' && Array.isArray(" + d + ") && " + d + ".length == 1) { " + d + " = " + d + "[0]; " + C + " = typeof " + d + "; if (" + e.util.checkDataType(e.schema.type, d, e.opts.strictNumbers) + ") " + w + " = " + d + "; } "), r += " if (" + w + " !== undefined) ; ", y);
|
|
@@ -24946,7 +24959,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
24946
24959
|
else {
|
|
24947
24960
|
var A = e.RULES;
|
|
24948
24961
|
if (A) {
|
|
24949
|
-
for (var j = -1, M = A.length - 1; j < M;) if (
|
|
24962
|
+
for (var j = -1, M = A.length - 1; j < M;) if (q(b = A[j += 1])) {
|
|
24950
24963
|
if (b.type && (r += " if (" + e.util.checkDataType(b.type, d, e.opts.strictNumbers) + ") { "), e.opts.useDefaults) {
|
|
24951
24964
|
if (b.type == "object" && e.schema.properties) {
|
|
24952
24965
|
var N = e.schema.properties, P = Object.keys(N);
|
|
@@ -24976,7 +24989,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
24976
24989
|
}
|
|
24977
24990
|
}
|
|
24978
24991
|
var H, U = b.rules;
|
|
24979
|
-
if (U) for (var W, G = -1,
|
|
24992
|
+
if (U) for (var W, G = -1, K = U.length - 1; G < K;) J(W = U[G += 1]) && (W = W.code(e, W.keyword, b.type)) && (r += " " + W + " ", m) && (h += "}");
|
|
24980
24993
|
m && (r += " " + h + " ", h = ""), b.type && (r += " } ", _) && _ === b.type && !y && (r += " else { ", x = e.schemaPath + ".type", S = e.errSchemaPath + "/type", (H ||= []).push(r), r = "", !1 === e.createErrors ? r += " {} " : (r = (r += " { keyword: 'type' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(S) + " , params: { type: '") + (v ? "" + _.join(",") : "" + _) + "' } ", !1 !== e.opts.messages && (r = (r += " , message: 'should be ") + (v ? "" + _.join(",") : "" + _) + "' "), e.opts.verbose && (r += " , schema: validate.schema" + x + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), r += " } "), k = r, r = H.pop(), !e.compositeRule && m ? e.async ? r += " throw new ValidationError([" + k + "]); " : r += " validate.errors = [" + k + "]; return false; " : r += " var err = " + k + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } "), m && (r = (r += " if (errors === ") + (c ? "0" : "errs_" + l) + ") { ", g += "}");
|
|
24981
24994
|
}
|
|
24982
24995
|
}
|
|
@@ -24984,10 +24997,10 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
24984
24997
|
m && (r += " " + g + " "), c ? r = r + (i ? " if (errors === 0) return data; else throw new ValidationError(vErrors); " : " validate.errors = vErrors; return errors === 0; ") + " }; return validate;" : r += " var " + p + " = errors === errs_" + l + ";";
|
|
24985
24998
|
}
|
|
24986
24999
|
return r;
|
|
24987
|
-
function
|
|
24988
|
-
for (var t = e.rules, n = 0; n < t.length; n++) if (
|
|
25000
|
+
function q(e) {
|
|
25001
|
+
for (var t = e.rules, n = 0; n < t.length; n++) if (J(t[n])) return 1;
|
|
24989
25002
|
}
|
|
24990
|
-
function
|
|
25003
|
+
function J(t) {
|
|
24991
25004
|
return e.schema[t.keyword] !== void 0 || t.implements && ((t) => {
|
|
24992
25005
|
for (var n = t.implements, r = 0; r < n.length; r++) if (e.schema[n[r]] !== void 0) return 1;
|
|
24993
25006
|
})(t);
|
|
@@ -26844,14 +26857,14 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26844
26857
|
var a, c = a.length ? a.join("") : void 0;
|
|
26845
26858
|
return c !== void 0 && (t.reference !== "suffix" && r.push("//"), r.push(c), e.path) && e.path.charAt(0) !== "/" && r.push("/"), e.path !== void 0 && (n = e.path, t.absolutePath || i && i.absolutePath || (n = W(n)), c === void 0 && (n = n.replace(/^\/\//, "/%2F")), r.push(n)), e.query !== void 0 && (r.push("?"), r.push(e.query)), e.fragment !== void 0 && (r.push("#"), r.push(e.fragment)), r.join("");
|
|
26846
26859
|
}
|
|
26847
|
-
function
|
|
26860
|
+
function K(e, t) {
|
|
26848
26861
|
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {}, r = {};
|
|
26849
26862
|
return arguments[3] || (e = z(G(e, n), n), t = z(G(t, n), n)), !(n || {}).tolerant && t.scheme ? (r.scheme = t.scheme, r.userinfo = t.userinfo, r.host = t.host, r.port = t.port, r.path = W(t.path || ""), r.query = t.query) : (t.userinfo !== void 0 || t.host !== void 0 || t.port !== void 0 ? (r.userinfo = t.userinfo, r.host = t.host, r.port = t.port, r.path = W(t.path || ""), r.query = t.query) : (t.path ? (t.path.charAt(0) === "/" ? r.path = W(t.path) : (r.path = e.userinfo === void 0 && e.host === void 0 && e.port === void 0 || e.path ? e.path ? e.path.slice(0, e.path.lastIndexOf("/") + 1) + t.path : t.path : "/" + t.path, r.path = W(r.path)), r.query = t.query) : (r.path = e.path, r.query = t.query === void 0 ? e.query : t.query), r.userinfo = e.userinfo, r.host = e.host, r.port = e.port), r.scheme = e.scheme), r.fragment = t.fragment, r;
|
|
26850
26863
|
}
|
|
26851
|
-
function
|
|
26864
|
+
function q(e, t) {
|
|
26852
26865
|
return e && e.toString().replace((t && t.iri ? s : o).PCT_ENCODED, M);
|
|
26853
26866
|
}
|
|
26854
|
-
var
|
|
26867
|
+
var J = {
|
|
26855
26868
|
scheme: "http",
|
|
26856
26869
|
domainHost: !0,
|
|
26857
26870
|
parse: function(e, t) {
|
|
@@ -26861,30 +26874,30 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26861
26874
|
var n = String(e.scheme).toLowerCase() === "https";
|
|
26862
26875
|
return e.port !== (n ? 443 : 80) && e.port !== "" || (e.port = void 0), e.path ||= "/", e;
|
|
26863
26876
|
}
|
|
26864
|
-
},
|
|
26877
|
+
}, Y = {
|
|
26865
26878
|
scheme: "https",
|
|
26866
|
-
domainHost:
|
|
26867
|
-
parse:
|
|
26868
|
-
serialize:
|
|
26879
|
+
domainHost: J.domainHost,
|
|
26880
|
+
parse: J.parse,
|
|
26881
|
+
serialize: J.serialize
|
|
26869
26882
|
};
|
|
26870
|
-
function
|
|
26883
|
+
function X(e) {
|
|
26871
26884
|
return typeof e.secure == "boolean" ? e.secure : String(e.scheme).toLowerCase() === "wss";
|
|
26872
26885
|
}
|
|
26873
|
-
var
|
|
26886
|
+
var ee = {
|
|
26874
26887
|
scheme: "ws",
|
|
26875
26888
|
domainHost: !0,
|
|
26876
26889
|
parse: function(e, t) {
|
|
26877
|
-
return e.secure =
|
|
26890
|
+
return e.secure = X(e), e.resourceName = (e.path || "/") + (e.query ? "?" + e.query : ""), e.path = void 0, e.query = void 0, e;
|
|
26878
26891
|
},
|
|
26879
26892
|
serialize: function(e, t) {
|
|
26880
26893
|
var n, r;
|
|
26881
|
-
return e.port !== (
|
|
26894
|
+
return e.port !== (X(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;
|
|
26882
26895
|
}
|
|
26883
26896
|
}, te = {
|
|
26884
26897
|
scheme: "wss",
|
|
26885
|
-
domainHost:
|
|
26886
|
-
parse:
|
|
26887
|
-
serialize:
|
|
26898
|
+
domainHost: ee.domainHost,
|
|
26899
|
+
parse: ee.parse,
|
|
26900
|
+
serialize: ee.serialize
|
|
26888
26901
|
}, ne = {}, re = "[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(re, "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"), oe = new RegExp(t("[^]", re, "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"), "g"), se = oe;
|
|
26889
26902
|
function ce(e) {
|
|
26890
26903
|
var t = M(e);
|
|
@@ -26902,12 +26915,12 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26902
26915
|
for (var u = l[1].split(","), d = 0, f = u.length; d < f; ++d) r.push(u[d]);
|
|
26903
26916
|
break;
|
|
26904
26917
|
case "subject":
|
|
26905
|
-
n.subject =
|
|
26918
|
+
n.subject = q(l[1], t);
|
|
26906
26919
|
break;
|
|
26907
26920
|
case "body":
|
|
26908
|
-
n.body =
|
|
26921
|
+
n.body = q(l[1], t);
|
|
26909
26922
|
break;
|
|
26910
|
-
default: i = !0, a[
|
|
26923
|
+
default: i = !0, a[q(l[0], t)] = q(l[1], t);
|
|
26911
26924
|
}
|
|
26912
26925
|
}
|
|
26913
26926
|
i && (n.headers = a);
|
|
@@ -26915,9 +26928,9 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26915
26928
|
n.query = void 0;
|
|
26916
26929
|
for (var p = 0, m = r.length; p < m; ++p) {
|
|
26917
26930
|
var h = r[p].split("@");
|
|
26918
|
-
if (h[0] =
|
|
26931
|
+
if (h[0] = q(h[0]), t.unicodeSupport) h[1] = q(h[1], t).toLowerCase();
|
|
26919
26932
|
else try {
|
|
26920
|
-
h[1] = O(
|
|
26933
|
+
h[1] = O(q(h[1], t).toLowerCase());
|
|
26921
26934
|
} catch (e) {
|
|
26922
26935
|
n.error = n.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
|
26923
26936
|
}
|
|
@@ -26931,7 +26944,7 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26931
26944
|
for (var o = 0, s = a.length; o < s; ++o) {
|
|
26932
26945
|
var c = String(a[o]), l = c.lastIndexOf("@"), u = c.slice(0, l).replace(ie, ce).replace(ie, i).replace(ae, j), c = c.slice(l + 1);
|
|
26933
26946
|
try {
|
|
26934
|
-
c = t.iri ? k(c) : O(
|
|
26947
|
+
c = t.iri ? k(c) : O(q(c, t).toLowerCase());
|
|
26935
26948
|
} catch (e) {
|
|
26936
26949
|
r.error = r.error || "Email address's domain name can not be converted to " + (t.iri ? "Unicode" : "ASCII") + " via punycode: " + e;
|
|
26937
26950
|
}
|
|
@@ -26963,19 +26976,19 @@ var Yn = /* @__PURE__ */ oe((/* @__PURE__ */ ie(((e, t) => {
|
|
|
26963
26976
|
return n.nss = (e.uuid || "").toLowerCase(), n;
|
|
26964
26977
|
}
|
|
26965
26978
|
};
|
|
26966
|
-
A[
|
|
26979
|
+
A[J.scheme] = J, A[Y.scheme] = Y, A[ee.scheme] = ee, A[te.scheme] = te, A[Z.scheme] = Z, A[re.scheme] = re, A[de.scheme] = de, e.SCHEMES = A, e.pctEncChar = j, e.pctDecChars = M, e.parse = z, e.removeDotSegments = W, e.serialize = G, e.resolveComponents = K, e.resolve = function(e, t, n) {
|
|
26967
26980
|
return n = ((e, t) => {
|
|
26968
26981
|
var n = e;
|
|
26969
26982
|
if (t) for (var r in t) n[r] = t[r];
|
|
26970
26983
|
return n;
|
|
26971
|
-
})({ scheme: "null" }, n), G(
|
|
26984
|
+
})({ scheme: "null" }, n), G(K(z(e, n), z(t, n), n, !0), n);
|
|
26972
26985
|
}, e.normalize = function(e, t) {
|
|
26973
26986
|
return typeof e == "string" ? e = G(z(e, t), t) : r(e) === "object" && (e = z(G(e, t), t)), e;
|
|
26974
26987
|
}, e.equal = function(e, t, n) {
|
|
26975
26988
|
return typeof e == "string" ? e = G(z(e, n), n) : r(e) === "object" && (e = G(e, n)), typeof t == "string" ? t = G(z(t, n), n) : r(t) === "object" && (t = G(t, n)), e === t;
|
|
26976
26989
|
}, e.escapeComponent = function(e, t) {
|
|
26977
26990
|
return e && e.toString().replace((t && t.iri ? s : o).ESCAPE, j);
|
|
26978
|
-
}, e.unescapeComponent =
|
|
26991
|
+
}, e.unescapeComponent = q, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
26979
26992
|
})(t);
|
|
26980
26993
|
},
|
|
26981
26994
|
7598: function(e) {
|
|
@@ -28111,7 +28124,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28111
28124
|
role: "button",
|
|
28112
28125
|
title: x.value ? "退出全屏" : "全屏",
|
|
28113
28126
|
onClick: R(S, ["stop"])
|
|
28114
|
-
}, [(b(), r(O(x.value ? j(
|
|
28127
|
+
}, [(b(), r(O(x.value ? j(J) : j(K)), { size: 16 }))], 8, $n)])]),
|
|
28115
28128
|
default: I(() => [o("div", er, [o("div", {
|
|
28116
28129
|
ref_key: "editorContainerRef",
|
|
28117
28130
|
ref: g,
|
|
@@ -28128,7 +28141,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28128
28141
|
size: "small",
|
|
28129
28142
|
onClick: H
|
|
28130
28143
|
}, {
|
|
28131
|
-
icon: I(() => [l(j(
|
|
28144
|
+
icon: I(() => [l(j(X), { size: 14 })]),
|
|
28132
28145
|
default: I(() => [n[3] ||= c(" 导入 ", -1)]),
|
|
28133
28146
|
_: 1
|
|
28134
28147
|
}),
|
|
@@ -28537,7 +28550,7 @@ var yr = vr, br = { class: "me-card__title-wrapper" }, xr = { class: "me-card__t
|
|
|
28537
28550
|
class: "me-card__action-btn",
|
|
28538
28551
|
onClick: R
|
|
28539
28552
|
}, {
|
|
28540
|
-
default: I(() => [(b(), r(O(T.value ? j(
|
|
28553
|
+
default: I(() => [(b(), r(O(T.value ? j(Y) : j(q)), { size: 16 }))]),
|
|
28541
28554
|
_: 1
|
|
28542
28555
|
})) : i("", !0),
|
|
28543
28556
|
s.collapsible ? (b(), r(n, {
|
|
@@ -28728,6 +28741,10 @@ var Mr = jr, Nr = [
|
|
|
28728
28741
|
Mr
|
|
28729
28742
|
], Pr = (e) => {
|
|
28730
28743
|
Nr.forEach((t) => {
|
|
28744
|
+
if (typeof t.install == "function") {
|
|
28745
|
+
t.install(e);
|
|
28746
|
+
return;
|
|
28747
|
+
}
|
|
28731
28748
|
let n = t.name || t.__name;
|
|
28732
28749
|
n && e.component(n, t);
|
|
28733
28750
|
});
|