yc-project-template 1.0.0
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/README.md +48 -0
- package/dist/AppManage-yJ4SOsDj.js +77 -0
- package/dist/DeptTree-BJ-YyoZO.js +88 -0
- package/dist/DictionaryModal-jyoOTJD4.js +157 -0
- package/dist/DictionaryValueModal-D6wJ04-c.js +173 -0
- package/dist/Login-CorWfiLZ.js +169 -0
- package/dist/NotFound-B_crl8rg.js +21 -0
- package/dist/OrgModal-DgTQN71P.js +114 -0
- package/dist/PageTemplate-BXwP32sO.js +149 -0
- package/dist/RoleModal-QaUkdPyy.js +126 -0
- package/dist/UserModal-MQeOVpvt.js +200 -0
- package/dist/YcSearchForm-BWweEnqG.js +326 -0
- package/dist/YcTree-COox_XNx.js +124 -0
- package/dist/el-col-B8XtMrKy.js +135 -0
- package/dist/el-dropdown-item-zXcF1C0U.js +862 -0
- package/dist/el-form-item-DGYKf4A6.js +1178 -0
- package/dist/favicon.ico +0 -0
- package/dist/globalComponents-NGC1jMmM.js +112761 -0
- package/dist/index-CMXoxgLU.js +1062 -0
- package/dist/index-Cc-Qq-qP.js +17 -0
- package/dist/index-DBq96lnF.js +393 -0
- package/dist/index-zZ1bb-CY.js +278 -0
- package/dist/rsaCrypto-B9Iz2FB1.js +2084 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/useMenu-CCb03now.js +18 -0
- package/dist/yc-project-template.css +1 -0
- package/dist/yc-project-template.es.js +5 -0
- package/dist/yc-project-template.umd.js +746 -0
- package/package.json +123 -0
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
import { defineComponent as P, renderSlot as $, ref as E, provide as A, inject as k, onMounted as Ce, unref as T, onBeforeUnmount as _e, computed as C, toRef as U, readonly as Te, watch as $e, nextTick as ke, resolveComponent as h, createBlock as G, openBlock as R, withCtx as I, createVNode as F, normalizeProps as Se, guardReactiveProps as Oe, createElementBlock as V, normalizeClass as Y, createCommentVNode as X, createSlots as Fe, mergeProps as j, getCurrentInstance as ae, Fragment as Re, createElementVNode as Ne, withModifiers as x, resolveDynamicComponent as Be, normalizeStyle as Pe } from "vue";
|
|
2
|
+
import { H as M, D as J, G as _, a3 as W, aq as S, ar as Me, ae as Ke, as as H, at as De, au as Q, a4 as B, C as Ae, A as ue, av as Ge, ac as Le, ap as ze, d as de, I as ee, aw as He, a0 as Ue, T as Ve, R as Ye, Z as ce, ax as pe, ay as re, L as je, a2 as fe } from "./globalComponents-NGC1jMmM.js";
|
|
3
|
+
const Je = P({
|
|
4
|
+
inheritAttrs: !1
|
|
5
|
+
});
|
|
6
|
+
function We(e, o, i, n, a, u) {
|
|
7
|
+
return $(e.$slots, "default");
|
|
8
|
+
}
|
|
9
|
+
var qe = /* @__PURE__ */ M(Je, [["render", We], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);
|
|
10
|
+
const Ze = P({
|
|
11
|
+
name: "ElCollectionItem",
|
|
12
|
+
inheritAttrs: !1
|
|
13
|
+
});
|
|
14
|
+
function Qe(e, o, i, n, a, u) {
|
|
15
|
+
return $(e.$slots, "default");
|
|
16
|
+
}
|
|
17
|
+
var Xe = /* @__PURE__ */ M(Ze, [["render", Qe], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
|
|
18
|
+
const me = "data-el-collection-item", xe = (e) => {
|
|
19
|
+
const o = `El${e}Collection`, i = `${o}Item`, n = Symbol(o), a = Symbol(i), u = Object.assign({}, qe, {
|
|
20
|
+
name: o,
|
|
21
|
+
setup() {
|
|
22
|
+
const l = E(), c = /* @__PURE__ */ new Map();
|
|
23
|
+
A(n, {
|
|
24
|
+
itemMap: c,
|
|
25
|
+
getItems: () => {
|
|
26
|
+
const p = T(l);
|
|
27
|
+
if (!p)
|
|
28
|
+
return [];
|
|
29
|
+
const t = Array.from(
|
|
30
|
+
p.querySelectorAll(`[${me}]`)
|
|
31
|
+
);
|
|
32
|
+
return [...c.values()].sort(
|
|
33
|
+
(g, b) => t.indexOf(g.ref) - t.indexOf(b.ref)
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
collectionRef: l
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}), r = Object.assign({}, Xe, {
|
|
40
|
+
name: i,
|
|
41
|
+
setup(l, { attrs: c }) {
|
|
42
|
+
const v = E(), p = k(n, void 0);
|
|
43
|
+
A(a, {
|
|
44
|
+
collectionItemRef: v
|
|
45
|
+
}), Ce(() => {
|
|
46
|
+
const t = T(v);
|
|
47
|
+
t && p.itemMap.set(t, {
|
|
48
|
+
ref: t,
|
|
49
|
+
...c
|
|
50
|
+
});
|
|
51
|
+
}), _e(() => {
|
|
52
|
+
const t = T(v);
|
|
53
|
+
p.itemMap.delete(t);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
COLLECTION_INJECTION_KEY: n,
|
|
59
|
+
COLLECTION_ITEM_INJECTION_KEY: a,
|
|
60
|
+
ElCollection: u,
|
|
61
|
+
ElCollectionItem: r
|
|
62
|
+
};
|
|
63
|
+
}, eo = J({
|
|
64
|
+
style: { type: _([String, Array, Object]) },
|
|
65
|
+
currentTabId: {
|
|
66
|
+
type: _(String)
|
|
67
|
+
},
|
|
68
|
+
defaultCurrentTabId: String,
|
|
69
|
+
loop: Boolean,
|
|
70
|
+
dir: {
|
|
71
|
+
type: String,
|
|
72
|
+
values: ["ltr", "rtl"],
|
|
73
|
+
default: "ltr"
|
|
74
|
+
},
|
|
75
|
+
orientation: {
|
|
76
|
+
type: _(String)
|
|
77
|
+
},
|
|
78
|
+
onBlur: Function,
|
|
79
|
+
onFocus: Function,
|
|
80
|
+
onMousedown: Function
|
|
81
|
+
}), {
|
|
82
|
+
ElCollection: oo,
|
|
83
|
+
ElCollectionItem: no,
|
|
84
|
+
COLLECTION_INJECTION_KEY: ve,
|
|
85
|
+
COLLECTION_ITEM_INJECTION_KEY: to
|
|
86
|
+
} = xe("RovingFocusGroup"), oe = /* @__PURE__ */ Symbol("elRovingFocusGroup"), ge = /* @__PURE__ */ Symbol("elRovingFocusGroupItem"), ro = {
|
|
87
|
+
ArrowLeft: "prev",
|
|
88
|
+
ArrowUp: "prev",
|
|
89
|
+
ArrowRight: "next",
|
|
90
|
+
ArrowDown: "next",
|
|
91
|
+
PageUp: "first",
|
|
92
|
+
Home: "first",
|
|
93
|
+
PageDown: "last",
|
|
94
|
+
End: "last"
|
|
95
|
+
}, lo = (e, o) => e, so = (e, o, i) => {
|
|
96
|
+
const n = W(e), a = lo(n);
|
|
97
|
+
return ro[a];
|
|
98
|
+
}, io = (e, o) => e.map((i, n) => e[(n + o) % e.length]), le = (e) => {
|
|
99
|
+
const { activeElement: o } = document;
|
|
100
|
+
for (const i of e)
|
|
101
|
+
if (i === o || (i.focus(), o !== document.activeElement))
|
|
102
|
+
return;
|
|
103
|
+
}, se = "currentTabIdChange", ie = "rovingFocusGroup.entryFocus", ao = { bubbles: !1, cancelable: !0 }, uo = P({
|
|
104
|
+
name: "ElRovingFocusGroupImpl",
|
|
105
|
+
inheritAttrs: !1,
|
|
106
|
+
props: eo,
|
|
107
|
+
emits: [se, "entryFocus"],
|
|
108
|
+
setup(e, { emit: o }) {
|
|
109
|
+
var i;
|
|
110
|
+
const n = E(
|
|
111
|
+
(i = e.currentTabId || e.defaultCurrentTabId) != null ? i : null
|
|
112
|
+
), a = E(!1), u = E(!1), r = E(), { getItems: l } = k(
|
|
113
|
+
ve,
|
|
114
|
+
void 0
|
|
115
|
+
), c = C(() => [
|
|
116
|
+
{
|
|
117
|
+
outline: "none"
|
|
118
|
+
},
|
|
119
|
+
e.style
|
|
120
|
+
]), v = (d) => {
|
|
121
|
+
o(se, d);
|
|
122
|
+
}, p = () => {
|
|
123
|
+
a.value = !0;
|
|
124
|
+
}, t = S(
|
|
125
|
+
(d) => {
|
|
126
|
+
var w;
|
|
127
|
+
(w = e.onMousedown) == null || w.call(e, d);
|
|
128
|
+
},
|
|
129
|
+
() => {
|
|
130
|
+
u.value = !0;
|
|
131
|
+
}
|
|
132
|
+
), s = S(
|
|
133
|
+
(d) => {
|
|
134
|
+
var w;
|
|
135
|
+
(w = e.onFocus) == null || w.call(e, d);
|
|
136
|
+
},
|
|
137
|
+
(d) => {
|
|
138
|
+
const w = !T(u), { target: D, currentTarget: y } = d;
|
|
139
|
+
if (D === y && w && !T(a)) {
|
|
140
|
+
const f = new Event(ie, ao);
|
|
141
|
+
if (y?.dispatchEvent(f), !f.defaultPrevented) {
|
|
142
|
+
const O = l().filter((N) => N.focusable), L = O.find((N) => N.active), z = O.find(
|
|
143
|
+
(N) => N.id === T(n)
|
|
144
|
+
), Z = [L, z, ...O].filter(
|
|
145
|
+
Boolean
|
|
146
|
+
).map((N) => N.ref);
|
|
147
|
+
le(Z);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
u.value = !1;
|
|
151
|
+
}
|
|
152
|
+
), g = S(
|
|
153
|
+
(d) => {
|
|
154
|
+
var w;
|
|
155
|
+
(w = e.onBlur) == null || w.call(e, d);
|
|
156
|
+
},
|
|
157
|
+
() => {
|
|
158
|
+
a.value = !1;
|
|
159
|
+
}
|
|
160
|
+
), b = (...d) => {
|
|
161
|
+
o("entryFocus", ...d);
|
|
162
|
+
}, K = (d) => {
|
|
163
|
+
const w = so(d);
|
|
164
|
+
if (w) {
|
|
165
|
+
d.preventDefault();
|
|
166
|
+
let y = l().filter((f) => f.focusable).map((f) => f.ref);
|
|
167
|
+
switch (w) {
|
|
168
|
+
case "last": {
|
|
169
|
+
y.reverse();
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
case "prev":
|
|
173
|
+
case "next": {
|
|
174
|
+
w === "prev" && y.reverse();
|
|
175
|
+
const f = y.indexOf(d.currentTarget);
|
|
176
|
+
y = e.loop ? io(y, f + 1) : y.slice(f + 1);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
ke(() => {
|
|
181
|
+
le(y);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
A(oe, {
|
|
186
|
+
currentTabbedId: Te(n),
|
|
187
|
+
loop: U(e, "loop"),
|
|
188
|
+
tabIndex: C(() => T(a) ? -1 : 0),
|
|
189
|
+
rovingFocusGroupRef: r,
|
|
190
|
+
rovingFocusGroupRootStyle: c,
|
|
191
|
+
orientation: U(e, "orientation"),
|
|
192
|
+
dir: U(e, "dir"),
|
|
193
|
+
onItemFocus: v,
|
|
194
|
+
onItemShiftTab: p,
|
|
195
|
+
onBlur: g,
|
|
196
|
+
onFocus: s,
|
|
197
|
+
onMousedown: t,
|
|
198
|
+
onKeydown: K
|
|
199
|
+
}), $e(
|
|
200
|
+
() => e.currentTabId,
|
|
201
|
+
(d) => {
|
|
202
|
+
n.value = d ?? null;
|
|
203
|
+
}
|
|
204
|
+
), Me(r, ie, b);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
function co(e, o, i, n, a, u) {
|
|
208
|
+
return $(e.$slots, "default");
|
|
209
|
+
}
|
|
210
|
+
var po = /* @__PURE__ */ M(uo, [["render", co], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group-impl.vue"]]);
|
|
211
|
+
const fo = P({
|
|
212
|
+
name: "ElRovingFocusGroup",
|
|
213
|
+
components: {
|
|
214
|
+
ElFocusGroupCollection: oo,
|
|
215
|
+
ElRovingFocusGroupImpl: po
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
function mo(e, o, i, n, a, u) {
|
|
219
|
+
const r = h("el-roving-focus-group-impl"), l = h("el-focus-group-collection");
|
|
220
|
+
return R(), G(l, null, {
|
|
221
|
+
default: I(() => [
|
|
222
|
+
F(
|
|
223
|
+
r,
|
|
224
|
+
Se(Oe(e.$attrs)),
|
|
225
|
+
{
|
|
226
|
+
default: I(() => [
|
|
227
|
+
$(e.$slots, "default")
|
|
228
|
+
]),
|
|
229
|
+
_: 3
|
|
230
|
+
},
|
|
231
|
+
16
|
|
232
|
+
)
|
|
233
|
+
]),
|
|
234
|
+
_: 3
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
var vo = /* @__PURE__ */ M(fo, [["render", mo], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);
|
|
238
|
+
const go = J({
|
|
239
|
+
trigger: {
|
|
240
|
+
...Q.trigger,
|
|
241
|
+
type: _([
|
|
242
|
+
String,
|
|
243
|
+
Array
|
|
244
|
+
])
|
|
245
|
+
},
|
|
246
|
+
triggerKeys: {
|
|
247
|
+
type: _(Array),
|
|
248
|
+
default: () => [
|
|
249
|
+
B.enter,
|
|
250
|
+
B.numpadEnter,
|
|
251
|
+
B.space,
|
|
252
|
+
B.down
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
virtualTriggering: Q.virtualTriggering,
|
|
256
|
+
virtualRef: Q.virtualRef,
|
|
257
|
+
effect: {
|
|
258
|
+
...H.effect,
|
|
259
|
+
default: "light"
|
|
260
|
+
},
|
|
261
|
+
type: {
|
|
262
|
+
type: _(String)
|
|
263
|
+
},
|
|
264
|
+
placement: {
|
|
265
|
+
type: _(String),
|
|
266
|
+
default: "bottom"
|
|
267
|
+
},
|
|
268
|
+
popperOptions: {
|
|
269
|
+
type: _(Object),
|
|
270
|
+
default: () => ({})
|
|
271
|
+
},
|
|
272
|
+
id: String,
|
|
273
|
+
size: {
|
|
274
|
+
type: String,
|
|
275
|
+
default: ""
|
|
276
|
+
},
|
|
277
|
+
splitButton: Boolean,
|
|
278
|
+
hideOnClick: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
default: !0
|
|
281
|
+
},
|
|
282
|
+
loop: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
default: !0
|
|
285
|
+
},
|
|
286
|
+
showArrow: {
|
|
287
|
+
type: Boolean,
|
|
288
|
+
default: !0
|
|
289
|
+
},
|
|
290
|
+
showTimeout: {
|
|
291
|
+
type: Number,
|
|
292
|
+
default: 150
|
|
293
|
+
},
|
|
294
|
+
hideTimeout: {
|
|
295
|
+
type: Number,
|
|
296
|
+
default: 150
|
|
297
|
+
},
|
|
298
|
+
tabindex: {
|
|
299
|
+
type: _([Number, String]),
|
|
300
|
+
default: 0
|
|
301
|
+
},
|
|
302
|
+
maxHeight: {
|
|
303
|
+
type: _([Number, String]),
|
|
304
|
+
default: ""
|
|
305
|
+
},
|
|
306
|
+
popperClass: H.popperClass,
|
|
307
|
+
popperStyle: H.popperStyle,
|
|
308
|
+
disabled: Boolean,
|
|
309
|
+
role: {
|
|
310
|
+
type: String,
|
|
311
|
+
values: De,
|
|
312
|
+
default: "menu"
|
|
313
|
+
},
|
|
314
|
+
buttonProps: {
|
|
315
|
+
type: _(Object)
|
|
316
|
+
},
|
|
317
|
+
teleported: H.teleported,
|
|
318
|
+
appendTo: H.appendTo,
|
|
319
|
+
persistent: {
|
|
320
|
+
type: Boolean,
|
|
321
|
+
default: !0
|
|
322
|
+
}
|
|
323
|
+
}), we = J({
|
|
324
|
+
command: {
|
|
325
|
+
type: [Object, String, Number],
|
|
326
|
+
default: () => ({})
|
|
327
|
+
},
|
|
328
|
+
disabled: Boolean,
|
|
329
|
+
divided: Boolean,
|
|
330
|
+
textValue: String,
|
|
331
|
+
icon: {
|
|
332
|
+
type: Ke
|
|
333
|
+
}
|
|
334
|
+
}), wo = J({
|
|
335
|
+
onKeydown: { type: _(Function) }
|
|
336
|
+
}), q = /* @__PURE__ */ Symbol("elDropdown"), be = "elDropdown", { ButtonGroup: bo } = de, yo = P({
|
|
337
|
+
name: "ElDropdown",
|
|
338
|
+
components: {
|
|
339
|
+
ElButton: de,
|
|
340
|
+
ElButtonGroup: bo,
|
|
341
|
+
ElScrollbar: ze,
|
|
342
|
+
ElTooltip: Le,
|
|
343
|
+
ElRovingFocusGroup: vo,
|
|
344
|
+
ElOnlyChild: Ge,
|
|
345
|
+
ElIcon: ue,
|
|
346
|
+
ArrowDown: Ae
|
|
347
|
+
},
|
|
348
|
+
props: go,
|
|
349
|
+
emits: ["visible-change", "click", "command"],
|
|
350
|
+
setup(e, { emit: o }) {
|
|
351
|
+
const i = ae(), n = ee("dropdown"), { t: a } = He(), u = E(), r = E(), l = E(), c = E(), v = E(null), p = E(null), t = E(!1), s = C(() => ({
|
|
352
|
+
maxHeight: Ue(e.maxHeight)
|
|
353
|
+
})), g = C(() => [n.m(f.value)]), b = C(() => Ye(e.trigger)), K = ce().value, d = C(() => e.id || K);
|
|
354
|
+
function w() {
|
|
355
|
+
var m;
|
|
356
|
+
(m = l.value) == null || m.onClose(void 0, 0);
|
|
357
|
+
}
|
|
358
|
+
function D() {
|
|
359
|
+
var m;
|
|
360
|
+
(m = l.value) == null || m.onClose();
|
|
361
|
+
}
|
|
362
|
+
function y() {
|
|
363
|
+
var m;
|
|
364
|
+
(m = l.value) == null || m.onOpen();
|
|
365
|
+
}
|
|
366
|
+
const f = Ve();
|
|
367
|
+
function O(...m) {
|
|
368
|
+
o("command", ...m);
|
|
369
|
+
}
|
|
370
|
+
function L() {
|
|
371
|
+
}
|
|
372
|
+
function z() {
|
|
373
|
+
const m = T(c);
|
|
374
|
+
b.value.includes("hover") && m?.focus({
|
|
375
|
+
preventScroll: !0
|
|
376
|
+
}), p.value = null;
|
|
377
|
+
}
|
|
378
|
+
function ne(m) {
|
|
379
|
+
p.value = m;
|
|
380
|
+
}
|
|
381
|
+
function Z() {
|
|
382
|
+
o("visible-change", !0);
|
|
383
|
+
}
|
|
384
|
+
function N(m) {
|
|
385
|
+
var te;
|
|
386
|
+
t.value = m?.type === "keydown", (te = c.value) == null || te.focus();
|
|
387
|
+
}
|
|
388
|
+
function Ee() {
|
|
389
|
+
o("visible-change", !1);
|
|
390
|
+
}
|
|
391
|
+
return A(q, {
|
|
392
|
+
contentRef: c,
|
|
393
|
+
role: C(() => e.role),
|
|
394
|
+
triggerId: d,
|
|
395
|
+
isUsingKeyboard: t,
|
|
396
|
+
onItemEnter: L,
|
|
397
|
+
onItemLeave: z,
|
|
398
|
+
handleClose: D
|
|
399
|
+
}), A(be, {
|
|
400
|
+
instance: i,
|
|
401
|
+
dropdownSize: f,
|
|
402
|
+
handleClick: w,
|
|
403
|
+
commandHandler: O,
|
|
404
|
+
trigger: U(e, "trigger"),
|
|
405
|
+
hideOnClick: U(e, "hideOnClick")
|
|
406
|
+
}), {
|
|
407
|
+
t: a,
|
|
408
|
+
ns: n,
|
|
409
|
+
scrollbar: v,
|
|
410
|
+
wrapStyle: s,
|
|
411
|
+
dropdownTriggerKls: g,
|
|
412
|
+
dropdownSize: f,
|
|
413
|
+
triggerId: d,
|
|
414
|
+
currentTabId: p,
|
|
415
|
+
handleCurrentTabIdChange: ne,
|
|
416
|
+
handlerMainButtonClick: (m) => {
|
|
417
|
+
o("click", m);
|
|
418
|
+
},
|
|
419
|
+
handleClose: D,
|
|
420
|
+
handleOpen: y,
|
|
421
|
+
handleBeforeShowTooltip: Z,
|
|
422
|
+
handleShowTooltip: N,
|
|
423
|
+
handleBeforeHideTooltip: Ee,
|
|
424
|
+
popperRef: l,
|
|
425
|
+
contentRef: c,
|
|
426
|
+
triggeringElementRef: u,
|
|
427
|
+
referenceElementRef: r
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
function Io(e, o, i, n, a, u) {
|
|
432
|
+
var r;
|
|
433
|
+
const l = h("el-roving-focus-group"), c = h("el-scrollbar"), v = h("el-only-child"), p = h("el-tooltip"), t = h("el-button"), s = h("arrow-down"), g = h("el-icon"), b = h("el-button-group");
|
|
434
|
+
return R(), V(
|
|
435
|
+
"div",
|
|
436
|
+
{
|
|
437
|
+
class: Y([e.ns.b(), e.ns.is("disabled", e.disabled)])
|
|
438
|
+
},
|
|
439
|
+
[
|
|
440
|
+
F(p, {
|
|
441
|
+
ref: "popperRef",
|
|
442
|
+
role: e.role,
|
|
443
|
+
effect: e.effect,
|
|
444
|
+
"fallback-placements": ["bottom", "top"],
|
|
445
|
+
"popper-options": e.popperOptions,
|
|
446
|
+
"gpu-acceleration": !1,
|
|
447
|
+
placement: e.placement,
|
|
448
|
+
"popper-class": [e.ns.e("popper"), e.popperClass],
|
|
449
|
+
"popper-style": e.popperStyle,
|
|
450
|
+
trigger: e.trigger,
|
|
451
|
+
"trigger-keys": e.triggerKeys,
|
|
452
|
+
"trigger-target-el": e.contentRef,
|
|
453
|
+
"show-arrow": e.showArrow,
|
|
454
|
+
"show-after": e.trigger === "hover" ? e.showTimeout : 0,
|
|
455
|
+
"hide-after": e.trigger === "hover" ? e.hideTimeout : 0,
|
|
456
|
+
"virtual-ref": (r = e.virtualRef) != null ? r : e.triggeringElementRef,
|
|
457
|
+
"virtual-triggering": e.virtualTriggering || e.splitButton,
|
|
458
|
+
disabled: e.disabled,
|
|
459
|
+
transition: `${e.ns.namespace.value}-zoom-in-top`,
|
|
460
|
+
teleported: e.teleported,
|
|
461
|
+
"append-to": e.appendTo,
|
|
462
|
+
pure: "",
|
|
463
|
+
"focus-on-target": "",
|
|
464
|
+
persistent: e.persistent,
|
|
465
|
+
onBeforeShow: e.handleBeforeShowTooltip,
|
|
466
|
+
onShow: e.handleShowTooltip,
|
|
467
|
+
onBeforeHide: e.handleBeforeHideTooltip
|
|
468
|
+
}, Fe({
|
|
469
|
+
content: I(() => [
|
|
470
|
+
F(c, {
|
|
471
|
+
ref: "scrollbar",
|
|
472
|
+
"wrap-style": e.wrapStyle,
|
|
473
|
+
tag: "div",
|
|
474
|
+
"view-class": e.ns.e("list")
|
|
475
|
+
}, {
|
|
476
|
+
default: I(() => [
|
|
477
|
+
F(l, {
|
|
478
|
+
loop: e.loop,
|
|
479
|
+
"current-tab-id": e.currentTabId,
|
|
480
|
+
orientation: "horizontal",
|
|
481
|
+
onCurrentTabIdChange: e.handleCurrentTabIdChange
|
|
482
|
+
}, {
|
|
483
|
+
default: I(() => [
|
|
484
|
+
$(e.$slots, "dropdown")
|
|
485
|
+
]),
|
|
486
|
+
_: 3
|
|
487
|
+
}, 8, ["loop", "current-tab-id", "onCurrentTabIdChange"])
|
|
488
|
+
]),
|
|
489
|
+
_: 3
|
|
490
|
+
}, 8, ["wrap-style", "view-class"])
|
|
491
|
+
]),
|
|
492
|
+
_: 2
|
|
493
|
+
}, [
|
|
494
|
+
e.splitButton ? void 0 : {
|
|
495
|
+
name: "default",
|
|
496
|
+
fn: I(() => [
|
|
497
|
+
F(v, {
|
|
498
|
+
id: e.triggerId,
|
|
499
|
+
ref: "triggeringElementRef",
|
|
500
|
+
role: "button",
|
|
501
|
+
tabindex: e.tabindex
|
|
502
|
+
}, {
|
|
503
|
+
default: I(() => [
|
|
504
|
+
$(e.$slots, "default")
|
|
505
|
+
]),
|
|
506
|
+
_: 3
|
|
507
|
+
}, 8, ["id", "tabindex"])
|
|
508
|
+
]),
|
|
509
|
+
key: "0"
|
|
510
|
+
}
|
|
511
|
+
]), 1032, ["role", "effect", "popper-options", "placement", "popper-class", "popper-style", "trigger", "trigger-keys", "trigger-target-el", "show-arrow", "show-after", "hide-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "append-to", "persistent", "onBeforeShow", "onShow", "onBeforeHide"]),
|
|
512
|
+
e.splitButton ? (R(), G(b, { key: 0 }, {
|
|
513
|
+
default: I(() => [
|
|
514
|
+
F(t, j({ ref: "referenceElementRef" }, e.buttonProps, {
|
|
515
|
+
size: e.dropdownSize,
|
|
516
|
+
type: e.type,
|
|
517
|
+
disabled: e.disabled,
|
|
518
|
+
tabindex: e.tabindex,
|
|
519
|
+
onClick: e.handlerMainButtonClick
|
|
520
|
+
}), {
|
|
521
|
+
default: I(() => [
|
|
522
|
+
$(e.$slots, "default")
|
|
523
|
+
]),
|
|
524
|
+
_: 3
|
|
525
|
+
}, 16, ["size", "type", "disabled", "tabindex", "onClick"]),
|
|
526
|
+
F(t, j({
|
|
527
|
+
id: e.triggerId,
|
|
528
|
+
ref: "triggeringElementRef"
|
|
529
|
+
}, e.buttonProps, {
|
|
530
|
+
role: "button",
|
|
531
|
+
size: e.dropdownSize,
|
|
532
|
+
type: e.type,
|
|
533
|
+
class: e.ns.e("caret-button"),
|
|
534
|
+
disabled: e.disabled,
|
|
535
|
+
tabindex: e.tabindex,
|
|
536
|
+
"aria-label": e.t("el.dropdown.toggleDropdown")
|
|
537
|
+
}), {
|
|
538
|
+
default: I(() => [
|
|
539
|
+
F(g, {
|
|
540
|
+
class: Y(e.ns.e("icon"))
|
|
541
|
+
}, {
|
|
542
|
+
default: I(() => [
|
|
543
|
+
F(s)
|
|
544
|
+
]),
|
|
545
|
+
_: 1
|
|
546
|
+
}, 8, ["class"])
|
|
547
|
+
]),
|
|
548
|
+
_: 1
|
|
549
|
+
}, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])
|
|
550
|
+
]),
|
|
551
|
+
_: 3
|
|
552
|
+
})) : X("v-if", !0)
|
|
553
|
+
],
|
|
554
|
+
2
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
var ho = /* @__PURE__ */ M(yo, [["render", Io], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown.vue"]]);
|
|
558
|
+
const Eo = P({
|
|
559
|
+
components: {
|
|
560
|
+
ElRovingFocusCollectionItem: no
|
|
561
|
+
},
|
|
562
|
+
props: {
|
|
563
|
+
focusable: {
|
|
564
|
+
type: Boolean,
|
|
565
|
+
default: !0
|
|
566
|
+
},
|
|
567
|
+
active: Boolean
|
|
568
|
+
},
|
|
569
|
+
emits: ["mousedown", "focus", "keydown"],
|
|
570
|
+
setup(e, { emit: o }) {
|
|
571
|
+
const { currentTabbedId: i, onItemFocus: n, onItemShiftTab: a, onKeydown: u } = k(
|
|
572
|
+
oe,
|
|
573
|
+
void 0
|
|
574
|
+
), r = ce(), l = E(), c = S(
|
|
575
|
+
(s) => {
|
|
576
|
+
o("mousedown", s);
|
|
577
|
+
},
|
|
578
|
+
(s) => {
|
|
579
|
+
e.focusable ? n(T(r)) : s.preventDefault();
|
|
580
|
+
}
|
|
581
|
+
), v = S(
|
|
582
|
+
(s) => {
|
|
583
|
+
o("focus", s);
|
|
584
|
+
},
|
|
585
|
+
() => {
|
|
586
|
+
n(T(r));
|
|
587
|
+
}
|
|
588
|
+
), p = S(
|
|
589
|
+
(s) => {
|
|
590
|
+
o("keydown", s);
|
|
591
|
+
},
|
|
592
|
+
(s) => {
|
|
593
|
+
const { shiftKey: g, target: b, currentTarget: K } = s;
|
|
594
|
+
if (W(s) === B.tab && g) {
|
|
595
|
+
a();
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
b === K && u(s);
|
|
599
|
+
}
|
|
600
|
+
), t = C(() => i.value === T(r));
|
|
601
|
+
return A(ge, {
|
|
602
|
+
rovingFocusGroupItemRef: l,
|
|
603
|
+
tabIndex: C(() => T(t) ? 0 : -1),
|
|
604
|
+
handleMousedown: c,
|
|
605
|
+
handleFocus: v,
|
|
606
|
+
handleKeydown: p
|
|
607
|
+
}), {
|
|
608
|
+
id: r,
|
|
609
|
+
handleKeydown: p,
|
|
610
|
+
handleFocus: v,
|
|
611
|
+
handleMousedown: c
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
function Co(e, o, i, n, a, u) {
|
|
616
|
+
const r = h("el-roving-focus-collection-item");
|
|
617
|
+
return R(), G(r, {
|
|
618
|
+
id: e.id,
|
|
619
|
+
focusable: e.focusable,
|
|
620
|
+
active: e.active
|
|
621
|
+
}, {
|
|
622
|
+
default: I(() => [
|
|
623
|
+
$(e.$slots, "default")
|
|
624
|
+
]),
|
|
625
|
+
_: 3
|
|
626
|
+
}, 8, ["id", "focusable", "active"]);
|
|
627
|
+
}
|
|
628
|
+
var _o = /* @__PURE__ */ M(Eo, [["render", Co], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-item.vue"]]);
|
|
629
|
+
const To = P({
|
|
630
|
+
name: "DropdownItemImpl",
|
|
631
|
+
components: {
|
|
632
|
+
ElIcon: ue
|
|
633
|
+
},
|
|
634
|
+
props: we,
|
|
635
|
+
emits: ["pointermove", "pointerleave", "click", "clickimpl"],
|
|
636
|
+
setup(e, { emit: o }) {
|
|
637
|
+
const i = ee("dropdown"), { role: n } = k(q, void 0), { collectionItemRef: a } = k(
|
|
638
|
+
to,
|
|
639
|
+
void 0
|
|
640
|
+
), {
|
|
641
|
+
rovingFocusGroupItemRef: u,
|
|
642
|
+
tabIndex: r,
|
|
643
|
+
handleFocus: l,
|
|
644
|
+
handleKeydown: c,
|
|
645
|
+
handleMousedown: v
|
|
646
|
+
} = k(ge, void 0), p = pe(
|
|
647
|
+
a,
|
|
648
|
+
u
|
|
649
|
+
), t = C(() => n.value === "menu" ? "menuitem" : n.value === "navigation" ? "link" : "button"), s = S((g) => {
|
|
650
|
+
const b = W(g);
|
|
651
|
+
if ([B.enter, B.numpadEnter, B.space].includes(
|
|
652
|
+
b
|
|
653
|
+
))
|
|
654
|
+
return g.preventDefault(), g.stopImmediatePropagation(), o("clickimpl", g), !0;
|
|
655
|
+
}, c);
|
|
656
|
+
return {
|
|
657
|
+
ns: i,
|
|
658
|
+
itemRef: p,
|
|
659
|
+
dataset: {
|
|
660
|
+
[me]: ""
|
|
661
|
+
},
|
|
662
|
+
role: t,
|
|
663
|
+
tabIndex: r,
|
|
664
|
+
handleFocus: l,
|
|
665
|
+
handleKeydown: s,
|
|
666
|
+
handleMousedown: v
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
}), $o = ["aria-disabled", "tabindex", "role"];
|
|
670
|
+
function ko(e, o, i, n, a, u) {
|
|
671
|
+
const r = h("el-icon");
|
|
672
|
+
return R(), V(
|
|
673
|
+
Re,
|
|
674
|
+
null,
|
|
675
|
+
[
|
|
676
|
+
e.divided ? (R(), V(
|
|
677
|
+
"li",
|
|
678
|
+
{
|
|
679
|
+
key: 0,
|
|
680
|
+
role: "separator",
|
|
681
|
+
class: Y(e.ns.bem("menu", "item", "divided"))
|
|
682
|
+
},
|
|
683
|
+
null,
|
|
684
|
+
2
|
|
685
|
+
)) : X("v-if", !0),
|
|
686
|
+
Ne("li", j({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, {
|
|
687
|
+
"aria-disabled": e.disabled,
|
|
688
|
+
class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
|
|
689
|
+
tabindex: e.tabIndex,
|
|
690
|
+
role: e.role,
|
|
691
|
+
onClick: o[0] || (o[0] = (l) => e.$emit("clickimpl", l)),
|
|
692
|
+
onFocus: o[1] || (o[1] = (...l) => e.handleFocus && e.handleFocus(...l)),
|
|
693
|
+
onKeydown: o[2] || (o[2] = x((...l) => e.handleKeydown && e.handleKeydown(...l), ["self"])),
|
|
694
|
+
onMousedown: o[3] || (o[3] = (...l) => e.handleMousedown && e.handleMousedown(...l)),
|
|
695
|
+
onPointermove: o[4] || (o[4] = (l) => e.$emit("pointermove", l)),
|
|
696
|
+
onPointerleave: o[5] || (o[5] = (l) => e.$emit("pointerleave", l))
|
|
697
|
+
}), [
|
|
698
|
+
e.icon ? (R(), G(r, { key: 0 }, {
|
|
699
|
+
default: I(() => [
|
|
700
|
+
(R(), G(Be(e.icon)))
|
|
701
|
+
]),
|
|
702
|
+
_: 1
|
|
703
|
+
})) : X("v-if", !0),
|
|
704
|
+
$(e.$slots, "default")
|
|
705
|
+
], 16, $o)
|
|
706
|
+
],
|
|
707
|
+
64
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
var So = /* @__PURE__ */ M(To, [["render", ko], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]]);
|
|
711
|
+
const ye = () => {
|
|
712
|
+
const e = k(
|
|
713
|
+
be,
|
|
714
|
+
{}
|
|
715
|
+
), o = C(() => e?.dropdownSize);
|
|
716
|
+
return {
|
|
717
|
+
elDropdown: e,
|
|
718
|
+
_elDropdownSize: o
|
|
719
|
+
};
|
|
720
|
+
}, Oo = P({
|
|
721
|
+
name: "ElDropdownItem",
|
|
722
|
+
components: {
|
|
723
|
+
ElRovingFocusItem: _o,
|
|
724
|
+
ElDropdownItemImpl: So
|
|
725
|
+
},
|
|
726
|
+
inheritAttrs: !1,
|
|
727
|
+
props: we,
|
|
728
|
+
emits: ["pointermove", "pointerleave", "click"],
|
|
729
|
+
setup(e, { emit: o, attrs: i }) {
|
|
730
|
+
const { elDropdown: n } = ye(), a = ae(), { onItemEnter: u, onItemLeave: r } = k(
|
|
731
|
+
q,
|
|
732
|
+
void 0
|
|
733
|
+
), l = S(
|
|
734
|
+
(t) => (o("pointermove", t), t.defaultPrevented),
|
|
735
|
+
re((t) => {
|
|
736
|
+
if (e.disabled) {
|
|
737
|
+
r(t);
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
const s = t.currentTarget;
|
|
741
|
+
s === document.activeElement || s.contains(document.activeElement) || (u(t), t.defaultPrevented || s?.focus({
|
|
742
|
+
preventScroll: !0
|
|
743
|
+
}));
|
|
744
|
+
})
|
|
745
|
+
), c = S((t) => (o("pointerleave", t), t.defaultPrevented), re(r)), v = S(
|
|
746
|
+
(t) => {
|
|
747
|
+
if (!e.disabled)
|
|
748
|
+
return o("click", t), t.type !== "keydown" && t.defaultPrevented;
|
|
749
|
+
},
|
|
750
|
+
(t) => {
|
|
751
|
+
var s, g, b;
|
|
752
|
+
if (e.disabled) {
|
|
753
|
+
t.stopImmediatePropagation();
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
(s = n?.hideOnClick) != null && s.value && ((g = n.handleClick) == null || g.call(n)), (b = n.commandHandler) == null || b.call(n, e.command, a, t);
|
|
757
|
+
}
|
|
758
|
+
), p = C(() => ({ ...e, ...i }));
|
|
759
|
+
return {
|
|
760
|
+
handleClick: v,
|
|
761
|
+
handlePointerMove: l,
|
|
762
|
+
handlePointerLeave: c,
|
|
763
|
+
propsAndAttrs: p
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
function Fo(e, o, i, n, a, u) {
|
|
768
|
+
const r = h("el-dropdown-item-impl"), l = h("el-roving-focus-item");
|
|
769
|
+
return R(), G(l, {
|
|
770
|
+
focusable: !e.disabled
|
|
771
|
+
}, {
|
|
772
|
+
default: I(() => [
|
|
773
|
+
F(r, j(e.propsAndAttrs, {
|
|
774
|
+
onPointerleave: e.handlePointerLeave,
|
|
775
|
+
onPointermove: e.handlePointerMove,
|
|
776
|
+
onClickimpl: e.handleClick
|
|
777
|
+
}), {
|
|
778
|
+
default: I(() => [
|
|
779
|
+
$(e.$slots, "default")
|
|
780
|
+
]),
|
|
781
|
+
_: 3
|
|
782
|
+
}, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
|
|
783
|
+
]),
|
|
784
|
+
_: 3
|
|
785
|
+
}, 8, ["focusable"]);
|
|
786
|
+
}
|
|
787
|
+
var Ie = /* @__PURE__ */ M(Oo, [["render", Fo], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item.vue"]]);
|
|
788
|
+
const Ro = P({
|
|
789
|
+
name: "ElDropdownMenu",
|
|
790
|
+
props: wo,
|
|
791
|
+
setup(e) {
|
|
792
|
+
const o = ee("dropdown"), { _elDropdownSize: i } = ye(), n = i.value, { contentRef: a, role: u, triggerId: r, isUsingKeyboard: l, handleClose: c } = k(q, void 0), {
|
|
793
|
+
rovingFocusGroupRef: v,
|
|
794
|
+
rovingFocusGroupRootStyle: p,
|
|
795
|
+
onBlur: t,
|
|
796
|
+
onFocus: s,
|
|
797
|
+
onKeydown: g,
|
|
798
|
+
onMousedown: b
|
|
799
|
+
} = k(oe, void 0), { collectionRef: K } = k(
|
|
800
|
+
ve,
|
|
801
|
+
void 0
|
|
802
|
+
), d = C(() => [o.b("menu"), o.bm("menu", n?.value)]), w = pe(
|
|
803
|
+
a,
|
|
804
|
+
v,
|
|
805
|
+
K
|
|
806
|
+
), D = S(
|
|
807
|
+
(f) => {
|
|
808
|
+
var O;
|
|
809
|
+
(O = e.onKeydown) == null || O.call(e, f);
|
|
810
|
+
},
|
|
811
|
+
(f) => {
|
|
812
|
+
const { currentTarget: O, target: L } = f, z = W(f);
|
|
813
|
+
if (O.contains(
|
|
814
|
+
L
|
|
815
|
+
), B.tab === z)
|
|
816
|
+
return c();
|
|
817
|
+
g(f);
|
|
818
|
+
}
|
|
819
|
+
);
|
|
820
|
+
function y(f) {
|
|
821
|
+
l.value && s(f);
|
|
822
|
+
}
|
|
823
|
+
return {
|
|
824
|
+
size: n,
|
|
825
|
+
rovingFocusGroupRootStyle: p,
|
|
826
|
+
dropdownKls: d,
|
|
827
|
+
role: u,
|
|
828
|
+
triggerId: r,
|
|
829
|
+
dropdownListWrapperRef: w,
|
|
830
|
+
handleKeydown: D,
|
|
831
|
+
onBlur: t,
|
|
832
|
+
handleFocus: y,
|
|
833
|
+
onMousedown: b
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
}), No = ["role", "aria-labelledby"];
|
|
837
|
+
function Bo(e, o, i, n, a, u) {
|
|
838
|
+
return R(), V("ul", {
|
|
839
|
+
ref: e.dropdownListWrapperRef,
|
|
840
|
+
class: Y(e.dropdownKls),
|
|
841
|
+
style: Pe(e.rovingFocusGroupRootStyle),
|
|
842
|
+
tabindex: -1,
|
|
843
|
+
role: e.role,
|
|
844
|
+
"aria-labelledby": e.triggerId,
|
|
845
|
+
onFocusin: o[0] || (o[0] = (...r) => e.handleFocus && e.handleFocus(...r)),
|
|
846
|
+
onFocusout: o[1] || (o[1] = (...r) => e.onBlur && e.onBlur(...r)),
|
|
847
|
+
onKeydown: o[2] || (o[2] = x((...r) => e.handleKeydown && e.handleKeydown(...r), ["self"])),
|
|
848
|
+
onMousedown: o[3] || (o[3] = x((...r) => e.onMousedown && e.onMousedown(...r), ["self"]))
|
|
849
|
+
}, [
|
|
850
|
+
$(e.$slots, "default")
|
|
851
|
+
], 46, No);
|
|
852
|
+
}
|
|
853
|
+
var he = /* @__PURE__ */ M(Ro, [["render", Bo], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]);
|
|
854
|
+
const Do = je(ho, {
|
|
855
|
+
DropdownItem: Ie,
|
|
856
|
+
DropdownMenu: he
|
|
857
|
+
}), Ao = fe(Ie), Go = fe(he);
|
|
858
|
+
export {
|
|
859
|
+
Do as E,
|
|
860
|
+
Go as a,
|
|
861
|
+
Ao as b
|
|
862
|
+
};
|