st-comp 0.0.136 → 0.0.137
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +11 -11
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +89 -89
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +13 -13
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +22 -22
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +11 -11
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +73 -73
- package/es/Table.cjs +1 -1
- package/es/Table.js +24 -24
- package/es/TreeMap.cjs +1 -2
- package/es/TreeMap.js +1 -163
- package/es/User.cjs +1 -1
- package/es/User.js +32 -32
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +421 -422
- package/es/VirtualTable.cjs +2 -2
- package/es/VirtualTable.js +10 -10
- package/es/{base-3ecbc734.js → base-7ecff73f.js} +68 -68
- package/es/{base-ec05f348.cjs → base-b384d332.cjs} +1 -1
- package/es/{castArray-a45823fe.cjs → castArray-21cb8c6a.cjs} +1 -1
- package/es/{castArray-7d3fc921.js → castArray-d87e6d83.js} +1 -1
- package/es/{config-provider-7cdfca4d.cjs → config-provider-08c54ec3.cjs} +1 -1
- package/es/{config-provider-83904b4d.js → config-provider-c6d33ae0.js} +3 -3
- package/es/{debounce-7344b088.js → debounce-24a2e3ec.js} +25 -25
- package/es/debounce-2ecf2d1f.cjs +1 -0
- package/es/{dropdown-9a974876.cjs → dropdown-1de99dc2.cjs} +1 -1
- package/es/{dropdown-7da44c8f.js → dropdown-6f212b92.js} +4 -4
- package/es/{el-button-24f79286.js → el-button-26f1342d.js} +11 -11
- package/es/{el-button-196807af.cjs → el-button-d234707c.cjs} +1 -1
- package/es/{el-empty-19ea04f4.cjs → el-empty-2d7a61d4.cjs} +1 -1
- package/es/{el-empty-79c5f7a8.js → el-empty-aa6a8f05.js} +1 -1
- package/es/{el-form-item-7d32befa.cjs → el-form-item-466b1601.cjs} +2 -2
- package/es/{el-form-item-afc3dcf2.js → el-form-item-f7a1de00.js} +107 -107
- package/es/{el-input-ee7db655.js → el-input-d0f5c98c.js} +46 -46
- package/es/el-input-fd2b3a26.cjs +1 -0
- package/es/el-input-number-509152ff.cjs +1 -0
- package/es/{el-input-number-63c21037.js → el-input-number-944a4ee2.js} +25 -25
- package/es/{el-menu-item-0d92e7dc.js → el-menu-item-726bb0bc.js} +112 -112
- package/es/el-menu-item-83e9739a.cjs +1 -0
- package/es/{el-message-562e923d.cjs → el-message-67684e35.cjs} +1 -1
- package/es/{el-message-71aa42ca.js → el-message-8149ff2d.js} +38 -38
- package/es/{el-overlay-6056c89a.js → el-overlay-7abe3c16.js} +96 -96
- package/es/{el-overlay-891dcc40.cjs → el-overlay-7d8307c8.cjs} +1 -1
- package/es/{el-popover-8735b1fa.cjs → el-popover-129a9692.cjs} +1 -1
- package/es/{el-popover-c8b2456c.js → el-popover-73df49b7.js} +20 -20
- package/es/el-popper-3d8f2656.cjs +1 -0
- package/es/{el-popper-d3eef7ed.js → el-popper-92dc6e44.js} +134 -134
- package/es/{el-scrollbar-66f3bb72.js → el-scrollbar-9f1b83f8.js} +10 -10
- package/es/el-scrollbar-a01fea99.cjs +1 -0
- package/es/{el-select-5fb7d469.js → el-select-1b3092ab.js} +10 -10
- package/es/el-select-d3f8b31c.cjs +1 -0
- package/es/el-table-column-1319b1ba.cjs +14 -0
- package/es/{el-table-column-560db3aa.js → el-table-column-a781f780.js} +117 -117
- package/es/{el-tag-6a31c968.js → el-tag-4323606a.js} +93 -93
- package/es/{el-tag-3b03d13e.cjs → el-tag-6d45f0b2.cjs} +1 -1
- package/es/{index-a1ecf26c.js → index-0d6776f7.js} +21 -21
- package/es/{index-80a2b137.cjs → index-2d697ae8.cjs} +1 -1
- package/es/{index-fa07a823.js → index-81702fc3.js} +13 -13
- package/es/{index-68ee64fa.js → index-bc7c8ad4.js} +27 -27
- package/es/{index-8a0b1c53.cjs → index-cb665c76.cjs} +1 -1
- package/es/{index-e1e83173.cjs → index-e0fa2f71.cjs} +1 -1
- package/es/{raf-377cf8f5.js → raf-196eee8e.js} +1 -1
- package/es/{raf-8fc301fd.cjs → raf-930895a1.cjs} +1 -1
- package/es/{refs-d00b710b.cjs → refs-4b61ff18.cjs} +1 -1
- package/es/refs-de750cc1.js +9 -0
- package/es/{scroll-41224831.cjs → scroll-495227b0.cjs} +1 -1
- package/es/{scroll-1efa8148.js → scroll-8e2a4c8b.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-9c0363ac.js → use-form-common-props-1075088e.js} +74 -74
- package/es/{use-form-common-props-1b84d8f4.cjs → use-form-common-props-41091f5f.cjs} +2 -2
- package/es/{vnode-7fbc61e1.cjs → vnode-44ebae3f.cjs} +1 -1
- package/es/{vnode-cfcdab70.js → vnode-85a8ebd8.js} +1 -1
- package/es/{zh-cn-4a476dc8.js → zh-cn-3d9d6ecf.js} +2 -2
- package/es/{zh-cn-ab9a583d.cjs → zh-cn-44d71e6d.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-73a5840c.js → index-4926b969.js} +7 -8
- package/lib/{python-bb104d23.js → python-26e17fc9.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietySearch/index.vue +6 -1
- package/es/debounce-b2ff12bd.cjs +0 -1
- package/es/el-input-6c6f5bda.cjs +0 -1
- package/es/el-input-number-0524d787.cjs +0 -1
- package/es/el-menu-item-dc904a35.cjs +0 -1
- package/es/el-popper-f62316cd.cjs +0 -1
- package/es/el-scrollbar-d1c3e7f7.cjs +0 -1
- package/es/el-select-928f8c19.cjs +0 -1
- package/es/el-table-column-dd8b62aa.cjs +0 -14
- package/es/refs-46cf8186.js +0 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as z, openBlock as B, createBlock as ve, Transition as Ee, mergeProps as Te, unref as He, toHandlers as Le, withCtx as Q, renderSlot as $, computed as h, getCurrentInstance as fe, inject as X, ref as E, reactive as he, watch as
|
|
2
|
-
import { a as Ge } from "./el-scrollbar-
|
|
3
|
-
import {
|
|
4
|
-
import { E as T, t as
|
|
5
|
-
import {
|
|
6
|
-
import { E as _e } from "./el-popper-
|
|
1
|
+
import { defineComponent as z, openBlock as B, createBlock as ve, Transition as Ee, mergeProps as Te, unref as He, toHandlers as Le, withCtx as Q, renderSlot as $, computed as h, getCurrentInstance as fe, inject as X, ref as E, reactive as he, watch as K, provide as me, onMounted as be, onBeforeUnmount as Se, h as b, Fragment as ge, withDirectives as we, vShow as Re, watchEffect as We, nextTick as De, toRef as je, resolveComponent as Fe, createElementBlock as Y, normalizeClass as ee, createElementVNode as pe, createTextVNode as qe, toDisplayString as Ve } from "vue";
|
|
2
|
+
import { a as Ge } from "./el-scrollbar-9f1b83f8.js";
|
|
3
|
+
import { e as Ue, A as Je, E as ke, i as q, B as Ke } from "./use-form-common-props-1075088e.js";
|
|
4
|
+
import { E as T, t as Z } from "./index-81702fc3.js";
|
|
5
|
+
import { l as w, _ as oe, w as $e, R as J, P as ie, U as Ze, d as Me, v as te, x as W, K as Ce, e as ne, I as Qe, p as xe, i as Oe, J as ye } from "./base-7ecff73f.js";
|
|
6
|
+
import { E as _e } from "./el-popper-92dc6e44.js";
|
|
7
7
|
import { T as Xe } from "./index-657047bb.js";
|
|
8
|
-
import { C as Ye } from "./el-tag-
|
|
8
|
+
import { C as Ye } from "./el-tag-4323606a.js";
|
|
9
9
|
import { m as et } from "./typescript-7ae59c4c.js";
|
|
10
|
-
import { f as tt } from "./vnode-
|
|
10
|
+
import { f as tt } from "./vnode-85a8ebd8.js";
|
|
11
11
|
const nt = z({
|
|
12
12
|
name: "ElCollapseTransition"
|
|
13
13
|
}), ot = /* @__PURE__ */ z({
|
|
@@ -53,8 +53,8 @@ const nt = z({
|
|
|
53
53
|
}, 16, ["name"]));
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
var
|
|
57
|
-
const
|
|
56
|
+
var at = /* @__PURE__ */ oe(ot, [["__file", "collapse-transition.vue"]]);
|
|
57
|
+
const st = $e(at);
|
|
58
58
|
let lt = class {
|
|
59
59
|
constructor(o, n) {
|
|
60
60
|
this.parent = o, this.domNode = n, this.subIndex = 0, this.subIndex = 0, this.init();
|
|
@@ -80,7 +80,7 @@ let lt = class {
|
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
case T.tab: {
|
|
83
|
-
|
|
83
|
+
Z(o, "mouseleave");
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
case T.enter:
|
|
@@ -108,15 +108,15 @@ let lt = class {
|
|
|
108
108
|
let n = !1;
|
|
109
109
|
switch (o.code) {
|
|
110
110
|
case T.down: {
|
|
111
|
-
|
|
111
|
+
Z(o.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(0), n = !0;
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
114
|
case T.up: {
|
|
115
|
-
|
|
115
|
+
Z(o.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1), n = !0;
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
case T.tab: {
|
|
119
|
-
|
|
119
|
+
Z(o.currentTarget, "mouseleave");
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
122
|
case T.enter:
|
|
@@ -148,16 +148,16 @@ const rt = z({
|
|
|
148
148
|
listeners: {
|
|
149
149
|
onBeforeEnter: (n) => n.style.opacity = "0.2",
|
|
150
150
|
onEnter(n, r) {
|
|
151
|
-
|
|
151
|
+
J(n, `${e.namespace.value}-opacity-transition`), n.style.opacity = "1", r();
|
|
152
152
|
},
|
|
153
153
|
onAfterEnter(n) {
|
|
154
154
|
ie(n, `${e.namespace.value}-opacity-transition`), n.style.opacity = "";
|
|
155
155
|
},
|
|
156
156
|
onBeforeLeave(n) {
|
|
157
|
-
n.dataset || (n.dataset = {}),
|
|
157
|
+
n.dataset || (n.dataset = {}), Ze(n, e.m("collapse")) ? (ie(n, e.m("collapse")), n.dataset.oldOverflow = n.style.overflow, n.dataset.scrollWidth = n.clientWidth.toString(), J(n, e.m("collapse"))) : (J(n, e.m("collapse")), n.dataset.oldOverflow = n.style.overflow, n.dataset.scrollWidth = n.clientWidth.toString(), ie(n, e.m("collapse"))), n.style.width = `${n.scrollWidth}px`, n.style.overflow = "hidden";
|
|
158
158
|
},
|
|
159
159
|
onLeave(n) {
|
|
160
|
-
|
|
160
|
+
J(n, "horizontal-collapse-transition"), n.style.width = `${n.dataset.scrollWidth}px`;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
};
|
|
@@ -221,16 +221,16 @@ const Ne = (e, o) => {
|
|
|
221
221
|
},
|
|
222
222
|
popperOffset: Number,
|
|
223
223
|
expandCloseIcon: {
|
|
224
|
-
type:
|
|
224
|
+
type: q
|
|
225
225
|
},
|
|
226
226
|
expandOpenIcon: {
|
|
227
|
-
type:
|
|
227
|
+
type: q
|
|
228
228
|
},
|
|
229
229
|
collapseCloseIcon: {
|
|
230
|
-
type:
|
|
230
|
+
type: q
|
|
231
231
|
},
|
|
232
232
|
collapseOpenIcon: {
|
|
233
|
-
type:
|
|
233
|
+
type: q
|
|
234
234
|
}
|
|
235
235
|
}), re = "ElSubMenu";
|
|
236
236
|
var Ie = z({
|
|
@@ -243,10 +243,10 @@ var Ie = z({
|
|
|
243
243
|
d || te(re, "can not inject sub menu");
|
|
244
244
|
const p = E({}), g = E({});
|
|
245
245
|
let C;
|
|
246
|
-
const k = E(!1),
|
|
246
|
+
const k = E(!1), ae = E(), V = E(null), O = h(() => P.value === "horizontal" && _.value ? "bottom-start" : "right-start"), A = h(() => P.value === "horizontal" && _.value || P.value === "vertical" && !u.props.collapse ? e.expandCloseIcon && e.expandOpenIcon ? S.value ? e.expandOpenIcon : e.expandCloseIcon : Ue : e.collapseCloseIcon && e.collapseOpenIcon ? S.value ? e.collapseOpenIcon : e.collapseCloseIcon : Je), _ = h(() => d.level === 0), D = h(() => {
|
|
247
247
|
const l = e.teleported;
|
|
248
248
|
return l === void 0 ? _.value : l;
|
|
249
|
-
}),
|
|
249
|
+
}), se = h(() => u.props.collapse ? `${m.namespace.value}-zoom-in-left` : `${m.namespace.value}-zoom-in-top`), le = h(() => P.value === "horizontal" && _.value ? [
|
|
250
250
|
"bottom-start",
|
|
251
251
|
"bottom-end",
|
|
252
252
|
"top-start",
|
|
@@ -273,10 +273,10 @@ var Ie = z({
|
|
|
273
273
|
index: e.index,
|
|
274
274
|
indexPath: t,
|
|
275
275
|
active: H
|
|
276
|
-
}),
|
|
276
|
+
}), j = Ne(u.props, d.level + 1), G = h(() => {
|
|
277
277
|
var l;
|
|
278
278
|
return (l = e.popperOffset) != null ? l : u.props.popperOffset;
|
|
279
|
-
}),
|
|
279
|
+
}), R = h(() => {
|
|
280
280
|
var l;
|
|
281
281
|
return (l = e.popperClass) != null ? l : u.props.popperClass;
|
|
282
282
|
}), U = h(() => {
|
|
@@ -285,11 +285,11 @@ var Ie = z({
|
|
|
285
285
|
}), ue = h(() => {
|
|
286
286
|
var l;
|
|
287
287
|
return (l = e.hideTimeout) != null ? l : u.props.hideTimeout;
|
|
288
|
-
}),
|
|
288
|
+
}), a = () => {
|
|
289
289
|
var l, c, M;
|
|
290
290
|
return (M = (c = (l = V.value) == null ? void 0 : l.popperRef) == null ? void 0 : c.popperInstanceRef) == null ? void 0 : M.destroy();
|
|
291
|
-
},
|
|
292
|
-
l ||
|
|
291
|
+
}, s = (l) => {
|
|
292
|
+
l || a();
|
|
293
293
|
}, i = () => {
|
|
294
294
|
u.props.menuTrigger === "hover" && u.props.mode === "horizontal" || u.props.collapse && u.props.mode === "vertical" || e.disabled || u.handleSubMenuClick({
|
|
295
295
|
index: e.index,
|
|
@@ -305,7 +305,7 @@ var Ie = z({
|
|
|
305
305
|
}
|
|
306
306
|
d.mouseInChild.value = !0, C == null || C(), { stop: C } = Ce(() => {
|
|
307
307
|
u.openMenu(e.index, t.value);
|
|
308
|
-
}, c),
|
|
308
|
+
}, c), D.value && ((M = I.value.vnode.el) == null || M.dispatchEvent(new MouseEvent("mouseenter")));
|
|
309
309
|
}
|
|
310
310
|
}, f = (l = !1) => {
|
|
311
311
|
var c;
|
|
@@ -313,9 +313,9 @@ var Ie = z({
|
|
|
313
313
|
d.mouseInChild.value = !1;
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
-
C == null || C(), d.mouseInChild.value = !1, { stop: C } = Ce(() => !k.value && u.closeMenu(e.index, t.value), ue.value),
|
|
316
|
+
C == null || C(), d.mouseInChild.value = !1, { stop: C } = Ce(() => !k.value && u.closeMenu(e.index, t.value), ue.value), D.value && l && ((c = d.handleMouseleave) == null || c.call(d, !0));
|
|
317
317
|
};
|
|
318
|
-
|
|
318
|
+
K(() => u.props.collapse, (l) => s(!!l));
|
|
319
319
|
{
|
|
320
320
|
const l = (M) => {
|
|
321
321
|
g.value[M.index] = M;
|
|
@@ -346,7 +346,7 @@ var Ie = z({
|
|
|
346
346
|
transform: S.value ? e.expandCloseIcon && e.expandOpenIcon || e.collapseCloseIcon && e.collapseOpenIcon && u.props.collapse ? "none" : "rotateZ(180deg)" : "none"
|
|
347
347
|
}
|
|
348
348
|
}, {
|
|
349
|
-
default: () =>
|
|
349
|
+
default: () => W(A.value) ? b(r.appContext.components[A.value]) : b(A.value)
|
|
350
350
|
})
|
|
351
351
|
], M = u.isMenuPopup ? b(_e, {
|
|
352
352
|
ref: V,
|
|
@@ -356,11 +356,11 @@ var Ie = z({
|
|
|
356
356
|
offset: G.value,
|
|
357
357
|
showArrow: !1,
|
|
358
358
|
persistent: !0,
|
|
359
|
-
popperClass:
|
|
359
|
+
popperClass: R.value,
|
|
360
360
|
placement: O.value,
|
|
361
|
-
teleported:
|
|
361
|
+
teleported: D.value,
|
|
362
362
|
fallbackPlacements: le.value,
|
|
363
|
-
transition:
|
|
363
|
+
transition: se.value,
|
|
364
364
|
gpuAcceleration: !1
|
|
365
365
|
}, {
|
|
366
366
|
content: () => {
|
|
@@ -369,7 +369,7 @@ var Ie = z({
|
|
|
369
369
|
class: [
|
|
370
370
|
m.m(P.value),
|
|
371
371
|
m.m("popup-container"),
|
|
372
|
-
|
|
372
|
+
R.value
|
|
373
373
|
],
|
|
374
374
|
onMouseenter: (N) => v(N, 100),
|
|
375
375
|
onMouseleave: () => f(!0),
|
|
@@ -381,7 +381,7 @@ var Ie = z({
|
|
|
381
381
|
m.m("popup"),
|
|
382
382
|
m.m(`popup-${O.value}`)
|
|
383
383
|
],
|
|
384
|
-
style:
|
|
384
|
+
style: j.value
|
|
385
385
|
}, [(x = o.default) == null ? void 0 : x.call(o)])
|
|
386
386
|
]);
|
|
387
387
|
},
|
|
@@ -392,17 +392,17 @@ var Ie = z({
|
|
|
392
392
|
}) : b(ge, {}, [
|
|
393
393
|
b("div", {
|
|
394
394
|
class: y.e("title"),
|
|
395
|
-
ref:
|
|
395
|
+
ref: ae,
|
|
396
396
|
onClick: i
|
|
397
397
|
}, c),
|
|
398
|
-
b(
|
|
398
|
+
b(st, {}, {
|
|
399
399
|
default: () => {
|
|
400
400
|
var x;
|
|
401
401
|
return we(b("ul", {
|
|
402
402
|
role: "menu",
|
|
403
403
|
class: [m.b(), m.m("inline")],
|
|
404
|
-
style:
|
|
405
|
-
}, [(x = o.default) == null ? void 0 : x.call(o)]), [[
|
|
404
|
+
style: j.value
|
|
405
|
+
}, [(x = o.default) == null ? void 0 : x.call(o)]), [[Re, S.value]]);
|
|
406
406
|
}
|
|
407
407
|
})
|
|
408
408
|
]);
|
|
@@ -462,8 +462,8 @@ const vt = Me({
|
|
|
462
462
|
default: 6
|
|
463
463
|
},
|
|
464
464
|
ellipsisIcon: {
|
|
465
|
-
type:
|
|
466
|
-
default: () =>
|
|
465
|
+
type: q,
|
|
466
|
+
default: () => Ke
|
|
467
467
|
},
|
|
468
468
|
popperEffect: {
|
|
469
469
|
type: ne(String),
|
|
@@ -478,93 +478,93 @@ const vt = Me({
|
|
|
478
478
|
type: Number,
|
|
479
479
|
default: 300
|
|
480
480
|
}
|
|
481
|
-
}), ce = (e) => Oe(e) && e.every((o) =>
|
|
482
|
-
close: (e, o) =>
|
|
483
|
-
open: (e, o) =>
|
|
484
|
-
select: (e, o, n, r) =>
|
|
481
|
+
}), ce = (e) => Oe(e) && e.every((o) => W(o)), ft = {
|
|
482
|
+
close: (e, o) => W(e) && ce(o),
|
|
483
|
+
open: (e, o) => W(e) && ce(o),
|
|
484
|
+
select: (e, o, n, r) => W(e) && ce(o) && Qe(n) && (r === void 0 || r instanceof Promise)
|
|
485
485
|
};
|
|
486
486
|
var ht = z({
|
|
487
487
|
name: "ElMenu",
|
|
488
488
|
props: vt,
|
|
489
489
|
emits: ft,
|
|
490
490
|
setup(e, { emit: o, slots: n, expose: r }) {
|
|
491
|
-
const t = fe(), I = t.appContext.config.globalProperties.$router, m = E(), y = w("menu"), u = w("sub-menu"), d = E(-1), p = E(e.defaultOpeneds && !e.collapse ? e.defaultOpeneds.slice(0) : []), g = E(e.defaultActive), C = E({}), k = E({}),
|
|
492
|
-
const
|
|
493
|
-
if (!
|
|
491
|
+
const t = fe(), I = t.appContext.config.globalProperties.$router, m = E(), y = w("menu"), u = w("sub-menu"), d = E(-1), p = E(e.defaultOpeneds && !e.collapse ? e.defaultOpeneds.slice(0) : []), g = E(e.defaultActive), C = E({}), k = E({}), ae = h(() => e.mode === "horizontal" || e.mode === "vertical" && e.collapse), V = () => {
|
|
492
|
+
const a = g.value && C.value[g.value];
|
|
493
|
+
if (!a || e.mode === "horizontal" || e.collapse)
|
|
494
494
|
return;
|
|
495
|
-
|
|
495
|
+
a.indexPath.forEach((i) => {
|
|
496
496
|
const v = k.value[i];
|
|
497
497
|
v && O(i, v.indexPath);
|
|
498
498
|
});
|
|
499
|
-
}, O = (
|
|
500
|
-
p.value.includes(
|
|
501
|
-
}, A = (
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
}, _ = (
|
|
505
|
-
A(
|
|
506
|
-
},
|
|
507
|
-
index:
|
|
508
|
-
indexPath:
|
|
499
|
+
}, O = (a, s) => {
|
|
500
|
+
p.value.includes(a) || (e.uniqueOpened && (p.value = p.value.filter((i) => s.includes(i))), p.value.push(a), o("open", a, s));
|
|
501
|
+
}, A = (a) => {
|
|
502
|
+
const s = p.value.indexOf(a);
|
|
503
|
+
s !== -1 && p.value.splice(s, 1);
|
|
504
|
+
}, _ = (a, s) => {
|
|
505
|
+
A(a), o("close", a, s);
|
|
506
|
+
}, D = ({
|
|
507
|
+
index: a,
|
|
508
|
+
indexPath: s
|
|
509
509
|
}) => {
|
|
510
|
-
p.value.includes(
|
|
511
|
-
},
|
|
510
|
+
p.value.includes(a) ? _(a, s) : O(a, s);
|
|
511
|
+
}, se = (a) => {
|
|
512
512
|
(e.mode === "horizontal" || e.collapse) && (p.value = []);
|
|
513
|
-
const { index:
|
|
514
|
-
if (!(xe(
|
|
513
|
+
const { index: s, indexPath: i } = a;
|
|
514
|
+
if (!(xe(s) || xe(i)))
|
|
515
515
|
if (e.router && I) {
|
|
516
|
-
const v =
|
|
517
|
-
o("select",
|
|
516
|
+
const v = a.route || s, f = I.push(v).then((l) => (l || (g.value = s), l));
|
|
517
|
+
o("select", s, i, { index: s, indexPath: i, route: v }, f);
|
|
518
518
|
} else
|
|
519
|
-
g.value =
|
|
520
|
-
}, le = (
|
|
521
|
-
const
|
|
522
|
-
i ? g.value = i.index : g.value =
|
|
523
|
-
}, S = (
|
|
524
|
-
const
|
|
525
|
-
return
|
|
519
|
+
g.value = s, o("select", s, i, { index: s, indexPath: i });
|
|
520
|
+
}, le = (a) => {
|
|
521
|
+
const s = C.value, i = s[a] || g.value && s[g.value] || s[e.defaultActive];
|
|
522
|
+
i ? g.value = i.index : g.value = a;
|
|
523
|
+
}, S = (a) => {
|
|
524
|
+
const s = getComputedStyle(a), i = Number.parseInt(s.marginLeft, 10), v = Number.parseInt(s.marginRight, 10);
|
|
525
|
+
return a.offsetWidth + i + v || 0;
|
|
526
526
|
}, H = () => {
|
|
527
|
-
var
|
|
527
|
+
var a, s;
|
|
528
528
|
if (!m.value)
|
|
529
529
|
return -1;
|
|
530
|
-
const i = Array.from((
|
|
530
|
+
const i = Array.from((s = (a = m.value) == null ? void 0 : a.childNodes) != null ? s : []).filter((F) => F.nodeName !== "#text" || F.nodeValue), v = 64, f = getComputedStyle(m.value), l = Number.parseInt(f.paddingLeft, 10), c = Number.parseInt(f.paddingRight, 10), M = m.value.clientWidth - l - c;
|
|
531
531
|
let x = 0, N = 0;
|
|
532
|
-
return i.forEach((
|
|
533
|
-
|
|
532
|
+
return i.forEach((F, Ae) => {
|
|
533
|
+
F.nodeName !== "#comment" && (x += S(F), x <= M - v && (N = Ae + 1));
|
|
534
534
|
}), N === i.length ? -1 : N;
|
|
535
|
-
}, P = (
|
|
535
|
+
}, P = (a) => k.value[a].indexPath, L = (a, s = 33.34) => {
|
|
536
536
|
let i;
|
|
537
537
|
return () => {
|
|
538
538
|
i && clearTimeout(i), i = setTimeout(() => {
|
|
539
|
-
|
|
540
|
-
},
|
|
539
|
+
a();
|
|
540
|
+
}, s);
|
|
541
541
|
};
|
|
542
542
|
};
|
|
543
|
-
let
|
|
543
|
+
let j = !0;
|
|
544
544
|
const G = () => {
|
|
545
545
|
if (d.value === H())
|
|
546
546
|
return;
|
|
547
|
-
const
|
|
548
|
-
d.value = -1,
|
|
547
|
+
const a = () => {
|
|
548
|
+
d.value = -1, De(() => {
|
|
549
549
|
d.value = H();
|
|
550
550
|
});
|
|
551
551
|
};
|
|
552
|
-
|
|
552
|
+
j ? a() : L(a)(), j = !1;
|
|
553
553
|
};
|
|
554
|
-
|
|
555
|
-
C.value[
|
|
556
|
-
}),
|
|
557
|
-
|
|
558
|
-
}),
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
e.mode === "horizontal" && e.ellipsis ?
|
|
554
|
+
K(() => e.defaultActive, (a) => {
|
|
555
|
+
C.value[a] || (g.value = ""), le(a);
|
|
556
|
+
}), K(() => e.collapse, (a) => {
|
|
557
|
+
a && (p.value = []);
|
|
558
|
+
}), K(C.value, V);
|
|
559
|
+
let R;
|
|
560
|
+
We(() => {
|
|
561
|
+
e.mode === "horizontal" && e.ellipsis ? R = Ge(m, G).stop : R == null || R();
|
|
562
562
|
});
|
|
563
563
|
const U = E(!1);
|
|
564
564
|
{
|
|
565
|
-
const
|
|
565
|
+
const a = (f) => {
|
|
566
566
|
k.value[f.index] = f;
|
|
567
|
-
},
|
|
567
|
+
}, s = (f) => {
|
|
568
568
|
delete k.value[f.index];
|
|
569
569
|
};
|
|
570
570
|
me("rootMenu", he({
|
|
@@ -573,22 +573,22 @@ var ht = z({
|
|
|
573
573
|
items: C,
|
|
574
574
|
subMenus: k,
|
|
575
575
|
activeIndex: g,
|
|
576
|
-
isMenuPopup:
|
|
576
|
+
isMenuPopup: ae,
|
|
577
577
|
addMenuItem: (f) => {
|
|
578
578
|
C.value[f.index] = f;
|
|
579
579
|
},
|
|
580
580
|
removeMenuItem: (f) => {
|
|
581
581
|
delete C.value[f.index];
|
|
582
582
|
},
|
|
583
|
-
addSubMenu:
|
|
584
|
-
removeSubMenu:
|
|
583
|
+
addSubMenu: a,
|
|
584
|
+
removeSubMenu: s,
|
|
585
585
|
openMenu: O,
|
|
586
586
|
closeMenu: _,
|
|
587
|
-
handleMenuItemClick:
|
|
588
|
-
handleSubMenuClick:
|
|
587
|
+
handleMenuItemClick: se,
|
|
588
|
+
handleSubMenuClick: D
|
|
589
589
|
})), me(`subMenu:${t.uid}`, {
|
|
590
|
-
addSubMenu:
|
|
591
|
-
removeSubMenu:
|
|
590
|
+
addSubMenu: a,
|
|
591
|
+
removeSubMenu: s,
|
|
592
592
|
mouseInChild: U,
|
|
593
593
|
level: 0
|
|
594
594
|
});
|
|
@@ -596,8 +596,8 @@ var ht = z({
|
|
|
596
596
|
be(() => {
|
|
597
597
|
e.mode === "horizontal" && new it(t.vnode.el, y.namespace.value);
|
|
598
598
|
}), r({
|
|
599
|
-
open: (
|
|
600
|
-
const { indexPath: i } = k.value[
|
|
599
|
+
open: (s) => {
|
|
600
|
+
const { indexPath: i } = k.value[s];
|
|
601
601
|
i.forEach((v) => O(v, i));
|
|
602
602
|
},
|
|
603
603
|
close: A,
|
|
@@ -605,8 +605,8 @@ var ht = z({
|
|
|
605
605
|
});
|
|
606
606
|
const ue = Ne(e, 0);
|
|
607
607
|
return () => {
|
|
608
|
-
var
|
|
609
|
-
let i = (
|
|
608
|
+
var a, s;
|
|
609
|
+
let i = (s = (a = n.default) == null ? void 0 : a.call(n)) != null ? s : [];
|
|
610
610
|
const v = [];
|
|
611
611
|
if (e.mode === "horizontal" && m.value) {
|
|
612
612
|
const c = tt(i), M = d.value === -1 ? c : c.slice(0, d.value), x = d.value === -1 ? [] : c.slice(d.value);
|
|
@@ -655,7 +655,7 @@ const bt = Me({
|
|
|
655
655
|
},
|
|
656
656
|
disabled: Boolean
|
|
657
657
|
}), gt = {
|
|
658
|
-
click: (e) =>
|
|
658
|
+
click: (e) => W(e.index) && Oe(e.indexPath)
|
|
659
659
|
}, de = "ElMenuItem", Mt = z({
|
|
660
660
|
name: de,
|
|
661
661
|
components: {
|
|
@@ -666,7 +666,7 @@ const bt = Me({
|
|
|
666
666
|
setup(e, { emit: o }) {
|
|
667
667
|
const n = fe(), r = X("rootMenu"), t = w("menu"), I = w("menu-item");
|
|
668
668
|
r || te(de, "can not inject root menu");
|
|
669
|
-
const { parentMenu: m, indexPath: y } = Pe(n,
|
|
669
|
+
const { parentMenu: m, indexPath: y } = Pe(n, je(e, "index")), u = X(`subMenu:${m.value.uid}`);
|
|
670
670
|
u || te(de, "can not inject sub menu");
|
|
671
671
|
const d = h(() => e.index === r.activeIndex), p = he({
|
|
672
672
|
index: e.index,
|
|
@@ -694,7 +694,7 @@ const bt = Me({
|
|
|
694
694
|
}
|
|
695
695
|
});
|
|
696
696
|
function yt(e, o, n, r, t, I) {
|
|
697
|
-
const m =
|
|
697
|
+
const m = Fe("el-tooltip");
|
|
698
698
|
return B(), Y("li", {
|
|
699
699
|
class: ee([
|
|
700
700
|
e.nsMenuItem.b(),
|
|
@@ -749,7 +749,7 @@ function Et(e, o, n, r, t, I) {
|
|
|
749
749
|
class: ee(e.ns.e("title"))
|
|
750
750
|
}, [
|
|
751
751
|
e.$slots.title ? $(e.$slots, "title", { key: 1 }) : (B(), Y(ge, { key: 0 }, [
|
|
752
|
-
|
|
752
|
+
qe(Ve(e.title), 1)
|
|
753
753
|
], 64))
|
|
754
754
|
], 2),
|
|
755
755
|
pe("ul", null, [
|
|
@@ -762,10 +762,10 @@ const Lt = $e(ht, {
|
|
|
762
762
|
MenuItem: Be,
|
|
763
763
|
MenuItemGroup: ze,
|
|
764
764
|
SubMenu: Ie
|
|
765
|
-
}),
|
|
765
|
+
}), Rt = ye(Be);
|
|
766
766
|
ye(ze);
|
|
767
767
|
ye(Ie);
|
|
768
768
|
export {
|
|
769
|
-
|
|
769
|
+
Rt as E,
|
|
770
770
|
Lt as a
|
|
771
771
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),ne=require("./el-scrollbar-a01fea99.cjs"),S=require("./use-form-common-props-41091f5f.cjs"),y=require("./index-e0fa2f71.cjs"),l=require("./base-b384d332.cjs"),K=require("./el-popper-3d8f2656.cjs"),oe=require("./index-eea0bcb3.cjs"),se=require("./el-tag-6d45f0b2.cjs"),le=require("./typescript-b63f8e83.cjs"),ae=require("./vnode-44ebae3f.cjs"),ue=e.defineComponent({name:"ElCollapseTransition"}),re=e.defineComponent({...ue,setup(t){const s=l.useNamespace("collapse-transition"),o=n=>{n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom},d={beforeEnter(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.style.height&&(n.dataset.elExistsHeight=n.style.height),n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0},enter(n){requestAnimationFrame(()=>{n.dataset.oldOverflow=n.style.overflow,n.dataset.elExistsHeight?n.style.maxHeight=n.dataset.elExistsHeight:n.scrollHeight!==0?n.style.maxHeight=`${n.scrollHeight}px`:n.style.maxHeight=0,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom,n.style.overflow="hidden"})},afterEnter(n){n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow},enterCancelled(n){o(n)},beforeLeave(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.dataset.oldOverflow=n.style.overflow,n.style.maxHeight=`${n.scrollHeight}px`,n.style.overflow="hidden"},leave(n){n.scrollHeight!==0&&(n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0)},afterLeave(n){o(n)},leaveCancelled(n){o(n)}};return(n,C)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({name:e.unref(s).b()},e.toHandlers(d)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16,["name"]))}});var ie=l._export_sfc(re,[["__file","collapse-transition.vue"]]);const ce=l.withInstall(ie);let de=class{constructor(s,o){this.parent=s,this.domNode=o,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(s){s===this.subMenuItems.length?s=0:s<0&&(s=this.subMenuItems.length-1),this.subMenuItems[s].focus(),this.subIndex=s}addListeners(){const s=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,o=>{o.addEventListener("keydown",d=>{let n=!1;switch(d.code){case y.EVENT_CODE.down:{this.gotoSubIndex(this.subIndex+1),n=!0;break}case y.EVENT_CODE.up:{this.gotoSubIndex(this.subIndex-1),n=!0;break}case y.EVENT_CODE.tab:{y.triggerEvent(s,"mouseleave");break}case y.EVENT_CODE.enter:case y.EVENT_CODE.numpadEnter:case y.EVENT_CODE.space:{n=!0,d.currentTarget.click();break}}return n&&(d.preventDefault(),d.stopPropagation()),!1})})}},pe=class{constructor(s,o){this.domNode=s,this.submenu=null,this.submenu=null,this.init(o)}init(s){this.domNode.setAttribute("tabindex","0");const o=this.domNode.querySelector(`.${s}-menu`);o&&(this.submenu=new de(this,o)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",s=>{let o=!1;switch(s.code){case y.EVENT_CODE.down:{y.triggerEvent(s.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),o=!0;break}case y.EVENT_CODE.up:{y.triggerEvent(s.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),o=!0;break}case y.EVENT_CODE.tab:{y.triggerEvent(s.currentTarget,"mouseleave");break}case y.EVENT_CODE.enter:case y.EVENT_CODE.numpadEnter:case y.EVENT_CODE.space:{o=!0,s.currentTarget.click();break}}o&&s.preventDefault()})}},me=class{constructor(s,o){this.domNode=s,this.init(o)}init(s){const o=this.domNode.childNodes;Array.from(o).forEach(d=>{d.nodeType===1&&new pe(d,s)})}};const ve=e.defineComponent({name:"ElMenuCollapseTransition",setup(){const t=l.useNamespace("menu");return{listeners:{onBeforeEnter:o=>o.style.opacity="0.2",onEnter(o,d){l.addClass(o,`${t.namespace.value}-opacity-transition`),o.style.opacity="1",d()},onAfterEnter(o){l.removeClass(o,`${t.namespace.value}-opacity-transition`),o.style.opacity=""},onBeforeLeave(o){o.dataset||(o.dataset={}),l.hasClass(o,t.m("collapse"))?(l.removeClass(o,t.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),l.addClass(o,t.m("collapse"))):(l.addClass(o,t.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),l.removeClass(o,t.m("collapse"))),o.style.width=`${o.scrollWidth}px`,o.style.overflow="hidden"},onLeave(o){l.addClass(o,"horizontal-collapse-transition"),o.style.width=`${o.dataset.scrollWidth}px`}}}}});function fe(t,s,o,d,n,C){return e.openBlock(),e.createBlock(e.Transition,e.mergeProps({mode:"out-in"},t.listeners),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}var he=l._export_sfc(ve,[["render",fe],["__file","menu-collapse-transition.vue"]]);function Q(t,s){const o=e.computed(()=>{let n=t.parent;const C=[s.value];for(;n.type.name!=="ElMenu";)n.props.index&&C.unshift(n.props.index),n=n.parent;return C});return{parentMenu:e.computed(()=>{let n=t.parent;for(;n&&!["ElMenu","ElSubMenu"].includes(n.type.name);)n=n.parent;return n}),indexPath:o}}function ge(t){return e.computed(()=>{const o=t.backgroundColor;return o?new oe.TinyColor(o).shade(20).toString():""})}const X=(t,s)=>{const o=l.useNamespace("menu");return e.computed(()=>o.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":ge(t).value||"","active-color":t.activeTextColor||"",level:`${s}`}))},be=l.buildProps({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:S.iconPropType},expandOpenIcon:{type:S.iconPropType},collapseCloseIcon:{type:S.iconPropType},collapseOpenIcon:{type:S.iconPropType}}),G="ElSubMenu";var J=e.defineComponent({name:G,props:be,setup(t,{slots:s,expose:o}){const d=e.getCurrentInstance(),{indexPath:n,parentMenu:C}=Q(d,e.computed(()=>t.index)),v=l.useNamespace("menu"),E=l.useNamespace("sub-menu"),i=e.inject("rootMenu");i||l.throwError(G,"can not inject root menu");const m=e.inject(`subMenu:${C.value.uid}`);m||l.throwError(G,"can not inject sub menu");const f=e.ref({}),b=e.ref({});let I;const N=e.ref(!1),j=e.ref(),H=e.ref(null),w=e.computed(()=>k.value==="horizontal"&&_.value?"bottom-start":"right-start"),$=e.computed(()=>k.value==="horizontal"&&_.value||k.value==="vertical"&&!i.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?x.value?t.expandOpenIcon:t.expandCloseIcon:S.arrow_down_default:t.collapseCloseIcon&&t.collapseOpenIcon?x.value?t.collapseOpenIcon:t.collapseCloseIcon:S.arrow_right_default),_=e.computed(()=>m.level===0),D=e.computed(()=>{const r=t.teleported;return r===void 0?_.value:r}),W=e.computed(()=>i.props.collapse?`${v.namespace.value}-zoom-in-left`:`${v.namespace.value}-zoom-in-top`),F=e.computed(()=>k.value==="horizontal"&&_.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),x=e.computed(()=>i.openedMenus.includes(t.index)),P=e.computed(()=>{let r=!1;return Object.values(f.value).forEach(p=>{p.active&&(r=!0)}),Object.values(b.value).forEach(p=>{p.active&&(r=!0)}),r}),k=e.computed(()=>i.props.mode),B=e.reactive({index:t.index,indexPath:n,active:P}),A=X(i.props,m.level+1),q=e.computed(()=>{var r;return(r=t.popperOffset)!=null?r:i.props.popperOffset}),z=e.computed(()=>{var r;return(r=t.popperClass)!=null?r:i.props.popperClass}),L=e.computed(()=>{var r;return(r=t.showTimeout)!=null?r:i.props.showTimeout}),R=e.computed(()=>{var r;return(r=t.hideTimeout)!=null?r:i.props.hideTimeout}),a=()=>{var r,p,M;return(M=(p=(r=H.value)==null?void 0:r.popperRef)==null?void 0:p.popperInstanceRef)==null?void 0:M.destroy()},u=r=>{r||a()},c=()=>{i.props.menuTrigger==="hover"&&i.props.mode==="horizontal"||i.props.collapse&&i.props.mode==="vertical"||t.disabled||i.handleSubMenuClick({index:t.index,indexPath:n.value,active:P.value})},h=(r,p=L.value)=>{var M;if(r.type!=="focus"){if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"||t.disabled){m.mouseInChild.value=!0;return}m.mouseInChild.value=!0,I==null||I(),{stop:I}=l.useTimeoutFn(()=>{i.openMenu(t.index,n.value)},p),D.value&&((M=C.value.vnode.el)==null||M.dispatchEvent(new MouseEvent("mouseenter")))}},g=(r=!1)=>{var p;if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"){m.mouseInChild.value=!1;return}I==null||I(),m.mouseInChild.value=!1,{stop:I}=l.useTimeoutFn(()=>!N.value&&i.closeMenu(t.index,n.value),R.value),D.value&&r&&((p=m.handleMouseleave)==null||p.call(m,!0))};e.watch(()=>i.props.collapse,r=>u(!!r));{const r=M=>{b.value[M.index]=M},p=M=>{delete b.value[M.index]};e.provide(`subMenu:${d.uid}`,{addSubMenu:r,removeSubMenu:p,handleMouseleave:g,mouseInChild:N,level:m.level+1})}return o({opened:x}),e.onMounted(()=>{i.addSubMenu(B),m.addSubMenu(B)}),e.onBeforeUnmount(()=>{m.removeSubMenu(B),i.removeSubMenu(B)}),()=>{var r;const p=[(r=s.title)==null?void 0:r.call(s),e.h(S.ElIcon,{class:E.e("icon-arrow"),style:{transform:x.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&i.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>l.isString$1($.value)?e.h(d.appContext.components[$.value]):e.h($.value)})],M=i.isMenuPopup?e.h(K.ElTooltip,{ref:H,visible:x.value,effect:"light",pure:!0,offset:q.value,showArrow:!1,persistent:!0,popperClass:z.value,placement:w.value,teleported:D.value,fallbackPlacements:F.value,transition:W.value,gpuAcceleration:!1},{content:()=>{var T;return e.h("div",{class:[v.m(k.value),v.m("popup-container"),z.value],onMouseenter:O=>h(O,100),onMouseleave:()=>g(!0),onFocus:O=>h(O,100)},[e.h("ul",{class:[v.b(),v.m("popup"),v.m(`popup-${w.value}`)],style:A.value},[(T=s.default)==null?void 0:T.call(s)])])},default:()=>e.h("div",{class:E.e("title"),onClick:c},p)}):e.h(e.Fragment,{},[e.h("div",{class:E.e("title"),ref:j,onClick:c},p),e.h(ce,{},{default:()=>{var T;return e.withDirectives(e.h("ul",{role:"menu",class:[v.b(),v.m("inline")],style:A.value},[(T=s.default)==null?void 0:T.call(s)]),[[e.vShow,x.value]])}})]);return e.h("li",{class:[E.b(),E.is("active",P.value),E.is("opened",x.value),E.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:x.value,onMouseenter:h,onMouseleave:()=>g(),onFocus:h},[M])}}});const Me=l.buildProps({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:l.definePropType(Array),default:()=>le.mutable([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:S.iconPropType,default:()=>S.more_default},popperEffect:{type:l.definePropType(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),U=t=>l.isArray(t)&&t.every(s=>l.isString$1(s)),ye={close:(t,s)=>l.isString$1(t)&&U(s),open:(t,s)=>l.isString$1(t)&&U(s),select:(t,s,o,d)=>l.isString$1(t)&&U(s)&&l.isObject$1(o)&&(d===void 0||d instanceof Promise)};var Ee=e.defineComponent({name:"ElMenu",props:Me,emits:ye,setup(t,{emit:s,slots:o,expose:d}){const n=e.getCurrentInstance(),C=n.appContext.config.globalProperties.$router,v=e.ref(),E=l.useNamespace("menu"),i=l.useNamespace("sub-menu"),m=e.ref(-1),f=e.ref(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),b=e.ref(t.defaultActive),I=e.ref({}),N=e.ref({}),j=e.computed(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),H=()=>{const a=b.value&&I.value[b.value];if(!a||t.mode==="horizontal"||t.collapse)return;a.indexPath.forEach(c=>{const h=N.value[c];h&&w(c,h.indexPath)})},w=(a,u)=>{f.value.includes(a)||(t.uniqueOpened&&(f.value=f.value.filter(c=>u.includes(c))),f.value.push(a),s("open",a,u))},$=a=>{const u=f.value.indexOf(a);u!==-1&&f.value.splice(u,1)},_=(a,u)=>{$(a),s("close",a,u)},D=({index:a,indexPath:u})=>{f.value.includes(a)?_(a,u):w(a,u)},W=a=>{(t.mode==="horizontal"||t.collapse)&&(f.value=[]);const{index:u,indexPath:c}=a;if(!(l.isNil(u)||l.isNil(c)))if(t.router&&C){const h=a.route||u,g=C.push(h).then(r=>(r||(b.value=u),r));s("select",u,c,{index:u,indexPath:c,route:h},g)}else b.value=u,s("select",u,c,{index:u,indexPath:c})},F=a=>{const u=I.value,c=u[a]||b.value&&u[b.value]||u[t.defaultActive];c?b.value=c.index:b.value=a},x=a=>{const u=getComputedStyle(a),c=Number.parseInt(u.marginLeft,10),h=Number.parseInt(u.marginRight,10);return a.offsetWidth+c+h||0},P=()=>{var a,u;if(!v.value)return-1;const c=Array.from((u=(a=v.value)==null?void 0:a.childNodes)!=null?u:[]).filter(V=>V.nodeName!=="#text"||V.nodeValue),h=64,g=getComputedStyle(v.value),r=Number.parseInt(g.paddingLeft,10),p=Number.parseInt(g.paddingRight,10),M=v.value.clientWidth-r-p;let T=0,O=0;return c.forEach((V,te)=>{V.nodeName!=="#comment"&&(T+=x(V),T<=M-h&&(O=te+1))}),O===c.length?-1:O},k=a=>N.value[a].indexPath,B=(a,u=33.34)=>{let c;return()=>{c&&clearTimeout(c),c=setTimeout(()=>{a()},u)}};let A=!0;const q=()=>{if(m.value===P())return;const a=()=>{m.value=-1,e.nextTick(()=>{m.value=P()})};A?a():B(a)(),A=!1};e.watch(()=>t.defaultActive,a=>{I.value[a]||(b.value=""),F(a)}),e.watch(()=>t.collapse,a=>{a&&(f.value=[])}),e.watch(I.value,H);let z;e.watchEffect(()=>{t.mode==="horizontal"&&t.ellipsis?z=ne.useResizeObserver(v,q).stop:z==null||z()});const L=e.ref(!1);{const a=g=>{N.value[g.index]=g},u=g=>{delete N.value[g.index]},c=g=>{I.value[g.index]=g},h=g=>{delete I.value[g.index]};e.provide("rootMenu",e.reactive({props:t,openedMenus:f,items:I,subMenus:N,activeIndex:b,isMenuPopup:j,addMenuItem:c,removeMenuItem:h,addSubMenu:a,removeSubMenu:u,openMenu:w,closeMenu:_,handleMenuItemClick:W,handleSubMenuClick:D})),e.provide(`subMenu:${n.uid}`,{addSubMenu:a,removeSubMenu:u,mouseInChild:L,level:0})}e.onMounted(()=>{t.mode==="horizontal"&&new me(n.vnode.el,E.namespace.value)}),d({open:u=>{const{indexPath:c}=N.value[u];c.forEach(h=>w(h,c))},close:$,handleResize:q});const R=X(t,0);return()=>{var a,u;let c=(u=(a=o.default)==null?void 0:a.call(o))!=null?u:[];const h=[];if(t.mode==="horizontal"&&v.value){const p=ae.flattedChildren(c),M=m.value===-1?p:p.slice(0,m.value),T=m.value===-1?[]:p.slice(m.value);T!=null&&T.length&&t.ellipsis&&(c=M,h.push(e.h(J,{index:"sub-menu-more",class:i.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>e.h(S.ElIcon,{class:i.e("icon-more")},{default:()=>e.h(t.ellipsisIcon)}),default:()=>T})))}const g=t.closeOnClickOutside?[[se.ClickOutside,()=>{f.value.length&&(L.value||(f.value.forEach(p=>s("close",p,k(p))),f.value=[]))}]]:[],r=e.withDirectives(e.h("ul",{key:String(t.collapse),role:"menubar",ref:v,style:R.value,class:{[E.b()]:!0,[E.m(t.mode)]:!0,[E.m("collapse")]:t.collapse}},[...c,...h]),g);return t.collapseTransition&&t.mode==="vertical"?e.h(he,()=>r):r}}});const Ce=l.buildProps({index:{type:l.definePropType([String,null]),default:null},route:{type:l.definePropType([String,Object])},disabled:Boolean}),Ie={click:t=>l.isString$1(t.index)&&l.isArray(t.indexPath)},Z="ElMenuItem",Te=e.defineComponent({name:Z,components:{ElTooltip:K.ElTooltip},props:Ce,emits:Ie,setup(t,{emit:s}){const o=e.getCurrentInstance(),d=e.inject("rootMenu"),n=l.useNamespace("menu"),C=l.useNamespace("menu-item");d||l.throwError(Z,"can not inject root menu");const{parentMenu:v,indexPath:E}=Q(o,e.toRef(t,"index")),i=e.inject(`subMenu:${v.value.uid}`);i||l.throwError(Z,"can not inject sub menu");const m=e.computed(()=>t.index===d.activeIndex),f=e.reactive({index:t.index,indexPath:E,active:m}),b=()=>{t.disabled||(d.handleMenuItemClick({index:t.index,indexPath:E.value,route:t.route}),s("click",f))};return e.onMounted(()=>{i.addSubMenu(f),d.addMenuItem(f)}),e.onBeforeUnmount(()=>{i.removeSubMenu(f),d.removeMenuItem(f)}),{parentMenu:v,rootMenu:d,active:m,nsMenu:n,nsMenuItem:C,handleClick:b}}});function xe(t,s,o,d,n,C){const v=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([t.nsMenuItem.b(),t.nsMenuItem.is("active",t.active),t.nsMenuItem.is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:t.handleClick},[t.parentMenu.type.name==="ElMenu"&&t.rootMenu.props.collapse&&t.$slots.title?(e.openBlock(),e.createBlock(v,{key:0,effect:t.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:e.withCtx(()=>[e.renderSlot(t.$slots,"title")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.nsMenu.be("tooltip","trigger"))},[e.renderSlot(t.$slots,"default")],2)]),_:3},8,["effect"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"default"),e.renderSlot(t.$slots,"title")],64))],10,["onClick"])}var Y=l._export_sfc(Te,[["render",xe],["__file","menu-item.vue"]]);const Se={title:String},Ne="ElMenuItemGroup",we=e.defineComponent({name:Ne,props:Se,setup(){return{ns:l.useNamespace("menu-item-group")}}});function _e(t,s,o,d,n,C){return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(t.ns.b())},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("title"))},[t.$slots.title?e.renderSlot(t.$slots,"title",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.title),1)],64))],2),e.createElementVNode("ul",null,[e.renderSlot(t.$slots,"default")])],2)}var ee=l._export_sfc(we,[["render",_e],["__file","menu-item-group.vue"]]);const ke=l.withInstall(Ee,{MenuItem:Y,MenuItemGroup:ee,SubMenu:J}),Oe=l.withNoopInstall(Y);l.withNoopInstall(ee);l.withNoopInstall(J);exports.ElMenu=ke;exports.ElMenuItem=Oe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),k=require("./el-scrollbar-
|
|
1
|
+
"use strict";const e=require("vue"),k=require("./el-scrollbar-a01fea99.cjs"),o=require("./base-b384d332.cjs"),v=require("./use-form-common-props-41091f5f.cjs"),L=require("./typescript-b63f8e83.cjs"),_=require("./index-cb665c76.cjs"),D=require("./index-e0fa2f71.cjs"),p=require("./config-provider-08c54ec3.cjs"),O=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),P=e.defineComponent({name:"ElBadge"}),F=e.defineComponent({...P,props:O,setup(s,{expose:t}){const n=s,a=o.useNamespace("badge"),r=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var l,c,m,g,y;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(l=n.offset)==null?void 0:l[0])!=null?c:0)),marginTop:o.addUnit((g=(m=n.offset)==null?void 0:m[1])!=null?g:0)},(y=n.badgeStyle)!=null?y:{}]});return t({content:r}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.renderSlot(l.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(a).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(a).e("content"),e.unref(a).em("content",l.type),e.unref(a).is("fixed",!!l.$slots.default),e.unref(a).is("dot",l.isDot),e.unref(a).is("hide-zero",!l.showZero&&n.value===0),l.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(l.$slots,"content",{value:e.unref(r)},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)])],6),[[e.vShow,!l.hidden&&(e.unref(r)||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var q=o._export_sfc(F,[["__file","badge.vue"]]);const H=o.withInstall(q),w=["success","info","warning","error"],u=L.mutable({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},center:{type:Boolean,default:u.center},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:v.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:w,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},d=e.shallowReactive([]),U=s=>{const t=d.findIndex(r=>r.id===s),n=d[t];let a;return t>0&&(a=d[t-1]),{current:n,prev:a}},Z=s=>{const{prev:t}=U(s);return t?t.vm.exposed.bottom.value:0},j=(s,t)=>d.findIndex(a=>a.id===s)>0?16:t,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(s,{expose:t}){const n=s,{Close:a}=v.TypeComponents,{ns:r,zIndex:f}=_.useGlobalComponentSettings("message"),{currentZIndex:l,nextZIndex:c}=f,m=e.ref(),g=e.ref(!1),y=e.ref(0);let b;const z=e.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),M=e.computed(()=>{const i=n.type;return{[r.bm("icon",i)]:i&&v.TypeComponentsMap[i]}}),T=e.computed(()=>n.icon||v.TypeComponentsMap[n.type]||""),$=e.computed(()=>Z(n.id)),N=e.computed(()=>j(n.id,n.offset)+$.value),I=e.computed(()=>y.value+N.value),V=e.computed(()=>({top:`${N.value}px`,zIndex:l.value}));function B(){n.duration!==0&&({stop:b}=o.useTimeoutFn(()=>{h()},n.duration))}function S(){b==null||b()}function h(){g.value=!1}function x({code:i}){i===D.EVENT_CODE.esc&&h()}return e.onMounted(()=>{B(),c(),g.value=!0}),e.watch(()=>n.repeatNum,()=>{S(),B()}),k.useEventListener(document,"keydown",x),k.useResizeObserver(m,()=>{y.value=m.value.getBoundingClientRect().height}),t({visible:g,bottom:I,close:h}),(i,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(r).b("fade"),onBeforeLeave:i.onClose,onAfterLeave:oe=>i.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:i.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(r).b(),{[e.unref(r).m(i.type)]:i.type},e.unref(r).is("center",i.center),e.unref(r).is("closable",i.showClose),e.unref(r).is("plain",i.plain),i.customClass]),style:e.normalizeStyle(e.unref(V)),role:"alert",onMouseenter:S,onMouseleave:B},[i.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(H),{key:0,value:i.repeatNum,type:e.unref(z),class:e.normalizeClass(e.unref(r).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(M)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(T))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(i.$slots,"default",{},()=>[i.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(r).e("content")),innerHTML:i.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(r).e("content"))},e.toDisplayString(i.message),3))]),i.showClose?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:2,class:e.normalizeClass(e.unref(r).e("closeBtn")),onClick:e.withModifiers(h,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,g.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const E=s=>{const t=!s||o.isString$1(s)||e.isVNode(s)||o.isFunction(s)?{message:s}:s,n={...u,...t};if(!n.appendTo)n.appendTo=document.body;else if(o.isString$1(n.appendTo)){let a=document.querySelector(n.appendTo);o.isElement(a)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body),n.appendTo=a}return o.isBoolean(p.messageConfig.grouping)&&!n.grouping&&(n.grouping=p.messageConfig.grouping),o.isNumber(p.messageConfig.duration)&&n.duration===3e3&&(n.duration=p.messageConfig.duration),o.isNumber(p.messageConfig.offset)&&n.offset===16&&(n.offset=p.messageConfig.offset),o.isBoolean(p.messageConfig.showClose)&&!n.showClose&&(n.showClose=p.messageConfig.showClose),n},Q=s=>{const t=d.indexOf(s);if(t===-1)return;d.splice(t,1);const{handler:n}=s;n.close()},X=({appendTo:s,...t},n)=>{const a=`message_${K++}`,r=t.onClose,f=document.createElement("div"),l={...t,id:a,onClose:()=>{r==null||r(),Q(y)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,l,o.isFunction(l.message)||e.isVNode(l.message)?{default:o.isFunction(l.message)?l.message:()=>l.message}:null);c.appContext=n||C._context,e.render(c,f),s.appendChild(f.firstElementChild);const m=c.component,y={id:a,vnode:c,vm:m,handler:{close:()=>{m.exposed.visible.value=!1}},props:c.component.props};return y},C=(s={},t)=>{if(!o.isClient)return{close:()=>{}};const n=E(s);if(n.grouping&&d.length){const r=d.find(({vnode:f})=>{var l;return((l=f.props)==null?void 0:l.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(o.isNumber(p.messageConfig.max)&&d.length>=p.messageConfig.max)return{close:()=>{}};const a=X(n,t);return d.push(a),a.handler};w.forEach(s=>{C[s]=(t={},n)=>{const a=E(t);return C({...a,type:s},n)}});function Y(s){for(const t of d)(!s||s===t.props.type)&&t.handler.close()}C.closeAll=Y;C._context=null;const ee=o.withInstallFunction(C,"$message");exports.ElMessage=ee;
|