st-comp 0.0.148 → 0.0.150
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/components.d.ts +3 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +5 -4
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +28 -24
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +577 -631
- package/es/Kline.cjs +1 -0
- package/es/Kline.js +1903 -0
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +677 -1428
- package/es/KlineNew.cjs +1 -3
- package/es/KlineNew.js +316 -2740
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +60 -58
- package/es/PasswordPrompt.cjs +1 -0
- package/es/PasswordPrompt.js +13 -0
- package/es/Table.cjs +1 -1
- package/es/Table.js +102 -98
- package/es/User.cjs +1 -1
- package/es/User.js +397 -373
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +2395 -1
- package/es/VirtualTable.cjs +5 -5
- package/es/VirtualTable.js +154 -151
- package/es/_initCloneObject-47814efa.cjs +1 -0
- package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
- package/es/base-0ca7c43a.cjs +5 -0
- package/es/base-19787dfb.js +303 -0
- package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
- package/es/castArray-a78ae889.cjs +1 -0
- package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
- package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
- package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
- package/es/debounce-cf26af24.cjs +1 -0
- package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
- package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
- package/es/el-button-0bf1d532.js +236 -0
- package/es/el-button-62966947.cjs +1 -0
- package/es/el-checkbox-group-45247bbf.cjs +1 -0
- package/es/el-checkbox-group-d53bc316.js +67 -0
- package/es/el-empty-2ece1134.cjs +1 -0
- package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
- package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
- package/es/el-form-item-47e255d4.cjs +12 -0
- package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
- package/es/el-input-6a3805c5.cjs +1 -0
- package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
- package/es/el-input-number-96ff2e47.cjs +1 -0
- package/es/el-menu-item-4c9eb7ad.cjs +1 -0
- package/es/el-menu-item-6c6236a1.js +772 -0
- package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
- package/es/el-message-d5ed7a4f.cjs +1 -0
- package/es/el-overlay-26bf0945.js +521 -0
- package/es/el-overlay-41994f67.cjs +1 -0
- package/es/el-popover-17e2e66c.js +140 -0
- package/es/el-popover-7bd8a7c3.cjs +1 -0
- package/es/el-popper-7adbf1c6.cjs +1 -0
- package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
- package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
- package/es/el-scrollbar-ac525239.cjs +1 -0
- package/es/el-select-31f8ac8a.cjs +1 -0
- package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
- package/es/el-table-column-47d80736.js +3804 -0
- package/es/el-table-column-bdc46568.cjs +14 -0
- package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
- package/es/el-tag-9732314f.cjs +1 -0
- package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
- package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
- package/es/index-2f958e56.cjs +3 -0
- package/es/index-375e8de4.cjs +5 -0
- package/es/{index-121e2861.js → index-621b092b.js} +3 -3
- package/es/index-657047bb.js +513 -0
- package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
- package/es/index-70372cdb.js +519 -0
- package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
- package/es/index-9e6e8d03.cjs +1 -0
- package/es/index-ab96bbf4.js +156 -0
- package/es/index-afc88a4b.cjs +1 -0
- package/es/index-c066fe0d.js +82 -0
- package/es/index-ce3223db.cjs +1 -0
- package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
- package/es/index-eea0bcb3.cjs +1 -0
- package/es/index.esm-8d9a2abe.js +2432 -0
- package/es/index.esm-94a95a2a.cjs +3 -0
- package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
- package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
- package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
- package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-5ff2f51b.js +171 -0
- package/es/use-form-common-props-74a96df2.cjs +2 -0
- package/es/vnode-6a0c7411.js +14 -0
- package/es/vnode-b15eb11b.cjs +1 -0
- package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
- package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
- package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/Kline/components/Contextmenu/index.vue +110 -0
- package/packages/Kline/components/Tips/index.vue +40 -0
- package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
- package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
- package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
- package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
- package/packages/Kline/componentsNew/Tips/index.vue +33 -0
- package/packages/Kline/formatKlineData.ts +109 -0
- package/packages/Kline/images/buy.svg +1 -0
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +1 -0
- package/packages/Kline/images/t.svg +1 -0
- package/packages/Kline/index.ts +16 -0
- package/packages/Kline/index.vue +891 -0
- package/packages/Kline/option.ts +539 -0
- package/packages/Kline/type.d.ts +219 -0
- package/packages/Kline/utils.ts +682 -0
- package/packages/PasswordPrompt/index.ts +8 -0
- package/packages/PasswordPrompt/index.vue +266 -0
- package/packages/User/index.vue +97 -58
- package/packages/index.ts +4 -0
- package/src/pages/Kline/index.vue +12 -0
- package/src/pages/PasswordPrompt/index.vue +12 -0
- package/src/router/routes.ts +10 -0
- package/es/_initCloneObject-476b02ce.cjs +0 -1
- package/es/base-6ccc8fc2.cjs +0 -9
- package/es/base-950bac7e.js +0 -816
- package/es/castArray-374558a5.cjs +0 -1
- package/es/debounce-a6b4f91b.cjs +0 -1
- package/es/el-button-b8f71c7d.cjs +0 -1
- package/es/el-button-d7b6eebd.js +0 -745
- package/es/el-empty-12eece57.cjs +0 -1
- package/es/el-form-item-ebbf096d.cjs +0 -12
- package/es/el-input-2c7e70a3.cjs +0 -1
- package/es/el-input-number-8e168e83.cjs +0 -1
- package/es/el-message-612c2346.cjs +0 -1
- package/es/el-overlay-07414277.js +0 -526
- package/es/el-overlay-fb255b83.cjs +0 -1
- package/es/el-popper-8360bd91.cjs +0 -1
- package/es/el-scrollbar-271142ad.cjs +0 -1
- package/es/el-select-2e71d4af.cjs +0 -1
- package/es/el-table-column-9fe79f05.cjs +0 -14
- package/es/el-table-column-dc562f14.js +0 -3933
- package/es/el-tag-930e7b32.cjs +0 -1
- package/es/index-0ed86daf.cjs +0 -3
- package/es/index-674d2fd7.cjs +0 -1
- package/es/index-aece600c.js +0 -81
- package/es/use-form-common-props-c1960844.cjs +0 -2
|
@@ -0,0 +1,772 @@
|
|
|
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 J, provide as me, onMounted as be, onBeforeUnmount as Se, h as b, Fragment as ge, withDirectives as we, vShow as We, watchEffect as Re, nextTick as De, toRef as je, resolveComponent as qe, createElementBlock as Y, normalizeClass as ee, createElementVNode as pe, createTextVNode as Fe, toDisplayString as Ve } from "vue";
|
|
2
|
+
import { a as Ge } from "./el-scrollbar-29bcab5f.js";
|
|
3
|
+
import { a as Ue, b as Ze, E as ke, m as Je } from "./index-72151b24.js";
|
|
4
|
+
import { E as T, t as K } from "./index-621b092b.js";
|
|
5
|
+
import { u as w, _ as oe, w as $e, m as Z, r as ie, n as Ke, b as Me, t as te, i as R, o as Ce, d as ne, f as Qe, p as xe, q as Oe, s as ye } from "./base-19787dfb.js";
|
|
6
|
+
import { E as _e } from "./el-popper-b6527ae2.js";
|
|
7
|
+
import { T as Xe } from "./index-657047bb.js";
|
|
8
|
+
import { i as F } from "./use-form-common-props-5ff2f51b.js";
|
|
9
|
+
import { C as Ye } from "./el-tag-7414e0c7.js";
|
|
10
|
+
import { m as et } from "./typescript-7ae59c4c.js";
|
|
11
|
+
import { f as tt } from "./vnode-6a0c7411.js";
|
|
12
|
+
const nt = z({
|
|
13
|
+
name: "ElCollapseTransition"
|
|
14
|
+
}), ot = /* @__PURE__ */ z({
|
|
15
|
+
...nt,
|
|
16
|
+
setup(e) {
|
|
17
|
+
const o = w("collapse-transition"), n = (t) => {
|
|
18
|
+
t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom;
|
|
19
|
+
}, r = {
|
|
20
|
+
beforeEnter(t) {
|
|
21
|
+
t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.style.height && (t.dataset.elExistsHeight = t.style.height), t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0;
|
|
22
|
+
},
|
|
23
|
+
enter(t) {
|
|
24
|
+
requestAnimationFrame(() => {
|
|
25
|
+
t.dataset.oldOverflow = t.style.overflow, t.dataset.elExistsHeight ? t.style.maxHeight = t.dataset.elExistsHeight : t.scrollHeight !== 0 ? t.style.maxHeight = `${t.scrollHeight}px` : t.style.maxHeight = 0, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom, t.style.overflow = "hidden";
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
afterEnter(t) {
|
|
29
|
+
t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow;
|
|
30
|
+
},
|
|
31
|
+
enterCancelled(t) {
|
|
32
|
+
n(t);
|
|
33
|
+
},
|
|
34
|
+
beforeLeave(t) {
|
|
35
|
+
t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.dataset.oldOverflow = t.style.overflow, t.style.maxHeight = `${t.scrollHeight}px`, t.style.overflow = "hidden";
|
|
36
|
+
},
|
|
37
|
+
leave(t) {
|
|
38
|
+
t.scrollHeight !== 0 && (t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0);
|
|
39
|
+
},
|
|
40
|
+
afterLeave(t) {
|
|
41
|
+
n(t);
|
|
42
|
+
},
|
|
43
|
+
leaveCancelled(t) {
|
|
44
|
+
n(t);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return (t, I) => (B(), ve(Ee, Te({
|
|
48
|
+
name: He(o).b()
|
|
49
|
+
}, Le(r)), {
|
|
50
|
+
default: Q(() => [
|
|
51
|
+
$(t.$slots, "default")
|
|
52
|
+
]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 16, ["name"]));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var at = /* @__PURE__ */ oe(ot, [["__file", "collapse-transition.vue"]]);
|
|
58
|
+
const st = $e(at);
|
|
59
|
+
let lt = class {
|
|
60
|
+
constructor(o, n) {
|
|
61
|
+
this.parent = o, this.domNode = n, this.subIndex = 0, this.subIndex = 0, this.init();
|
|
62
|
+
}
|
|
63
|
+
init() {
|
|
64
|
+
this.subMenuItems = this.domNode.querySelectorAll("li"), this.addListeners();
|
|
65
|
+
}
|
|
66
|
+
gotoSubIndex(o) {
|
|
67
|
+
o === this.subMenuItems.length ? o = 0 : o < 0 && (o = this.subMenuItems.length - 1), this.subMenuItems[o].focus(), this.subIndex = o;
|
|
68
|
+
}
|
|
69
|
+
addListeners() {
|
|
70
|
+
const o = this.parent.domNode;
|
|
71
|
+
Array.prototype.forEach.call(this.subMenuItems, (n) => {
|
|
72
|
+
n.addEventListener("keydown", (r) => {
|
|
73
|
+
let t = !1;
|
|
74
|
+
switch (r.code) {
|
|
75
|
+
case T.down: {
|
|
76
|
+
this.gotoSubIndex(this.subIndex + 1), t = !0;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case T.up: {
|
|
80
|
+
this.gotoSubIndex(this.subIndex - 1), t = !0;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case T.tab: {
|
|
84
|
+
K(o, "mouseleave");
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case T.enter:
|
|
88
|
+
case T.numpadEnter:
|
|
89
|
+
case T.space: {
|
|
90
|
+
t = !0, r.currentTarget.click();
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return t && (r.preventDefault(), r.stopPropagation()), !1;
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, ut = class {
|
|
99
|
+
constructor(o, n) {
|
|
100
|
+
this.domNode = o, this.submenu = null, this.submenu = null, this.init(n);
|
|
101
|
+
}
|
|
102
|
+
init(o) {
|
|
103
|
+
this.domNode.setAttribute("tabindex", "0");
|
|
104
|
+
const n = this.domNode.querySelector(`.${o}-menu`);
|
|
105
|
+
n && (this.submenu = new lt(this, n)), this.addListeners();
|
|
106
|
+
}
|
|
107
|
+
addListeners() {
|
|
108
|
+
this.domNode.addEventListener("keydown", (o) => {
|
|
109
|
+
let n = !1;
|
|
110
|
+
switch (o.code) {
|
|
111
|
+
case T.down: {
|
|
112
|
+
K(o.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(0), n = !0;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case T.up: {
|
|
116
|
+
K(o.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1), n = !0;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case T.tab: {
|
|
120
|
+
K(o.currentTarget, "mouseleave");
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case T.enter:
|
|
124
|
+
case T.numpadEnter:
|
|
125
|
+
case T.space: {
|
|
126
|
+
n = !0, o.currentTarget.click();
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
n && o.preventDefault();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}, it = class {
|
|
134
|
+
constructor(o, n) {
|
|
135
|
+
this.domNode = o, this.init(n);
|
|
136
|
+
}
|
|
137
|
+
init(o) {
|
|
138
|
+
const n = this.domNode.childNodes;
|
|
139
|
+
Array.from(n).forEach((r) => {
|
|
140
|
+
r.nodeType === 1 && new ut(r, o);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const rt = z({
|
|
145
|
+
name: "ElMenuCollapseTransition",
|
|
146
|
+
setup() {
|
|
147
|
+
const e = w("menu");
|
|
148
|
+
return {
|
|
149
|
+
listeners: {
|
|
150
|
+
onBeforeEnter: (n) => n.style.opacity = "0.2",
|
|
151
|
+
onEnter(n, r) {
|
|
152
|
+
Z(n, `${e.namespace.value}-opacity-transition`), n.style.opacity = "1", r();
|
|
153
|
+
},
|
|
154
|
+
onAfterEnter(n) {
|
|
155
|
+
ie(n, `${e.namespace.value}-opacity-transition`), n.style.opacity = "";
|
|
156
|
+
},
|
|
157
|
+
onBeforeLeave(n) {
|
|
158
|
+
n.dataset || (n.dataset = {}), Ke(n, e.m("collapse")) ? (ie(n, e.m("collapse")), n.dataset.oldOverflow = n.style.overflow, n.dataset.scrollWidth = n.clientWidth.toString(), Z(n, e.m("collapse"))) : (Z(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";
|
|
159
|
+
},
|
|
160
|
+
onLeave(n) {
|
|
161
|
+
Z(n, "horizontal-collapse-transition"), n.style.width = `${n.dataset.scrollWidth}px`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
function ct(e, o, n, r, t, I) {
|
|
168
|
+
return B(), ve(Ee, Te({ mode: "out-in" }, e.listeners), {
|
|
169
|
+
default: Q(() => [
|
|
170
|
+
$(e.$slots, "default")
|
|
171
|
+
]),
|
|
172
|
+
_: 3
|
|
173
|
+
}, 16);
|
|
174
|
+
}
|
|
175
|
+
var dt = /* @__PURE__ */ oe(rt, [["render", ct], ["__file", "menu-collapse-transition.vue"]]);
|
|
176
|
+
function Pe(e, o) {
|
|
177
|
+
const n = h(() => {
|
|
178
|
+
let t = e.parent;
|
|
179
|
+
const I = [o.value];
|
|
180
|
+
for (; t.type.name !== "ElMenu"; )
|
|
181
|
+
t.props.index && I.unshift(t.props.index), t = t.parent;
|
|
182
|
+
return I;
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
parentMenu: h(() => {
|
|
186
|
+
let t = e.parent;
|
|
187
|
+
for (; t && !["ElMenu", "ElSubMenu"].includes(t.type.name); )
|
|
188
|
+
t = t.parent;
|
|
189
|
+
return t;
|
|
190
|
+
}),
|
|
191
|
+
indexPath: n
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function mt(e) {
|
|
195
|
+
return h(() => {
|
|
196
|
+
const n = e.backgroundColor;
|
|
197
|
+
return n ? new Xe(n).shade(20).toString() : "";
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const Ne = (e, o) => {
|
|
201
|
+
const n = w("menu");
|
|
202
|
+
return h(() => n.cssVarBlock({
|
|
203
|
+
"text-color": e.textColor || "",
|
|
204
|
+
"hover-text-color": e.textColor || "",
|
|
205
|
+
"bg-color": e.backgroundColor || "",
|
|
206
|
+
"hover-bg-color": mt(e).value || "",
|
|
207
|
+
"active-color": e.activeTextColor || "",
|
|
208
|
+
level: `${o}`
|
|
209
|
+
}));
|
|
210
|
+
}, pt = Me({
|
|
211
|
+
index: {
|
|
212
|
+
type: String,
|
|
213
|
+
required: !0
|
|
214
|
+
},
|
|
215
|
+
showTimeout: Number,
|
|
216
|
+
hideTimeout: Number,
|
|
217
|
+
popperClass: String,
|
|
218
|
+
disabled: Boolean,
|
|
219
|
+
teleported: {
|
|
220
|
+
type: Boolean,
|
|
221
|
+
default: void 0
|
|
222
|
+
},
|
|
223
|
+
popperOffset: Number,
|
|
224
|
+
expandCloseIcon: {
|
|
225
|
+
type: F
|
|
226
|
+
},
|
|
227
|
+
expandOpenIcon: {
|
|
228
|
+
type: F
|
|
229
|
+
},
|
|
230
|
+
collapseCloseIcon: {
|
|
231
|
+
type: F
|
|
232
|
+
},
|
|
233
|
+
collapseOpenIcon: {
|
|
234
|
+
type: F
|
|
235
|
+
}
|
|
236
|
+
}), re = "ElSubMenu";
|
|
237
|
+
var Ie = z({
|
|
238
|
+
name: re,
|
|
239
|
+
props: pt,
|
|
240
|
+
setup(e, { slots: o, expose: n }) {
|
|
241
|
+
const r = fe(), { indexPath: t, parentMenu: I } = Pe(r, h(() => e.index)), m = w("menu"), y = w("sub-menu"), u = X("rootMenu");
|
|
242
|
+
u || te(re, "can not inject root menu");
|
|
243
|
+
const d = X(`subMenu:${I.value.uid}`);
|
|
244
|
+
d || te(re, "can not inject sub menu");
|
|
245
|
+
const p = E({}), g = E({});
|
|
246
|
+
let C;
|
|
247
|
+
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 : Ze), _ = h(() => d.level === 0), D = h(() => {
|
|
248
|
+
const l = e.teleported;
|
|
249
|
+
return l === void 0 ? _.value : l;
|
|
250
|
+
}), se = h(() => u.props.collapse ? `${m.namespace.value}-zoom-in-left` : `${m.namespace.value}-zoom-in-top`), le = h(() => P.value === "horizontal" && _.value ? [
|
|
251
|
+
"bottom-start",
|
|
252
|
+
"bottom-end",
|
|
253
|
+
"top-start",
|
|
254
|
+
"top-end",
|
|
255
|
+
"right-start",
|
|
256
|
+
"left-start"
|
|
257
|
+
] : [
|
|
258
|
+
"right-start",
|
|
259
|
+
"right",
|
|
260
|
+
"right-end",
|
|
261
|
+
"left-start",
|
|
262
|
+
"bottom-start",
|
|
263
|
+
"bottom-end",
|
|
264
|
+
"top-start",
|
|
265
|
+
"top-end"
|
|
266
|
+
]), S = h(() => u.openedMenus.includes(e.index)), H = h(() => {
|
|
267
|
+
let l = !1;
|
|
268
|
+
return Object.values(p.value).forEach((c) => {
|
|
269
|
+
c.active && (l = !0);
|
|
270
|
+
}), Object.values(g.value).forEach((c) => {
|
|
271
|
+
c.active && (l = !0);
|
|
272
|
+
}), l;
|
|
273
|
+
}), P = h(() => u.props.mode), L = he({
|
|
274
|
+
index: e.index,
|
|
275
|
+
indexPath: t,
|
|
276
|
+
active: H
|
|
277
|
+
}), j = Ne(u.props, d.level + 1), G = h(() => {
|
|
278
|
+
var l;
|
|
279
|
+
return (l = e.popperOffset) != null ? l : u.props.popperOffset;
|
|
280
|
+
}), W = h(() => {
|
|
281
|
+
var l;
|
|
282
|
+
return (l = e.popperClass) != null ? l : u.props.popperClass;
|
|
283
|
+
}), U = h(() => {
|
|
284
|
+
var l;
|
|
285
|
+
return (l = e.showTimeout) != null ? l : u.props.showTimeout;
|
|
286
|
+
}), ue = h(() => {
|
|
287
|
+
var l;
|
|
288
|
+
return (l = e.hideTimeout) != null ? l : u.props.hideTimeout;
|
|
289
|
+
}), a = () => {
|
|
290
|
+
var l, c, M;
|
|
291
|
+
return (M = (c = (l = V.value) == null ? void 0 : l.popperRef) == null ? void 0 : c.popperInstanceRef) == null ? void 0 : M.destroy();
|
|
292
|
+
}, s = (l) => {
|
|
293
|
+
l || a();
|
|
294
|
+
}, i = () => {
|
|
295
|
+
u.props.menuTrigger === "hover" && u.props.mode === "horizontal" || u.props.collapse && u.props.mode === "vertical" || e.disabled || u.handleSubMenuClick({
|
|
296
|
+
index: e.index,
|
|
297
|
+
indexPath: t.value,
|
|
298
|
+
active: H.value
|
|
299
|
+
});
|
|
300
|
+
}, v = (l, c = U.value) => {
|
|
301
|
+
var M;
|
|
302
|
+
if (l.type !== "focus") {
|
|
303
|
+
if (u.props.menuTrigger === "click" && u.props.mode === "horizontal" || !u.props.collapse && u.props.mode === "vertical" || e.disabled) {
|
|
304
|
+
d.mouseInChild.value = !0;
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
d.mouseInChild.value = !0, C == null || C(), { stop: C } = Ce(() => {
|
|
308
|
+
u.openMenu(e.index, t.value);
|
|
309
|
+
}, c), D.value && ((M = I.value.vnode.el) == null || M.dispatchEvent(new MouseEvent("mouseenter")));
|
|
310
|
+
}
|
|
311
|
+
}, f = (l = !1) => {
|
|
312
|
+
var c;
|
|
313
|
+
if (u.props.menuTrigger === "click" && u.props.mode === "horizontal" || !u.props.collapse && u.props.mode === "vertical") {
|
|
314
|
+
d.mouseInChild.value = !1;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
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));
|
|
318
|
+
};
|
|
319
|
+
J(() => u.props.collapse, (l) => s(!!l));
|
|
320
|
+
{
|
|
321
|
+
const l = (M) => {
|
|
322
|
+
g.value[M.index] = M;
|
|
323
|
+
}, c = (M) => {
|
|
324
|
+
delete g.value[M.index];
|
|
325
|
+
};
|
|
326
|
+
me(`subMenu:${r.uid}`, {
|
|
327
|
+
addSubMenu: l,
|
|
328
|
+
removeSubMenu: c,
|
|
329
|
+
handleMouseleave: f,
|
|
330
|
+
mouseInChild: k,
|
|
331
|
+
level: d.level + 1
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
return n({
|
|
335
|
+
opened: S
|
|
336
|
+
}), be(() => {
|
|
337
|
+
u.addSubMenu(L), d.addSubMenu(L);
|
|
338
|
+
}), Se(() => {
|
|
339
|
+
d.removeSubMenu(L), u.removeSubMenu(L);
|
|
340
|
+
}), () => {
|
|
341
|
+
var l;
|
|
342
|
+
const c = [
|
|
343
|
+
(l = o.title) == null ? void 0 : l.call(o),
|
|
344
|
+
b(ke, {
|
|
345
|
+
class: y.e("icon-arrow"),
|
|
346
|
+
style: {
|
|
347
|
+
transform: S.value ? e.expandCloseIcon && e.expandOpenIcon || e.collapseCloseIcon && e.collapseOpenIcon && u.props.collapse ? "none" : "rotateZ(180deg)" : "none"
|
|
348
|
+
}
|
|
349
|
+
}, {
|
|
350
|
+
default: () => R(A.value) ? b(r.appContext.components[A.value]) : b(A.value)
|
|
351
|
+
})
|
|
352
|
+
], M = u.isMenuPopup ? b(_e, {
|
|
353
|
+
ref: V,
|
|
354
|
+
visible: S.value,
|
|
355
|
+
effect: "light",
|
|
356
|
+
pure: !0,
|
|
357
|
+
offset: G.value,
|
|
358
|
+
showArrow: !1,
|
|
359
|
+
persistent: !0,
|
|
360
|
+
popperClass: W.value,
|
|
361
|
+
placement: O.value,
|
|
362
|
+
teleported: D.value,
|
|
363
|
+
fallbackPlacements: le.value,
|
|
364
|
+
transition: se.value,
|
|
365
|
+
gpuAcceleration: !1
|
|
366
|
+
}, {
|
|
367
|
+
content: () => {
|
|
368
|
+
var x;
|
|
369
|
+
return b("div", {
|
|
370
|
+
class: [
|
|
371
|
+
m.m(P.value),
|
|
372
|
+
m.m("popup-container"),
|
|
373
|
+
W.value
|
|
374
|
+
],
|
|
375
|
+
onMouseenter: (N) => v(N, 100),
|
|
376
|
+
onMouseleave: () => f(!0),
|
|
377
|
+
onFocus: (N) => v(N, 100)
|
|
378
|
+
}, [
|
|
379
|
+
b("ul", {
|
|
380
|
+
class: [
|
|
381
|
+
m.b(),
|
|
382
|
+
m.m("popup"),
|
|
383
|
+
m.m(`popup-${O.value}`)
|
|
384
|
+
],
|
|
385
|
+
style: j.value
|
|
386
|
+
}, [(x = o.default) == null ? void 0 : x.call(o)])
|
|
387
|
+
]);
|
|
388
|
+
},
|
|
389
|
+
default: () => b("div", {
|
|
390
|
+
class: y.e("title"),
|
|
391
|
+
onClick: i
|
|
392
|
+
}, c)
|
|
393
|
+
}) : b(ge, {}, [
|
|
394
|
+
b("div", {
|
|
395
|
+
class: y.e("title"),
|
|
396
|
+
ref: ae,
|
|
397
|
+
onClick: i
|
|
398
|
+
}, c),
|
|
399
|
+
b(st, {}, {
|
|
400
|
+
default: () => {
|
|
401
|
+
var x;
|
|
402
|
+
return we(b("ul", {
|
|
403
|
+
role: "menu",
|
|
404
|
+
class: [m.b(), m.m("inline")],
|
|
405
|
+
style: j.value
|
|
406
|
+
}, [(x = o.default) == null ? void 0 : x.call(o)]), [[We, S.value]]);
|
|
407
|
+
}
|
|
408
|
+
})
|
|
409
|
+
]);
|
|
410
|
+
return b("li", {
|
|
411
|
+
class: [
|
|
412
|
+
y.b(),
|
|
413
|
+
y.is("active", H.value),
|
|
414
|
+
y.is("opened", S.value),
|
|
415
|
+
y.is("disabled", e.disabled)
|
|
416
|
+
],
|
|
417
|
+
role: "menuitem",
|
|
418
|
+
ariaHaspopup: !0,
|
|
419
|
+
ariaExpanded: S.value,
|
|
420
|
+
onMouseenter: v,
|
|
421
|
+
onMouseleave: () => f(),
|
|
422
|
+
onFocus: v
|
|
423
|
+
}, [M]);
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
const vt = Me({
|
|
428
|
+
mode: {
|
|
429
|
+
type: String,
|
|
430
|
+
values: ["horizontal", "vertical"],
|
|
431
|
+
default: "vertical"
|
|
432
|
+
},
|
|
433
|
+
defaultActive: {
|
|
434
|
+
type: String,
|
|
435
|
+
default: ""
|
|
436
|
+
},
|
|
437
|
+
defaultOpeneds: {
|
|
438
|
+
type: ne(Array),
|
|
439
|
+
default: () => et([])
|
|
440
|
+
},
|
|
441
|
+
uniqueOpened: Boolean,
|
|
442
|
+
router: Boolean,
|
|
443
|
+
menuTrigger: {
|
|
444
|
+
type: String,
|
|
445
|
+
values: ["hover", "click"],
|
|
446
|
+
default: "hover"
|
|
447
|
+
},
|
|
448
|
+
collapse: Boolean,
|
|
449
|
+
backgroundColor: String,
|
|
450
|
+
textColor: String,
|
|
451
|
+
activeTextColor: String,
|
|
452
|
+
closeOnClickOutside: Boolean,
|
|
453
|
+
collapseTransition: {
|
|
454
|
+
type: Boolean,
|
|
455
|
+
default: !0
|
|
456
|
+
},
|
|
457
|
+
ellipsis: {
|
|
458
|
+
type: Boolean,
|
|
459
|
+
default: !0
|
|
460
|
+
},
|
|
461
|
+
popperOffset: {
|
|
462
|
+
type: Number,
|
|
463
|
+
default: 6
|
|
464
|
+
},
|
|
465
|
+
ellipsisIcon: {
|
|
466
|
+
type: F,
|
|
467
|
+
default: () => Je
|
|
468
|
+
},
|
|
469
|
+
popperEffect: {
|
|
470
|
+
type: ne(String),
|
|
471
|
+
default: "dark"
|
|
472
|
+
},
|
|
473
|
+
popperClass: String,
|
|
474
|
+
showTimeout: {
|
|
475
|
+
type: Number,
|
|
476
|
+
default: 300
|
|
477
|
+
},
|
|
478
|
+
hideTimeout: {
|
|
479
|
+
type: Number,
|
|
480
|
+
default: 300
|
|
481
|
+
}
|
|
482
|
+
}), ce = (e) => Oe(e) && e.every((o) => R(o)), ft = {
|
|
483
|
+
close: (e, o) => R(e) && ce(o),
|
|
484
|
+
open: (e, o) => R(e) && ce(o),
|
|
485
|
+
select: (e, o, n, r) => R(e) && ce(o) && Qe(n) && (r === void 0 || r instanceof Promise)
|
|
486
|
+
};
|
|
487
|
+
var ht = z({
|
|
488
|
+
name: "ElMenu",
|
|
489
|
+
props: vt,
|
|
490
|
+
emits: ft,
|
|
491
|
+
setup(e, { emit: o, slots: n, expose: r }) {
|
|
492
|
+
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 = () => {
|
|
493
|
+
const a = g.value && C.value[g.value];
|
|
494
|
+
if (!a || e.mode === "horizontal" || e.collapse)
|
|
495
|
+
return;
|
|
496
|
+
a.indexPath.forEach((i) => {
|
|
497
|
+
const v = k.value[i];
|
|
498
|
+
v && O(i, v.indexPath);
|
|
499
|
+
});
|
|
500
|
+
}, O = (a, s) => {
|
|
501
|
+
p.value.includes(a) || (e.uniqueOpened && (p.value = p.value.filter((i) => s.includes(i))), p.value.push(a), o("open", a, s));
|
|
502
|
+
}, A = (a) => {
|
|
503
|
+
const s = p.value.indexOf(a);
|
|
504
|
+
s !== -1 && p.value.splice(s, 1);
|
|
505
|
+
}, _ = (a, s) => {
|
|
506
|
+
A(a), o("close", a, s);
|
|
507
|
+
}, D = ({
|
|
508
|
+
index: a,
|
|
509
|
+
indexPath: s
|
|
510
|
+
}) => {
|
|
511
|
+
p.value.includes(a) ? _(a, s) : O(a, s);
|
|
512
|
+
}, se = (a) => {
|
|
513
|
+
(e.mode === "horizontal" || e.collapse) && (p.value = []);
|
|
514
|
+
const { index: s, indexPath: i } = a;
|
|
515
|
+
if (!(xe(s) || xe(i)))
|
|
516
|
+
if (e.router && I) {
|
|
517
|
+
const v = a.route || s, f = I.push(v).then((l) => (l || (g.value = s), l));
|
|
518
|
+
o("select", s, i, { index: s, indexPath: i, route: v }, f);
|
|
519
|
+
} else
|
|
520
|
+
g.value = s, o("select", s, i, { index: s, indexPath: i });
|
|
521
|
+
}, le = (a) => {
|
|
522
|
+
const s = C.value, i = s[a] || g.value && s[g.value] || s[e.defaultActive];
|
|
523
|
+
i ? g.value = i.index : g.value = a;
|
|
524
|
+
}, S = (a) => {
|
|
525
|
+
const s = getComputedStyle(a), i = Number.parseInt(s.marginLeft, 10), v = Number.parseInt(s.marginRight, 10);
|
|
526
|
+
return a.offsetWidth + i + v || 0;
|
|
527
|
+
}, H = () => {
|
|
528
|
+
var a, s;
|
|
529
|
+
if (!m.value)
|
|
530
|
+
return -1;
|
|
531
|
+
const i = Array.from((s = (a = m.value) == null ? void 0 : a.childNodes) != null ? s : []).filter((q) => q.nodeName !== "#text" || q.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;
|
|
532
|
+
let x = 0, N = 0;
|
|
533
|
+
return i.forEach((q, Ae) => {
|
|
534
|
+
q.nodeName !== "#comment" && (x += S(q), x <= M - v && (N = Ae + 1));
|
|
535
|
+
}), N === i.length ? -1 : N;
|
|
536
|
+
}, P = (a) => k.value[a].indexPath, L = (a, s = 33.34) => {
|
|
537
|
+
let i;
|
|
538
|
+
return () => {
|
|
539
|
+
i && clearTimeout(i), i = setTimeout(() => {
|
|
540
|
+
a();
|
|
541
|
+
}, s);
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
let j = !0;
|
|
545
|
+
const G = () => {
|
|
546
|
+
if (d.value === H())
|
|
547
|
+
return;
|
|
548
|
+
const a = () => {
|
|
549
|
+
d.value = -1, De(() => {
|
|
550
|
+
d.value = H();
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
j ? a() : L(a)(), j = !1;
|
|
554
|
+
};
|
|
555
|
+
J(() => e.defaultActive, (a) => {
|
|
556
|
+
C.value[a] || (g.value = ""), le(a);
|
|
557
|
+
}), J(() => e.collapse, (a) => {
|
|
558
|
+
a && (p.value = []);
|
|
559
|
+
}), J(C.value, V);
|
|
560
|
+
let W;
|
|
561
|
+
Re(() => {
|
|
562
|
+
e.mode === "horizontal" && e.ellipsis ? W = Ge(m, G).stop : W == null || W();
|
|
563
|
+
});
|
|
564
|
+
const U = E(!1);
|
|
565
|
+
{
|
|
566
|
+
const a = (f) => {
|
|
567
|
+
k.value[f.index] = f;
|
|
568
|
+
}, s = (f) => {
|
|
569
|
+
delete k.value[f.index];
|
|
570
|
+
};
|
|
571
|
+
me("rootMenu", he({
|
|
572
|
+
props: e,
|
|
573
|
+
openedMenus: p,
|
|
574
|
+
items: C,
|
|
575
|
+
subMenus: k,
|
|
576
|
+
activeIndex: g,
|
|
577
|
+
isMenuPopup: ae,
|
|
578
|
+
addMenuItem: (f) => {
|
|
579
|
+
C.value[f.index] = f;
|
|
580
|
+
},
|
|
581
|
+
removeMenuItem: (f) => {
|
|
582
|
+
delete C.value[f.index];
|
|
583
|
+
},
|
|
584
|
+
addSubMenu: a,
|
|
585
|
+
removeSubMenu: s,
|
|
586
|
+
openMenu: O,
|
|
587
|
+
closeMenu: _,
|
|
588
|
+
handleMenuItemClick: se,
|
|
589
|
+
handleSubMenuClick: D
|
|
590
|
+
})), me(`subMenu:${t.uid}`, {
|
|
591
|
+
addSubMenu: a,
|
|
592
|
+
removeSubMenu: s,
|
|
593
|
+
mouseInChild: U,
|
|
594
|
+
level: 0
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
be(() => {
|
|
598
|
+
e.mode === "horizontal" && new it(t.vnode.el, y.namespace.value);
|
|
599
|
+
}), r({
|
|
600
|
+
open: (s) => {
|
|
601
|
+
const { indexPath: i } = k.value[s];
|
|
602
|
+
i.forEach((v) => O(v, i));
|
|
603
|
+
},
|
|
604
|
+
close: A,
|
|
605
|
+
handleResize: G
|
|
606
|
+
});
|
|
607
|
+
const ue = Ne(e, 0);
|
|
608
|
+
return () => {
|
|
609
|
+
var a, s;
|
|
610
|
+
let i = (s = (a = n.default) == null ? void 0 : a.call(n)) != null ? s : [];
|
|
611
|
+
const v = [];
|
|
612
|
+
if (e.mode === "horizontal" && m.value) {
|
|
613
|
+
const c = tt(i), M = d.value === -1 ? c : c.slice(0, d.value), x = d.value === -1 ? [] : c.slice(d.value);
|
|
614
|
+
x != null && x.length && e.ellipsis && (i = M, v.push(b(Ie, {
|
|
615
|
+
index: "sub-menu-more",
|
|
616
|
+
class: u.e("hide-arrow"),
|
|
617
|
+
popperOffset: e.popperOffset
|
|
618
|
+
}, {
|
|
619
|
+
title: () => b(ke, {
|
|
620
|
+
class: u.e("icon-more")
|
|
621
|
+
}, {
|
|
622
|
+
default: () => b(e.ellipsisIcon)
|
|
623
|
+
}),
|
|
624
|
+
default: () => x
|
|
625
|
+
})));
|
|
626
|
+
}
|
|
627
|
+
const f = e.closeOnClickOutside ? [
|
|
628
|
+
[
|
|
629
|
+
Ye,
|
|
630
|
+
() => {
|
|
631
|
+
p.value.length && (U.value || (p.value.forEach((c) => o("close", c, P(c))), p.value = []));
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
] : [], l = we(b("ul", {
|
|
635
|
+
key: String(e.collapse),
|
|
636
|
+
role: "menubar",
|
|
637
|
+
ref: m,
|
|
638
|
+
style: ue.value,
|
|
639
|
+
class: {
|
|
640
|
+
[y.b()]: !0,
|
|
641
|
+
[y.m(e.mode)]: !0,
|
|
642
|
+
[y.m("collapse")]: e.collapse
|
|
643
|
+
}
|
|
644
|
+
}, [...i, ...v]), f);
|
|
645
|
+
return e.collapseTransition && e.mode === "vertical" ? b(dt, () => l) : l;
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
const bt = Me({
|
|
650
|
+
index: {
|
|
651
|
+
type: ne([String, null]),
|
|
652
|
+
default: null
|
|
653
|
+
},
|
|
654
|
+
route: {
|
|
655
|
+
type: ne([String, Object])
|
|
656
|
+
},
|
|
657
|
+
disabled: Boolean
|
|
658
|
+
}), gt = {
|
|
659
|
+
click: (e) => R(e.index) && Oe(e.indexPath)
|
|
660
|
+
}, de = "ElMenuItem", Mt = z({
|
|
661
|
+
name: de,
|
|
662
|
+
components: {
|
|
663
|
+
ElTooltip: _e
|
|
664
|
+
},
|
|
665
|
+
props: bt,
|
|
666
|
+
emits: gt,
|
|
667
|
+
setup(e, { emit: o }) {
|
|
668
|
+
const n = fe(), r = X("rootMenu"), t = w("menu"), I = w("menu-item");
|
|
669
|
+
r || te(de, "can not inject root menu");
|
|
670
|
+
const { parentMenu: m, indexPath: y } = Pe(n, je(e, "index")), u = X(`subMenu:${m.value.uid}`);
|
|
671
|
+
u || te(de, "can not inject sub menu");
|
|
672
|
+
const d = h(() => e.index === r.activeIndex), p = he({
|
|
673
|
+
index: e.index,
|
|
674
|
+
indexPath: y,
|
|
675
|
+
active: d
|
|
676
|
+
}), g = () => {
|
|
677
|
+
e.disabled || (r.handleMenuItemClick({
|
|
678
|
+
index: e.index,
|
|
679
|
+
indexPath: y.value,
|
|
680
|
+
route: e.route
|
|
681
|
+
}), o("click", p));
|
|
682
|
+
};
|
|
683
|
+
return be(() => {
|
|
684
|
+
u.addSubMenu(p), r.addMenuItem(p);
|
|
685
|
+
}), Se(() => {
|
|
686
|
+
u.removeSubMenu(p), r.removeMenuItem(p);
|
|
687
|
+
}), {
|
|
688
|
+
parentMenu: m,
|
|
689
|
+
rootMenu: r,
|
|
690
|
+
active: d,
|
|
691
|
+
nsMenu: t,
|
|
692
|
+
nsMenuItem: I,
|
|
693
|
+
handleClick: g
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
function yt(e, o, n, r, t, I) {
|
|
698
|
+
const m = qe("el-tooltip");
|
|
699
|
+
return B(), Y("li", {
|
|
700
|
+
class: ee([
|
|
701
|
+
e.nsMenuItem.b(),
|
|
702
|
+
e.nsMenuItem.is("active", e.active),
|
|
703
|
+
e.nsMenuItem.is("disabled", e.disabled)
|
|
704
|
+
]),
|
|
705
|
+
role: "menuitem",
|
|
706
|
+
tabindex: "-1",
|
|
707
|
+
onClick: e.handleClick
|
|
708
|
+
}, [
|
|
709
|
+
e.parentMenu.type.name === "ElMenu" && e.rootMenu.props.collapse && e.$slots.title ? (B(), ve(m, {
|
|
710
|
+
key: 0,
|
|
711
|
+
effect: e.rootMenu.props.popperEffect,
|
|
712
|
+
placement: "right",
|
|
713
|
+
"fallback-placements": ["left"],
|
|
714
|
+
persistent: ""
|
|
715
|
+
}, {
|
|
716
|
+
content: Q(() => [
|
|
717
|
+
$(e.$slots, "title")
|
|
718
|
+
]),
|
|
719
|
+
default: Q(() => [
|
|
720
|
+
pe("div", {
|
|
721
|
+
class: ee(e.nsMenu.be("tooltip", "trigger"))
|
|
722
|
+
}, [
|
|
723
|
+
$(e.$slots, "default")
|
|
724
|
+
], 2)
|
|
725
|
+
]),
|
|
726
|
+
_: 3
|
|
727
|
+
}, 8, ["effect"])) : (B(), Y(ge, { key: 1 }, [
|
|
728
|
+
$(e.$slots, "default"),
|
|
729
|
+
$(e.$slots, "title")
|
|
730
|
+
], 64))
|
|
731
|
+
], 10, ["onClick"]);
|
|
732
|
+
}
|
|
733
|
+
var Be = /* @__PURE__ */ oe(Mt, [["render", yt], ["__file", "menu-item.vue"]]);
|
|
734
|
+
const It = {
|
|
735
|
+
title: String
|
|
736
|
+
}, Ct = "ElMenuItemGroup", xt = z({
|
|
737
|
+
name: Ct,
|
|
738
|
+
props: It,
|
|
739
|
+
setup() {
|
|
740
|
+
return {
|
|
741
|
+
ns: w("menu-item-group")
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
function Et(e, o, n, r, t, I) {
|
|
746
|
+
return B(), Y("li", {
|
|
747
|
+
class: ee(e.ns.b())
|
|
748
|
+
}, [
|
|
749
|
+
pe("div", {
|
|
750
|
+
class: ee(e.ns.e("title"))
|
|
751
|
+
}, [
|
|
752
|
+
e.$slots.title ? $(e.$slots, "title", { key: 1 }) : (B(), Y(ge, { key: 0 }, [
|
|
753
|
+
Fe(Ve(e.title), 1)
|
|
754
|
+
], 64))
|
|
755
|
+
], 2),
|
|
756
|
+
pe("ul", null, [
|
|
757
|
+
$(e.$slots, "default")
|
|
758
|
+
])
|
|
759
|
+
], 2);
|
|
760
|
+
}
|
|
761
|
+
var ze = /* @__PURE__ */ oe(xt, [["render", Et], ["__file", "menu-item-group.vue"]]);
|
|
762
|
+
const Wt = $e(ht, {
|
|
763
|
+
MenuItem: Be,
|
|
764
|
+
MenuItemGroup: ze,
|
|
765
|
+
SubMenu: Ie
|
|
766
|
+
}), Rt = ye(Be);
|
|
767
|
+
ye(ze);
|
|
768
|
+
ye(Ie);
|
|
769
|
+
export {
|
|
770
|
+
Rt as E,
|
|
771
|
+
Wt as a
|
|
772
|
+
};
|