st-comp 0.0.178 → 0.0.180

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.
Files changed (185) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +3 -3
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +29 -33
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +14 -18
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +25 -30
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +457 -419
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +13 -16
  13. package/es/KlinePlus.cjs +3 -3
  14. package/es/KlinePlus.js +140 -142
  15. package/es/Pagination.cjs +1 -1
  16. package/es/Pagination.js +274 -276
  17. package/es/PasswordPrompt.cjs +1 -1
  18. package/es/PasswordPrompt.js +3 -3
  19. package/es/Table.cjs +1 -1
  20. package/es/Table.js +21 -23
  21. package/es/User.cjs +1 -1
  22. package/es/User.js +472 -482
  23. package/es/VarSelectDialog.cjs +3 -3
  24. package/es/VarSelectDialog.js +440 -2878
  25. package/es/VarietySearch.cjs +12 -12
  26. package/es/VarietySearch.js +1199 -1176
  27. package/es/VirtualTable.cjs +1 -13
  28. package/es/VirtualTable.js +1547 -1567
  29. package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
  30. package/es/_initCloneObject-e2f0deb9.cjs +1 -0
  31. package/es/base-62a70f61.js +288 -0
  32. package/es/base-ef747d02.cjs +5 -0
  33. package/es/config-provider-178bb43c.cjs +1 -0
  34. package/es/config-provider-2e733cae.js +58 -0
  35. package/es/dayjs.min-2c20abe6.cjs +1 -0
  36. package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
  37. package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
  38. package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
  39. package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
  40. package/es/dropdown-f2fec683.cjs +1 -0
  41. package/es/el-button-5b08c08a.js +272 -0
  42. package/es/el-button-fc46a173.cjs +1 -0
  43. package/es/el-dialog-0b7166c9.cjs +1 -0
  44. package/es/el-dialog-d8d0da7a.js +276 -0
  45. package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
  46. package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
  47. package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
  48. package/es/el-empty-bb2b0235.cjs +1 -0
  49. package/es/el-form-item-caffd133.cjs +12 -0
  50. package/es/el-form-item-ff9c7d98.js +1267 -0
  51. package/es/el-input-6db30c8c.js +531 -0
  52. package/es/el-input-9c912678.cjs +1 -0
  53. package/es/el-input-number-05f150e5.js +311 -0
  54. package/es/el-input-number-6fe73563.cjs +1 -0
  55. package/es/el-loading-8514feaa.cjs +1 -0
  56. package/es/el-loading-93842445.js +203 -0
  57. package/es/el-menu-item-7a57c1be.cjs +1 -0
  58. package/es/el-menu-item-a886fbdd.js +768 -0
  59. package/es/el-message-8aa674f2.js +406 -0
  60. package/es/el-message-aad5b42b.cjs +1 -0
  61. package/es/el-message-box-2b6b2b68.js +550 -0
  62. package/es/el-message-box-53f355d7.cjs +1 -0
  63. package/es/el-overlay-540b2a02.js +324 -0
  64. package/es/el-overlay-96630a2e.cjs +1 -0
  65. package/es/el-popconfirm-2afdf6fb.cjs +1 -0
  66. package/es/el-popconfirm-c18d8035.js +162 -0
  67. package/es/el-popper-544fd77e.js +2412 -0
  68. package/es/el-popper-73466d7a.cjs +1 -0
  69. package/es/el-scrollbar-691cfc11.cjs +1 -0
  70. package/es/el-scrollbar-fae984e3.js +763 -0
  71. package/es/el-segmented-a7493831.js +142 -0
  72. package/es/el-segmented-b6bd3c0e.cjs +1 -0
  73. package/es/el-select-5959e837.cjs +1 -0
  74. package/es/el-select-ea8feecf.js +1251 -0
  75. package/es/el-table-column-9ef52443.js +3878 -0
  76. package/es/el-table-column-b824ac5c.cjs +14 -0
  77. package/es/el-tag-2fc9b9eb.js +116 -0
  78. package/es/el-tag-ecad6d02.cjs +1 -0
  79. package/es/index-2e331d74.js +10 -0
  80. package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
  81. package/es/index-3a74eae4.cjs +1 -0
  82. package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
  83. package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
  84. package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
  85. package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
  86. package/es/index-a9095b4a.js +163 -0
  87. package/es/index-a93dd9c4.cjs +1 -0
  88. package/es/index-ebd2fd7e.cjs +1 -0
  89. package/es/index-f1c702f6.cjs +1 -0
  90. package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
  91. package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
  92. package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
  93. package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
  94. package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
  95. package/es/style.css +1 -1
  96. package/es/use-global-config-03735617.cjs +1 -0
  97. package/es/use-global-config-4b185eb5.js +71 -0
  98. package/es/validator-0e688e4e.cjs +1 -0
  99. package/es/validator-d12a8f8c.js +5 -0
  100. package/es/vnode-4db20540.cjs +1 -0
  101. package/es/vnode-a0795a4b.js +70 -0
  102. package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
  103. package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
  104. package/lib/bundle.js +1 -1
  105. package/lib/bundle.umd.cjs +226 -245
  106. package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
  107. package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
  108. package/lib/style.css +1 -1
  109. package/package.json +2 -2
  110. package/packages/KlinePlus/index.vue +2 -1
  111. package/packages/VarSelectDialog/index.vue +43 -67
  112. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
  113. package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
  114. package/packages/index.ts +0 -2
  115. package/src/pages/VarSelectDialog/index.vue +1 -1
  116. package/src/router/routes.ts +0 -5
  117. package/es/Dialog.cjs +0 -1
  118. package/es/Dialog.js +0 -95
  119. package/es/_commonjsHelpers-10dfc225.js +0 -8
  120. package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
  121. package/es/_initCloneObject-9ccbb113.cjs +0 -1
  122. package/es/base-bdc10baa.cjs +0 -5
  123. package/es/base-d9284bf0.js +0 -304
  124. package/es/castArray-37eb9980.cjs +0 -1
  125. package/es/castArray-b0ab0165.js +0 -10
  126. package/es/config-provider-ec6b09df.cjs +0 -1
  127. package/es/config-provider-f0151e9f.js +0 -47
  128. package/es/dayjs.min-19fb125f.cjs +0 -1
  129. package/es/dropdown-b2dab5bb.cjs +0 -1
  130. package/es/el-button-34665425.js +0 -237
  131. package/es/el-button-960edd49.cjs +0 -1
  132. package/es/el-dialog-a412484e.js +0 -267
  133. package/es/el-dialog-cd484c1f.cjs +0 -1
  134. package/es/el-empty-627ec09e.cjs +0 -1
  135. package/es/el-form-item-668ba024.js +0 -1263
  136. package/es/el-form-item-e1c3104b.cjs +0 -12
  137. package/es/el-input-22e66e37.js +0 -523
  138. package/es/el-input-5163bda3.cjs +0 -1
  139. package/es/el-input-number-481e21c5.js +0 -284
  140. package/es/el-input-number-eb54cde4.cjs +0 -1
  141. package/es/el-loading-15a5501c.cjs +0 -1
  142. package/es/el-loading-d4e403ab.js +0 -187
  143. package/es/el-menu-item-404c10e5.js +0 -772
  144. package/es/el-menu-item-ac89e804.cjs +0 -1
  145. package/es/el-message-ad87b9dd.cjs +0 -1
  146. package/es/el-message-box-41f39f6d.js +0 -558
  147. package/es/el-message-box-6694f827.cjs +0 -1
  148. package/es/el-message-ef506caa.js +0 -375
  149. package/es/el-overlay-4a9fa4e1.js +0 -269
  150. package/es/el-overlay-e5d318c3.cjs +0 -1
  151. package/es/el-popconfirm-7b9183aa.js +0 -140
  152. package/es/el-popconfirm-a497b279.cjs +0 -1
  153. package/es/el-popper-14a9d493.cjs +0 -1
  154. package/es/el-popper-e73466eb.js +0 -2263
  155. package/es/el-scrollbar-45318df0.js +0 -201
  156. package/es/el-scrollbar-8bf765f2.cjs +0 -1
  157. package/es/el-segmented-3ba6d664.cjs +0 -1
  158. package/es/el-segmented-41820018.js +0 -135
  159. package/es/el-select-1d2309a1.cjs +0 -1
  160. package/es/el-select-d7a00294.js +0 -1130
  161. package/es/el-table-column-a2d0c635.js +0 -3805
  162. package/es/el-table-column-be9a76bb.cjs +0 -14
  163. package/es/el-tag-7f391090.js +0 -280
  164. package/es/el-tag-8d49d4d2.cjs +0 -1
  165. package/es/index-02ca0096.cjs +0 -5
  166. package/es/index-3120be08.js +0 -14
  167. package/es/index-5b81f4da.cjs +0 -1
  168. package/es/index-85a32a00.js +0 -59
  169. package/es/index-8d3c5e96.cjs +0 -3
  170. package/es/index-94f38460.js +0 -306
  171. package/es/index-a99a5307.cjs +0 -1
  172. package/es/index-b90c746b.cjs +0 -1
  173. package/es/index-d94bae37.cjs +0 -1
  174. package/es/index-d99fdc6d.js +0 -159
  175. package/es/use-form-common-props-592797e2.cjs +0 -2
  176. package/es/use-form-common-props-cc347a83.js +0 -171
  177. package/es/use-global-config-584b62f1.cjs +0 -1
  178. package/es/use-global-config-c7f0a7e3.js +0 -73
  179. package/es/validator-10fa54fe.js +0 -5
  180. package/es/validator-af488a9a.cjs +0 -1
  181. package/es/vnode-1b827c99.cjs +0 -1
  182. package/es/vnode-6be33bb1.js +0 -14
  183. package/packages/Dialog/index.ts +0 -8
  184. package/packages/Dialog/index.vue +0 -54
  185. package/src/pages/Dialog/index.vue +0 -16
@@ -0,0 +1,311 @@
1
+ import { defineComponent as te, ref as pe, reactive as fe, computed as h, watch as W, onMounted as be, onUpdated as ve, openBlock as v, createElementBlock as $, normalizeClass as z, unref as a, withModifiers as Ne, withDirectives as X, withKeys as Y, renderSlot as A, createVNode as K, withCtx as P, createBlock as F, createCommentVNode as j, createSlots as Ee } from "vue";
2
+ import { E as Ve } from "./el-input-6db30c8c.js";
3
+ import { E as q, a as he, k as ye, n as Ie, p as ge } from "./index-74fb90c7.js";
4
+ import { x as J, b as we, p as b, e as Q, g as y, u as _e, i as T, _ as Se, c as Ae, w as Pe } from "./base-62a70f61.js";
5
+ import { h as Fe, d as Te, e as ke, g as De } from "./el-scrollbar-fae984e3.js";
6
+ import { u as Ce, C as re, I as k, U as N, b as Me, d as Z, a as ee } from "./el-popper-544fd77e.js";
7
+ import { u as Be } from "./index-34592e82.js";
8
+ const xe = 100, Le = 600, ne = {
9
+ beforeMount(u, E) {
10
+ const s = E.value, { interval: r = xe, delay: I = Le } = J(s) ? {} : s;
11
+ let d, m;
12
+ const l = () => J(s) ? s() : s.handler(), p = () => {
13
+ m && (clearTimeout(m), m = void 0), d && (clearInterval(d), d = void 0);
14
+ };
15
+ u.addEventListener("mousedown", (g) => {
16
+ g.button === 0 && (p(), l(), document.addEventListener("mouseup", () => p(), {
17
+ once: !0
18
+ }), m = setTimeout(() => {
19
+ d = setInterval(() => {
20
+ l();
21
+ }, r);
22
+ }, I));
23
+ });
24
+ }
25
+ }, Re = we({
26
+ id: {
27
+ type: String,
28
+ default: void 0
29
+ },
30
+ step: {
31
+ type: Number,
32
+ default: 1
33
+ },
34
+ stepStrictly: Boolean,
35
+ max: {
36
+ type: Number,
37
+ default: Number.MAX_SAFE_INTEGER
38
+ },
39
+ min: {
40
+ type: Number,
41
+ default: Number.MIN_SAFE_INTEGER
42
+ },
43
+ modelValue: {
44
+ type: [Number, null]
45
+ },
46
+ readonly: Boolean,
47
+ disabled: Boolean,
48
+ size: Fe,
49
+ controls: {
50
+ type: Boolean,
51
+ default: !0
52
+ },
53
+ controlsPosition: {
54
+ type: String,
55
+ default: "",
56
+ values: ["", "right"]
57
+ },
58
+ valueOnClear: {
59
+ type: [String, Number, null],
60
+ validator: (u) => u === null || b(u) || ["min", "max"].includes(u),
61
+ default: null
62
+ },
63
+ name: String,
64
+ placeholder: String,
65
+ precision: {
66
+ type: Number,
67
+ validator: (u) => u >= 0 && u === Number.parseInt(`${u}`, 10)
68
+ },
69
+ validateEvent: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
73
+ ...Ce(["ariaLabel"]),
74
+ inputmode: {
75
+ type: Q(String),
76
+ default: void 0
77
+ },
78
+ align: {
79
+ type: Q(String),
80
+ default: "center"
81
+ },
82
+ disabledScientific: Boolean
83
+ }), $e = {
84
+ [re]: (u, E) => E !== u,
85
+ blur: (u) => u instanceof FocusEvent,
86
+ focus: (u) => u instanceof FocusEvent,
87
+ [k]: (u) => b(u) || y(u),
88
+ [N]: (u) => b(u) || y(u)
89
+ }, ze = te({
90
+ name: "ElInputNumber"
91
+ }), Ke = /* @__PURE__ */ te({
92
+ ...ze,
93
+ props: Re,
94
+ emits: $e,
95
+ setup(u, { expose: E, emit: s }) {
96
+ const r = u, { t: I } = Be(), d = _e("input-number"), m = pe(), l = fe({
97
+ currentValue: r.modelValue,
98
+ userInput: null
99
+ }), { formItem: p } = Te(), g = h(() => b(r.modelValue) && r.modelValue <= r.min), O = h(() => b(r.modelValue) && r.modelValue >= r.max), ae = h(() => {
100
+ const e = U(r.step);
101
+ return T(r.precision) ? Math.max(U(r.modelValue), e) : (e > r.precision, r.precision);
102
+ }), D = h(() => r.controls && r.controlsPosition === "right"), G = ke(), V = De(), C = h(() => {
103
+ if (l.userInput !== null)
104
+ return l.userInput;
105
+ let e = l.currentValue;
106
+ if (y(e))
107
+ return "";
108
+ if (b(e)) {
109
+ if (Number.isNaN(e))
110
+ return "";
111
+ T(r.precision) || (e = e.toFixed(r.precision));
112
+ }
113
+ return e;
114
+ }), M = (e, n) => {
115
+ if (T(n) && (n = ae.value), n === 0)
116
+ return Math.round(e);
117
+ let t = String(e);
118
+ const i = t.indexOf(".");
119
+ if (i === -1 || !t.replace(".", "").split("")[i + n])
120
+ return e;
121
+ const _ = t.length;
122
+ return t.charAt(_ - 1) === "5" && (t = `${t.slice(0, Math.max(0, _ - 1))}6`), Number.parseFloat(Number(t).toFixed(n));
123
+ }, U = (e) => {
124
+ if (y(e))
125
+ return 0;
126
+ const n = e.toString(), t = n.indexOf(".");
127
+ let i = 0;
128
+ return t !== -1 && (i = n.length - t - 1), i;
129
+ }, H = (e, n = 1) => b(e) ? e >= Number.MAX_SAFE_INTEGER && n === 1 || e <= Number.MIN_SAFE_INTEGER && n === -1 ? e : M(e + r.step * n) : l.currentValue, le = (e) => {
130
+ var n;
131
+ const t = e;
132
+ if (r.disabledScientific && ["e", "E"].includes(t.key)) {
133
+ t.preventDefault();
134
+ return;
135
+ }
136
+ const i = {
137
+ [ee.up]: () => {
138
+ t.preventDefault(), B();
139
+ },
140
+ [ee.down]: () => {
141
+ t.preventDefault(), x();
142
+ }
143
+ };
144
+ (n = i[t.key]) == null || n.call(i);
145
+ }, B = () => {
146
+ if (r.readonly || V.value || O.value)
147
+ return;
148
+ const e = Number(C.value) || 0, n = H(e);
149
+ w(n), s(k, l.currentValue), R();
150
+ }, x = () => {
151
+ if (r.readonly || V.value || g.value)
152
+ return;
153
+ const e = Number(C.value) || 0, n = H(e, -1);
154
+ w(n), s(k, l.currentValue), R();
155
+ }, L = (e, n) => {
156
+ const { max: t, min: i, step: o, precision: f, stepStrictly: _, valueOnClear: S } = r;
157
+ t < i && Me("InputNumber", "min should not be greater than max.");
158
+ let c = Number(e);
159
+ if (y(e) || Number.isNaN(c))
160
+ return null;
161
+ if (e === "") {
162
+ if (S === null)
163
+ return null;
164
+ c = Ae(S) ? { min: i, max: t }[S] : S;
165
+ }
166
+ return _ && (c = M(Math.round(c / o) * o, f), c !== e && n && s(N, c)), T(f) || (c = M(c, f)), (c > t || c < i) && (c = c > t ? t : i, n && s(N, c)), c;
167
+ }, w = (e, n = !0) => {
168
+ var t;
169
+ const i = l.currentValue, o = L(e);
170
+ if (!n) {
171
+ s(N, o);
172
+ return;
173
+ }
174
+ i === o && e || (l.userInput = null, s(N, o), i !== o && s(re, o, i), r.validateEvent && ((t = p == null ? void 0 : p.validate) == null || t.call(p, "change").catch((f) => Z())), l.currentValue = o);
175
+ }, ue = (e) => {
176
+ l.userInput = e;
177
+ const n = e === "" ? null : Number(e);
178
+ s(k, n), w(n, !1);
179
+ }, ie = (e) => {
180
+ const n = e !== "" ? Number(e) : "";
181
+ (b(n) && !Number.isNaN(n) || e === "") && w(n), R(), l.userInput = null;
182
+ }, oe = () => {
183
+ var e, n;
184
+ (n = (e = m.value) == null ? void 0 : e.focus) == null || n.call(e);
185
+ }, se = () => {
186
+ var e, n;
187
+ (n = (e = m.value) == null ? void 0 : e.blur) == null || n.call(e);
188
+ }, de = (e) => {
189
+ s("focus", e);
190
+ }, ce = (e) => {
191
+ var n, t;
192
+ l.userInput = null, l.currentValue === null && ((n = m.value) != null && n.input) && (m.value.input.value = ""), s("blur", e), r.validateEvent && ((t = p == null ? void 0 : p.validate) == null || t.call(p, "blur").catch((i) => Z()));
193
+ }, R = () => {
194
+ l.currentValue !== r.modelValue && (l.currentValue = r.modelValue);
195
+ }, me = (e) => {
196
+ document.activeElement === e.target && e.preventDefault();
197
+ };
198
+ return W(() => r.modelValue, (e, n) => {
199
+ const t = L(e, !0);
200
+ l.userInput === null && t !== n && (l.currentValue = t);
201
+ }, { immediate: !0 }), W(() => r.precision, () => {
202
+ l.currentValue = L(r.modelValue);
203
+ }), be(() => {
204
+ var e;
205
+ const { min: n, max: t, modelValue: i } = r, o = (e = m.value) == null ? void 0 : e.input;
206
+ if (o.setAttribute("role", "spinbutton"), Number.isFinite(t) ? o.setAttribute("aria-valuemax", String(t)) : o.removeAttribute("aria-valuemax"), Number.isFinite(n) ? o.setAttribute("aria-valuemin", String(n)) : o.removeAttribute("aria-valuemin"), o.setAttribute("aria-valuenow", l.currentValue || l.currentValue === 0 ? String(l.currentValue) : ""), o.setAttribute("aria-disabled", String(V.value)), !b(i) && i != null) {
207
+ let f = Number(i);
208
+ Number.isNaN(f) && (f = null), s(N, f);
209
+ }
210
+ o.addEventListener("wheel", me, { passive: !1 });
211
+ }), ve(() => {
212
+ var e, n;
213
+ const t = (e = m.value) == null ? void 0 : e.input;
214
+ t == null || t.setAttribute("aria-valuenow", `${(n = l.currentValue) != null ? n : ""}`);
215
+ }), E({
216
+ focus: oe,
217
+ blur: se
218
+ }), (e, n) => (v(), $("div", {
219
+ class: z([
220
+ a(d).b(),
221
+ a(d).m(a(G)),
222
+ a(d).is("disabled", a(V)),
223
+ a(d).is("without-controls", !e.controls),
224
+ a(d).is("controls-right", a(D)),
225
+ a(d).is(e.align, !!e.align)
226
+ ]),
227
+ onDragstart: Ne(() => {
228
+ }, ["prevent"])
229
+ }, [
230
+ e.controls ? X((v(), $("span", {
231
+ key: 0,
232
+ role: "button",
233
+ "aria-label": a(I)("el.inputNumber.decrease"),
234
+ class: z([a(d).e("decrease"), a(d).is("disabled", a(g))]),
235
+ onKeydown: Y(x, ["enter"])
236
+ }, [
237
+ A(e.$slots, "decrease-icon", {}, () => [
238
+ K(a(q), null, {
239
+ default: P(() => [
240
+ a(D) ? (v(), F(a(he), { key: 0 })) : (v(), F(a(ye), { key: 1 }))
241
+ ]),
242
+ _: 1
243
+ })
244
+ ])
245
+ ], 42, ["aria-label", "onKeydown"])), [
246
+ [a(ne), x]
247
+ ]) : j("v-if", !0),
248
+ e.controls ? X((v(), $("span", {
249
+ key: 1,
250
+ role: "button",
251
+ "aria-label": a(I)("el.inputNumber.increase"),
252
+ class: z([a(d).e("increase"), a(d).is("disabled", a(O))]),
253
+ onKeydown: Y(B, ["enter"])
254
+ }, [
255
+ A(e.$slots, "increase-icon", {}, () => [
256
+ K(a(q), null, {
257
+ default: P(() => [
258
+ a(D) ? (v(), F(a(Ie), { key: 0 })) : (v(), F(a(ge), { key: 1 }))
259
+ ]),
260
+ _: 1
261
+ })
262
+ ])
263
+ ], 42, ["aria-label", "onKeydown"])), [
264
+ [a(ne), B]
265
+ ]) : j("v-if", !0),
266
+ K(a(Ve), {
267
+ id: e.id,
268
+ ref_key: "input",
269
+ ref: m,
270
+ type: "number",
271
+ step: e.step,
272
+ "model-value": a(C),
273
+ placeholder: e.placeholder,
274
+ readonly: e.readonly,
275
+ disabled: a(V),
276
+ size: a(G),
277
+ max: e.max,
278
+ min: e.min,
279
+ name: e.name,
280
+ "aria-label": e.ariaLabel,
281
+ "validate-event": !1,
282
+ inputmode: e.inputmode,
283
+ onKeydown: le,
284
+ onBlur: ce,
285
+ onFocus: de,
286
+ onInput: ue,
287
+ onChange: ie
288
+ }, Ee({
289
+ _: 2
290
+ }, [
291
+ e.$slots.prefix ? {
292
+ name: "prefix",
293
+ fn: P(() => [
294
+ A(e.$slots, "prefix")
295
+ ])
296
+ } : void 0,
297
+ e.$slots.suffix ? {
298
+ name: "suffix",
299
+ fn: P(() => [
300
+ A(e.$slots, "suffix")
301
+ ])
302
+ } : void 0
303
+ ]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "inputmode"])
304
+ ], 42, ["onDragstart"]));
305
+ }
306
+ });
307
+ var Oe = /* @__PURE__ */ Se(Ke, [["__file", "input-number.vue"]]);
308
+ const qe = Pe(Oe);
309
+ export {
310
+ qe as E
311
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),W=require("./el-input-9c912678.cjs"),E=require("./index-f6afafaa.cjs"),l=require("./base-ef747d02.cjs"),g=require("./el-scrollbar-691cfc11.cjs"),c=require("./el-popper-73466d7a.cjs"),X=require("./index-3a74eae4.cjs"),Y=100,j=600,L={beforeMount(o,v){const d=v.value,{interval:u=Y,delay:h=j}=l.isFunction(d)?{}:d;let f,p;const i=()=>l.isFunction(d)?d():d.handler(),b=()=>{p&&(clearTimeout(p),p=void 0),f&&(clearInterval(f),f=void 0)};o.addEventListener("mousedown",y=>{y.button===0&&(b(),i(),document.addEventListener("mouseup",()=>b(),{once:!0}),p=setTimeout(()=>{f=setInterval(()=>{i()},u)},h))})}},J=l.buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:g.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:o=>o===null||l.isNumber(o)||["min","max"].includes(o),default:null},name:String,placeholder:String,precision:{type:Number,validator:o=>o>=0&&o===Number.parseInt(`${o}`,10)},validateEvent:{type:Boolean,default:!0},...c.useAriaProps(["ariaLabel"]),inputmode:{type:l.definePropType(String),default:void 0},align:{type:l.definePropType(String),default:"center"},disabledScientific:Boolean}),Q={[c.CHANGE_EVENT]:(o,v)=>v!==o,blur:o=>o instanceof FocusEvent,focus:o=>o instanceof FocusEvent,[c.INPUT_EVENT]:o=>l.isNumber(o)||l.isNil(o),[c.UPDATE_MODEL_EVENT]:o=>l.isNumber(o)||l.isNil(o)},Z=n.defineComponent({name:"ElInputNumber"}),ee=n.defineComponent({...Z,props:J,emits:Q,setup(o,{expose:v,emit:d}){const u=o,{t:h}=X.useLocale(),f=l.useNamespace("input-number"),p=n.ref(),i=n.reactive({currentValue:u.modelValue,userInput:null}),{formItem:b}=g.useFormItem(),y=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue<=u.min),C=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue>=u.max),x=n.computed(()=>{const e=M(u.step);return l.isUndefined(u.precision)?Math.max(M(u.modelValue),e):(e>u.precision,u.precision)}),w=n.computed(()=>u.controls&&u.controlsPosition==="right"),F=g.useFormSize(),V=g.useFormDisabled(),S=n.computed(()=>{if(i.userInput!==null)return i.userInput;let e=i.currentValue;if(l.isNil(e))return"";if(l.isNumber(e)){if(Number.isNaN(e))return"";l.isUndefined(u.precision)||(e=e.toFixed(u.precision))}return e}),A=(e,r)=>{if(l.isUndefined(r)&&(r=x.value),r===0)return Math.round(e);let t=String(e);const a=t.indexOf(".");if(a===-1||!t.replace(".","").split("")[a+r])return e;const I=t.length;return t.charAt(I-1)==="5"&&(t=`${t.slice(0,Math.max(0,I-1))}6`),Number.parseFloat(Number(t).toFixed(r))},M=e=>{if(l.isNil(e))return 0;const r=e.toString(),t=r.indexOf(".");let a=0;return t!==-1&&(a=r.length-t-1),a},U=(e,r=1)=>l.isNumber(e)?e>=Number.MAX_SAFE_INTEGER&&r===1||e<=Number.MIN_SAFE_INTEGER&&r===-1?e:A(e+u.step*r):i.currentValue,O=e=>{var r;const t=e;if(u.disabledScientific&&["e","E"].includes(t.key)){t.preventDefault();return}const a={[c.EVENT_CODE.up]:()=>{t.preventDefault(),P()},[c.EVENT_CODE.down]:()=>{t.preventDefault(),D()}};(r=a[t.key])==null||r.call(a)},P=()=>{if(u.readonly||V.value||C.value)return;const e=Number(S.value)||0,r=U(e);_(r),d(c.INPUT_EVENT,i.currentValue),B()},D=()=>{if(u.readonly||V.value||y.value)return;const e=Number(S.value)||0,r=U(e,-1);_(r),d(c.INPUT_EVENT,i.currentValue),B()},k=(e,r)=>{const{max:t,min:a,step:s,precision:N,stepStrictly:I,valueOnClear:T}=u;t<a&&c.throwError("InputNumber","min should not be greater than max.");let m=Number(e);if(l.isNil(e)||Number.isNaN(m))return null;if(e===""){if(T===null)return null;m=l.isString(T)?{min:a,max:t}[T]:T}return I&&(m=A(Math.round(m/s)*s,N),m!==e&&r&&d(c.UPDATE_MODEL_EVENT,m)),l.isUndefined(N)||(m=A(m,N)),(m>t||m<a)&&(m=m>t?t:a,r&&d(c.UPDATE_MODEL_EVENT,m)),m},_=(e,r=!0)=>{var t;const a=i.currentValue,s=k(e);if(!r){d(c.UPDATE_MODEL_EVENT,s);return}a===s&&e||(i.userInput=null,d(c.UPDATE_MODEL_EVENT,s),a!==s&&d(c.CHANGE_EVENT,s,a),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"change").catch(N=>c.debugWarn())),i.currentValue=s)},$=e=>{i.userInput=e;const r=e===""?null:Number(e);d(c.INPUT_EVENT,r),_(r,!1)},z=e=>{const r=e!==""?Number(e):"";(l.isNumber(r)&&!Number.isNaN(r)||e==="")&&_(r),B(),i.userInput=null},R=()=>{var e,r;(r=(e=p.value)==null?void 0:e.focus)==null||r.call(e)},K=()=>{var e,r;(r=(e=p.value)==null?void 0:e.blur)==null||r.call(e)},q=e=>{d("focus",e)},G=e=>{var r,t;i.userInput=null,i.currentValue===null&&((r=p.value)!=null&&r.input)&&(p.value.input.value=""),d("blur",e),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"blur").catch(a=>c.debugWarn()))},B=()=>{i.currentValue!==u.modelValue&&(i.currentValue=u.modelValue)},H=e=>{document.activeElement===e.target&&e.preventDefault()};return n.watch(()=>u.modelValue,(e,r)=>{const t=k(e,!0);i.userInput===null&&t!==r&&(i.currentValue=t)},{immediate:!0}),n.watch(()=>u.precision,()=>{i.currentValue=k(u.modelValue)}),n.onMounted(()=>{var e;const{min:r,max:t,modelValue:a}=u,s=(e=p.value)==null?void 0:e.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(t)?s.setAttribute("aria-valuemax",String(t)):s.removeAttribute("aria-valuemax"),Number.isFinite(r)?s.setAttribute("aria-valuemin",String(r)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),s.setAttribute("aria-disabled",String(V.value)),!l.isNumber(a)&&a!=null){let N=Number(a);Number.isNaN(N)&&(N=null),d(c.UPDATE_MODEL_EVENT,N)}s.addEventListener("wheel",H,{passive:!1})}),n.onUpdated(()=>{var e,r;const t=(e=p.value)==null?void 0:e.input;t==null||t.setAttribute("aria-valuenow",`${(r=i.currentValue)!=null?r:""}`)}),v({focus:R,blur:K}),(e,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([n.unref(f).b(),n.unref(f).m(n.unref(F)),n.unref(f).is("disabled",n.unref(V)),n.unref(f).is("without-controls",!e.controls),n.unref(f).is("controls-right",n.unref(w)),n.unref(f).is(e.align,!!e.align)]),onDragstart:n.withModifiers(()=>{},["prevent"])},[e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:0,role:"button","aria-label":n.unref(h)("el.inputNumber.decrease"),class:n.normalizeClass([n.unref(f).e("decrease"),n.unref(f).is("disabled",n.unref(y))]),onKeydown:n.withKeys(D,["enter"])},[n.renderSlot(e.$slots,"decrease-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_down_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),D]]):n.createCommentVNode("v-if",!0),e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:1,role:"button","aria-label":n.unref(h)("el.inputNumber.increase"),class:n.normalizeClass([n.unref(f).e("increase"),n.unref(f).is("disabled",n.unref(C))]),onKeydown:n.withKeys(P,["enter"])},[n.renderSlot(e.$slots,"increase-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_up_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),P]]):n.createCommentVNode("v-if",!0),n.createVNode(n.unref(W.ElInput),{id:e.id,ref_key:"input",ref:p,type:"number",step:e.step,"model-value":n.unref(S),placeholder:e.placeholder,readonly:e.readonly,disabled:n.unref(V),size:n.unref(F),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,inputmode:e.inputmode,onKeydown:O,onBlur:G,onFocus:q,onInput:$,onChange:z},n.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix")])}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],42,["onDragstart"]))}});var ne=l._export_sfc(ee,[["__file","input-number.vue"]]);const re=l.withInstall(ne);exports.ElInputNumber=re;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),I=require("./use-global-config-03735617.cjs"),i=require("./base-ef747d02.cjs");function T(e,t){let n;const s=a.ref(!1),l=a.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(o){l.text=o}function d(){const o=l.parent,v=f.ns;if(!o.vLoadingAddClassList){let u=o.getAttribute("loading-number");u=Number.parseInt(u)-1,u?o.setAttribute("loading-number",u.toString()):(i.removeClass(o,v.bm("parent","relative")),o.removeAttribute("loading-number")),i.removeClass(o,v.bm("parent","hidden"))}g(),b.unmount()}function g(){var o,v;(v=(o=f.$el)==null?void 0:o.parentNode)==null||v.removeChild(f.$el)}function C(){var o;e.beforeClose&&!e.beforeClose()||(s.value=!0,clearTimeout(n),n=setTimeout(c,400),l.visible=!1,(o=e.closed)==null||o.call(e))}function c(){if(!s.value)return;const o=l.parent;s.value=!1,o.vLoadingAddClassList=void 0,d()}const p=a.defineComponent({name:"ElLoading",setup(o,{expose:v}){const{ns:u,zIndex:w}=I.useGlobalComponentSettings("loading");return v({ns:u,zIndex:w}),()=>{const h=l.spinner||l.svg,S=a.h("svg",{class:"circular",viewBox:l.svgViewBox?l.svgViewBox:"0 0 50 50",...h?{innerHTML:h}:{}},[a.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),B=l.text?a.h("p",{class:u.b("text")},[l.text]):void 0;return a.h(a.Transition,{name:u.b("fade"),onAfterLeave:c},{default:a.withCtx(()=>[a.withDirectives(a.createVNode("div",{style:{backgroundColor:l.background||""},class:[u.b("mask"),l.customClass,l.fullscreen?"is-fullscreen":""]},[a.h("div",{class:u.b("spinner")},[S,B])]),[[a.vShow,l.visible]])])})}}}),b=a.createApp(p);Object.assign(b._context,t??{});const f=b.mount(document.createElement("div"));return{...a.toRefs(l),setText:r,removeElLoadingChild:g,close:C,handleAfterLeave:c,vm:f,get $el(){return f.$el}}}let y;const _=function(e={}){if(!i.isClient)return;const t=$(e);if(t.fullscreen&&y)return y;const n=T({...t,closed:()=>{var l;(l=t.closed)==null||l.call(t),t.fullscreen&&(y=void 0)}},_._context);N(t,t.parent,n),k(t,t.parent,n),t.parent.vLoadingAddClassList=()=>k(t,t.parent,n);let s=t.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",t.parent.setAttribute("loading-number",s),t.parent.appendChild(n.$el),a.nextTick(()=>n.visible.value=t.visible),t.fullscreen&&(y=n),n},$=e=>{var t,n,s,l;let r;return i.isString(e.target)?r=(t=document.querySelector(e.target))!=null?t:document.body:r=e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(s=e.lock)!=null?s:!1,customClass:e.customClass||"",visible:(l=e.visible)!=null?l:!0,beforeClose:e.beforeClose,closed:e.closed,target:r}},N=async(e,t,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=i.getStyle(document.body,"position"),n.originalOverflow.value=i.getStyle(document.body,"overflow"),l.zIndex=s();else if(e.parent===document.body){n.originalPosition.value=i.getStyle(document.body,"position"),await a.nextTick();for(const r of["top","left"]){const d=r==="top"?"scrollTop":"scrollLeft";l[r]=`${e.target.getBoundingClientRect()[r]+document.body[d]+document.documentElement[d]-Number.parseInt(i.getStyle(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])l[r]=`${e.target.getBoundingClientRect()[r]}px`}else n.originalPosition.value=i.getStyle(t,"position");for(const[r,d]of Object.entries(l))n.$el.style[r]=d},k=(e,t,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?i.removeClass(t,s.bm("parent","relative")):i.addClass(t,s.bm("parent","relative")),e.fullscreen&&e.lock?i.addClass(t,s.bm("parent","hidden")):i.removeClass(t,s.bm("parent","hidden"))};_._context=null;const x=Symbol("ElLoading"),m=e=>`element-loading-${i.hyphenate(e)}`,A=(e,t)=>{var n,s,l,r;const d=t.instance,g=o=>i.isObject(t.value)?t.value[o]:void 0,C=o=>{const v=i.isString(o)&&(d==null?void 0:d[o])||o;return a.ref(v)},c=o=>C(g(o)||e.getAttribute(m(o))),p=(n=g("fullscreen"))!=null?n:t.modifiers.fullscreen,b={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:p,target:(s=g("target"))!=null?s:p?void 0:e,body:(l=g("body"))!=null?l:t.modifiers.body,lock:(r=g("lock"))!=null?r:t.modifiers.lock},f=_(b);f._context=L._context,e[x]={options:b,instance:f}},V=(e,t)=>{for(const n of Object.keys(e))a.isRef(e[n])&&(e[n].value=t[n])},L={mounted(e,t){t.value&&A(e,t)},updated(e,t){const n=e[x];if(!t.value){n==null||n.instance.close(),e[x]=null;return}n?V(n.options,i.isObject(t.value)?t.value:{text:e.getAttribute(m("text")),svg:e.getAttribute(m("svg")),svgViewBox:e.getAttribute(m("svgViewBox")),spinner:e.getAttribute(m("spinner")),background:e.getAttribute(m("background")),customClass:e.getAttribute(m("customClass"))}):A(e,t)},unmounted(e){var t;(t=e[x])==null||t.instance.close(),e[x]=null}};L._context=null;exports.vLoading=L;
@@ -0,0 +1,203 @@
1
+ import { ref as B, reactive as P, defineComponent as O, h as m, Transition as j, withCtx as z, withDirectives as R, createVNode as q, vShow as D, createApp as F, toRefs as G, nextTick as I, isRef as H } from "vue";
2
+ import { u as K } from "./use-global-config-4b185eb5.js";
3
+ import { r as C, s as M, c as S, t as b, a as k, f as $, v as Y } from "./base-62a70f61.js";
4
+ function Z(e, t) {
5
+ let n;
6
+ const s = B(!1), o = P({
7
+ ...e,
8
+ originalPosition: "",
9
+ originalOverflow: "",
10
+ visible: !1
11
+ });
12
+ function r(l) {
13
+ o.text = l;
14
+ }
15
+ function c() {
16
+ const l = o.parent, u = v.ns;
17
+ if (!l.vLoadingAddClassList) {
18
+ let i = l.getAttribute("loading-number");
19
+ i = Number.parseInt(i) - 1, i ? l.setAttribute("loading-number", i.toString()) : (C(l, u.bm("parent", "relative")), l.removeAttribute("loading-number")), C(l, u.bm("parent", "hidden"));
20
+ }
21
+ d(), g.unmount();
22
+ }
23
+ function d() {
24
+ var l, u;
25
+ (u = (l = v.$el) == null ? void 0 : l.parentNode) == null || u.removeChild(v.$el);
26
+ }
27
+ function _() {
28
+ var l;
29
+ e.beforeClose && !e.beforeClose() || (s.value = !0, clearTimeout(n), n = setTimeout(a, 400), o.visible = !1, (l = e.closed) == null || l.call(e));
30
+ }
31
+ function a() {
32
+ if (!s.value)
33
+ return;
34
+ const l = o.parent;
35
+ s.value = !1, l.vLoadingAddClassList = void 0, c();
36
+ }
37
+ const p = O({
38
+ name: "ElLoading",
39
+ setup(l, { expose: u }) {
40
+ const { ns: i, zIndex: T } = K("loading");
41
+ return u({
42
+ ns: i,
43
+ zIndex: T
44
+ }), () => {
45
+ const A = o.spinner || o.svg, V = m("svg", {
46
+ class: "circular",
47
+ viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
48
+ ...A ? { innerHTML: A } : {}
49
+ }, [
50
+ m("circle", {
51
+ class: "path",
52
+ cx: "25",
53
+ cy: "25",
54
+ r: "20",
55
+ fill: "none"
56
+ })
57
+ ]), E = o.text ? m("p", { class: i.b("text") }, [o.text]) : void 0;
58
+ return m(j, {
59
+ name: i.b("fade"),
60
+ onAfterLeave: a
61
+ }, {
62
+ default: z(() => [
63
+ R(q("div", {
64
+ style: {
65
+ backgroundColor: o.background || ""
66
+ },
67
+ class: [
68
+ i.b("mask"),
69
+ o.customClass,
70
+ o.fullscreen ? "is-fullscreen" : ""
71
+ ]
72
+ }, [
73
+ m("div", {
74
+ class: i.b("spinner")
75
+ }, [V, E])
76
+ ]), [[D, o.visible]])
77
+ ])
78
+ });
79
+ };
80
+ }
81
+ }), g = F(p);
82
+ Object.assign(g._context, t ?? {});
83
+ const v = g.mount(document.createElement("div"));
84
+ return {
85
+ ...G(o),
86
+ setText: r,
87
+ removeElLoadingChild: d,
88
+ close: _,
89
+ handleAfterLeave: a,
90
+ vm: v,
91
+ get $el() {
92
+ return v.$el;
93
+ }
94
+ };
95
+ }
96
+ let y;
97
+ const L = function(e = {}) {
98
+ if (!M)
99
+ return;
100
+ const t = J(e);
101
+ if (t.fullscreen && y)
102
+ return y;
103
+ const n = Z({
104
+ ...t,
105
+ closed: () => {
106
+ var o;
107
+ (o = t.closed) == null || o.call(t), t.fullscreen && (y = void 0);
108
+ }
109
+ }, L._context);
110
+ Q(t, t.parent, n), h(t, t.parent, n), t.parent.vLoadingAddClassList = () => h(t, t.parent, n);
111
+ let s = t.parent.getAttribute("loading-number");
112
+ return s ? s = `${Number.parseInt(s) + 1}` : s = "1", t.parent.setAttribute("loading-number", s), t.parent.appendChild(n.$el), I(() => n.visible.value = t.visible), t.fullscreen && (y = n), n;
113
+ }, J = (e) => {
114
+ var t, n, s, o;
115
+ let r;
116
+ return S(e.target) ? r = (t = document.querySelector(e.target)) != null ? t : document.body : r = e.target || document.body, {
117
+ parent: r === document.body || e.body ? document.body : r,
118
+ background: e.background || "",
119
+ svg: e.svg || "",
120
+ svgViewBox: e.svgViewBox || "",
121
+ spinner: e.spinner || !1,
122
+ text: e.text || "",
123
+ fullscreen: r === document.body && ((n = e.fullscreen) != null ? n : !0),
124
+ lock: (s = e.lock) != null ? s : !1,
125
+ customClass: e.customClass || "",
126
+ visible: (o = e.visible) != null ? o : !0,
127
+ beforeClose: e.beforeClose,
128
+ closed: e.closed,
129
+ target: r
130
+ };
131
+ }, Q = async (e, t, n) => {
132
+ const { nextZIndex: s } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {};
133
+ if (e.fullscreen)
134
+ n.originalPosition.value = b(document.body, "position"), n.originalOverflow.value = b(document.body, "overflow"), o.zIndex = s();
135
+ else if (e.parent === document.body) {
136
+ n.originalPosition.value = b(document.body, "position"), await I();
137
+ for (const r of ["top", "left"]) {
138
+ const c = r === "top" ? "scrollTop" : "scrollLeft";
139
+ o[r] = `${e.target.getBoundingClientRect()[r] + document.body[c] + document.documentElement[c] - Number.parseInt(b(document.body, `margin-${r}`), 10)}px`;
140
+ }
141
+ for (const r of ["height", "width"])
142
+ o[r] = `${e.target.getBoundingClientRect()[r]}px`;
143
+ } else
144
+ n.originalPosition.value = b(t, "position");
145
+ for (const [r, c] of Object.entries(o))
146
+ n.$el.style[r] = c;
147
+ }, h = (e, t, n) => {
148
+ const s = n.vm.ns || n.vm._.exposed.ns;
149
+ ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? C(t, s.bm("parent", "relative")) : k(t, s.bm("parent", "relative")), e.fullscreen && e.lock ? k(t, s.bm("parent", "hidden")) : C(t, s.bm("parent", "hidden"));
150
+ };
151
+ L._context = null;
152
+ const x = Symbol("ElLoading"), f = (e) => `element-loading-${Y(e)}`, w = (e, t) => {
153
+ var n, s, o, r;
154
+ const c = t.instance, d = (l) => $(t.value) ? t.value[l] : void 0, _ = (l) => {
155
+ const u = S(l) && (c == null ? void 0 : c[l]) || l;
156
+ return B(u);
157
+ }, a = (l) => _(d(l) || e.getAttribute(f(l))), p = (n = d("fullscreen")) != null ? n : t.modifiers.fullscreen, g = {
158
+ text: a("text"),
159
+ svg: a("svg"),
160
+ svgViewBox: a("svgViewBox"),
161
+ spinner: a("spinner"),
162
+ background: a("background"),
163
+ customClass: a("customClass"),
164
+ fullscreen: p,
165
+ target: (s = d("target")) != null ? s : p ? void 0 : e,
166
+ body: (o = d("body")) != null ? o : t.modifiers.body,
167
+ lock: (r = d("lock")) != null ? r : t.modifiers.lock
168
+ }, v = L(g);
169
+ v._context = N._context, e[x] = {
170
+ options: g,
171
+ instance: v
172
+ };
173
+ }, U = (e, t) => {
174
+ for (const n of Object.keys(e))
175
+ H(e[n]) && (e[n].value = t[n]);
176
+ }, N = {
177
+ mounted(e, t) {
178
+ t.value && w(e, t);
179
+ },
180
+ updated(e, t) {
181
+ const n = e[x];
182
+ if (!t.value) {
183
+ n == null || n.instance.close(), e[x] = null;
184
+ return;
185
+ }
186
+ n ? U(n.options, $(t.value) ? t.value : {
187
+ text: e.getAttribute(f("text")),
188
+ svg: e.getAttribute(f("svg")),
189
+ svgViewBox: e.getAttribute(f("svgViewBox")),
190
+ spinner: e.getAttribute(f("spinner")),
191
+ background: e.getAttribute(f("background")),
192
+ customClass: e.getAttribute(f("customClass"))
193
+ }) : w(e, t);
194
+ },
195
+ unmounted(e) {
196
+ var t;
197
+ (t = e[x]) == null || t.instance.close(), e[x] = null;
198
+ }
199
+ };
200
+ N._context = null;
201
+ export {
202
+ N as v
203
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),P=require("./el-scrollbar-691cfc11.cjs"),H=require("./index-f6afafaa.cjs"),f=require("./el-popper-73466d7a.cjs"),a=require("./base-ef747d02.cjs"),le=require("./index-eea0bcb3.cjs"),ae=require("./el-tag-ecad6d02.cjs"),ue=require("./typescript-b63f8e83.cjs"),re=require("./vnode-4db20540.cjs"),ie=e.defineComponent({name:"ElCollapseTransition"}),ce=e.defineComponent({...ie,setup(n){const o=a.useNamespace("collapse-transition"),i=t=>{t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom},s={beforeEnter(t){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},enter(t){requestAnimationFrame(()=>{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"})},afterEnter(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow},enterCancelled(t){i(t)},beforeLeave(t){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"},leave(t){t.scrollHeight!==0&&(t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave(t){i(t)},leaveCancelled(t){i(t)}};return(t,b)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({name:e.unref(o).b()},e.toHandlers(s)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["name"]))}});var de=a._export_sfc(ce,[["__file","collapse-transition.vue"]]);const pe=a.withInstall(de);let me=class{constructor(o,i){this.parent=o,this.domNode=i,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(o){o===this.subMenuItems.length?o=0:o<0&&(o=this.subMenuItems.length-1),this.subMenuItems[o].focus(),this.subIndex=o}addListeners(){const o=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,i=>{i.addEventListener("keydown",s=>{let t=!1;switch(s.code){case f.EVENT_CODE.down:{this.gotoSubIndex(this.subIndex+1),t=!0;break}case f.EVENT_CODE.up:{this.gotoSubIndex(this.subIndex-1),t=!0;break}case f.EVENT_CODE.tab:{f.triggerEvent(o,"mouseleave");break}case f.EVENT_CODE.enter:case f.EVENT_CODE.numpadEnter:case f.EVENT_CODE.space:{t=!0,s.currentTarget.click();break}}return t&&(s.preventDefault(),s.stopPropagation()),!1})})}},fe=class{constructor(o,i){this.domNode=o,this.submenu=null,this.submenu=null,this.init(i)}init(o){this.domNode.setAttribute("tabindex","0");const i=this.domNode.querySelector(`.${o}-menu`);i&&(this.submenu=new me(this,i)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",o=>{let i=!1;switch(o.code){case f.EVENT_CODE.down:{f.triggerEvent(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),i=!0;break}case f.EVENT_CODE.up:{f.triggerEvent(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),i=!0;break}case f.EVENT_CODE.tab:{f.triggerEvent(o.currentTarget,"mouseleave");break}case f.EVENT_CODE.enter:case f.EVENT_CODE.numpadEnter:case f.EVENT_CODE.space:{i=!0,o.currentTarget.click();break}}i&&o.preventDefault()})}},ve=class{constructor(o,i){this.domNode=o,this.init(i)}init(o){const i=this.domNode.childNodes;Array.from(i).forEach(s=>{s.nodeType===1&&new fe(s,o)})}};const he=e.defineComponent({name:"ElMenuCollapseTransition"}),ge=e.defineComponent({...he,setup(n){const o=a.useNamespace("menu"),i={onBeforeEnter:s=>s.style.opacity="0.2",onEnter(s,t){a.addClass(s,`${o.namespace.value}-opacity-transition`),s.style.opacity="1",t()},onAfterEnter(s){a.removeClass(s,`${o.namespace.value}-opacity-transition`),s.style.opacity=""},onBeforeLeave(s){s.dataset||(s.dataset={}),a.hasClass(s,o.m("collapse"))?(a.removeClass(s,o.m("collapse")),s.dataset.oldOverflow=s.style.overflow,s.dataset.scrollWidth=s.clientWidth.toString(),a.addClass(s,o.m("collapse"))):(a.addClass(s,o.m("collapse")),s.dataset.oldOverflow=s.style.overflow,s.dataset.scrollWidth=s.clientWidth.toString(),a.removeClass(s,o.m("collapse"))),s.style.width=`${s.scrollWidth}px`,s.style.overflow="hidden"},onLeave(s){a.addClass(s,"horizontal-collapse-transition"),s.style.width=`${s.dataset.scrollWidth}px`}};return(s,t)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({mode:"out-in"},e.unref(i)),{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},16))}});var be=a._export_sfc(ge,[["__file","menu-collapse-transition.vue"]]);function ee(n,o){const i=e.computed(()=>{let t=n.parent;const b=[o.value];for(;t.type.name!=="ElMenu";)t.props.index&&b.unshift(t.props.index),t=t.parent;return b});return{parentMenu:e.computed(()=>{let t=n.parent;for(;t&&!["ElMenu","ElSubMenu"].includes(t.type.name);)t=t.parent;return t}),indexPath:i}}function Ee(n){return e.computed(()=>{const i=n.backgroundColor;return i?new le.TinyColor(i).shade(20).toString():""})}const te=(n,o)=>{const i=a.useNamespace("menu");return e.computed(()=>i.cssVarBlock({"text-color":n.textColor||"","hover-text-color":n.textColor||"","bg-color":n.backgroundColor||"","hover-bg-color":Ee(n).value||"","active-color":n.activeTextColor||"",level:`${o}`}))},Q="rootMenu",U="subMenu:",Me=a.buildProps({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:P.iconPropType},expandOpenIcon:{type:P.iconPropType},collapseCloseIcon:{type:P.iconPropType},collapseOpenIcon:{type:P.iconPropType}}),K="ElSubMenu";var X=e.defineComponent({name:K,props:Me,setup(n,{slots:o,expose:i}){const s=e.getCurrentInstance(),{indexPath:t,parentMenu:b}=ee(s,e.computed(()=>n.index)),h=a.useNamespace("menu"),y=a.useNamespace("sub-menu"),c=e.inject(Q);c||f.throwError(K,"can not inject root menu");const E=e.inject(`${U}${b.value.uid}`);E||f.throwError(K,"can not inject sub menu");const N=e.ref({}),C=e.ref({});let p;const x=e.ref(!1),M=e.ref(),_=e.ref(),B=e.computed(()=>E.level===0),q=e.computed(()=>k.value==="horizontal"&&B.value?"bottom-start":"right-start"),w=e.computed(()=>k.value==="horizontal"&&B.value||k.value==="vertical"&&!c.props.collapse?n.expandCloseIcon&&n.expandOpenIcon?T.value?n.expandOpenIcon:n.expandCloseIcon:H.arrow_down_default:n.collapseCloseIcon&&n.collapseOpenIcon?T.value?n.collapseOpenIcon:n.collapseCloseIcon:H.arrow_right_default),$=e.computed(()=>{const l=n.teleported;return a.isUndefined(l)?B.value:l}),L=e.computed(()=>c.props.collapse?`${h.namespace.value}-zoom-in-left`:`${h.namespace.value}-zoom-in-top`),G=e.computed(()=>k.value==="horizontal"&&B.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"]),T=e.computed(()=>c.openedMenus.includes(n.index)),z=e.computed(()=>[...Object.values(N.value),...Object.values(C.value)].some(({active:l})=>l)),k=e.computed(()=>c.props.mode),W=e.computed(()=>c.props.persistent),D=e.reactive({index:n.index,indexPath:t,active:z}),j=te(c.props,E.level+1),F=e.computed(()=>{var l;return(l=n.popperOffset)!=null?l:c.props.popperOffset}),A=e.computed(()=>{var l;return(l=n.popperClass)!=null?l:c.props.popperClass}),V=e.computed(()=>{var l;return(l=n.showTimeout)!=null?l:c.props.showTimeout}),R=e.computed(()=>{var l;return(l=n.hideTimeout)!=null?l:c.props.hideTimeout}),J=()=>{var l,g,v;return(v=(g=(l=_.value)==null?void 0:l.popperRef)==null?void 0:g.popperInstanceRef)==null?void 0:v.destroy()},u=l=>{l||J()},r=()=>{c.props.menuTrigger==="hover"&&c.props.mode==="horizontal"||c.props.collapse&&c.props.mode==="vertical"||n.disabled||c.handleSubMenuClick({index:n.index,indexPath:t.value,active:z.value})},d=(l,g=V.value)=>{var v;if(l.type!=="focus"){if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"||n.disabled){E.mouseInChild.value=!0;return}E.mouseInChild.value=!0,p==null||p(),{stop:p}=a.useTimeoutFn(()=>{c.openMenu(n.index,t.value)},g),$.value&&((v=b.value.vnode.el)==null||v.dispatchEvent(new MouseEvent("mouseenter"))),l.type==="mouseenter"&&l.target&&e.nextTick(()=>{f.focusElement(l.target,{preventScroll:!0})})}},m=(l=!1)=>{var g;if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"){E.mouseInChild.value=!1;return}p==null||p(),E.mouseInChild.value=!1,{stop:p}=a.useTimeoutFn(()=>!x.value&&c.closeMenu(n.index,t.value),R.value),$.value&&l&&((g=E.handleMouseleave)==null||g.call(E,!0))};e.watch(()=>c.props.collapse,l=>u(!!l));{const l=v=>{C.value[v.index]=v},g=v=>{delete C.value[v.index]};e.provide(`${U}${s.uid}`,{addSubMenu:l,removeSubMenu:g,handleMouseleave:m,mouseInChild:x,level:E.level+1})}return i({opened:T}),e.onMounted(()=>{c.addSubMenu(D),E.addSubMenu(D)}),e.onBeforeUnmount(()=>{E.removeSubMenu(D),c.removeSubMenu(D)}),()=>{var l;const g=[(l=o.title)==null?void 0:l.call(o),e.h(H.ElIcon,{class:y.e("icon-arrow"),style:{transform:T.value?n.expandCloseIcon&&n.expandOpenIcon||n.collapseCloseIcon&&n.collapseOpenIcon&&c.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>a.isString(w.value)?e.h(s.appContext.components[w.value]):e.h(w.value)})],v=c.isMenuPopup?e.h(f.ElTooltip,{ref:_,visible:T.value,effect:"light",pure:!0,offset:F.value,showArrow:!1,persistent:W.value,popperClass:A.value,placement:q.value,teleported:$.value,fallbackPlacements:G.value,transition:L.value,gpuAcceleration:!1},{content:()=>{var S;return e.h("div",{class:[h.m(k.value),h.m("popup-container"),A.value],onMouseenter:I=>d(I,100),onMouseleave:()=>m(!0),onFocus:I=>d(I,100)},[e.h("ul",{class:[h.b(),h.m("popup"),h.m(`popup-${q.value}`)],style:j.value},[(S=o.default)==null?void 0:S.call(o)])])},default:()=>e.h("div",{class:y.e("title"),onClick:r},g)}):e.h(e.Fragment,{},[e.h("div",{class:y.e("title"),ref:M,onClick:r},g),e.h(pe,{},{default:()=>{var S;return e.withDirectives(e.h("ul",{role:"menu",class:[h.b(),h.m("inline")],style:j.value},[(S=o.default)==null?void 0:S.call(o)]),[[e.vShow,T.value]])}})]);return e.h("li",{class:[y.b(),y.is("active",z.value),y.is("opened",T.value),y.is("disabled",n.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:T.value,onMouseenter:d,onMouseleave:()=>m(),onFocus:d},[v])}}});const ye=a.buildProps({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:a.definePropType(Array),default:()=>ue.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:P.iconPropType,default:()=>H.more_default},popperEffect:{type:a.definePropType(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),Y=n=>a.isArray(n)&&n.every(o=>a.isString(o)),Ce={close:(n,o)=>a.isString(n)&&Y(o),open:(n,o)=>a.isString(n)&&Y(o),select:(n,o,i,s)=>a.isString(n)&&Y(o)&&a.isObject(i)&&(a.isUndefined(s)||s instanceof Promise)};var xe=e.defineComponent({name:"ElMenu",props:ye,emits:Ce,setup(n,{emit:o,slots:i,expose:s}){const t=e.getCurrentInstance(),b=t.appContext.config.globalProperties.$router,h=e.ref(),y=e.ref(),c=a.useNamespace("menu"),E=a.useNamespace("sub-menu");let N=64;const C=e.ref(-1),p=e.ref(n.defaultOpeneds&&!n.collapse?n.defaultOpeneds.slice(0):[]),x=e.ref(n.defaultActive),M=e.ref({}),_=e.ref({}),B=e.computed(()=>n.mode==="horizontal"||n.mode==="vertical"&&n.collapse),q=()=>{const u=x.value&&M.value[x.value];if(!u||n.mode==="horizontal"||n.collapse)return;u.indexPath.forEach(d=>{const m=_.value[d];m&&w(d,m.indexPath)})},w=(u,r)=>{p.value.includes(u)||(n.uniqueOpened&&(p.value=p.value.filter(d=>r.includes(d))),p.value.push(u),o("open",u,r))},$=u=>{const r=p.value.indexOf(u);r!==-1&&p.value.splice(r,1)},L=(u,r)=>{$(u),o("close",u,r)},G=({index:u,indexPath:r})=>{p.value.includes(u)?L(u,r):w(u,r)},T=u=>{(n.mode==="horizontal"||n.collapse)&&(p.value=[]);const{index:r,indexPath:d}=u;if(!(a.isNil(r)||a.isNil(d)))if(n.router&&b){const m=u.route||r,l=b.push(m).then(g=>(g||(x.value=r),g));o("select",r,d,{index:r,indexPath:d,route:m},l)}else x.value=r,o("select",r,d,{index:r,indexPath:d})},z=u=>{var r;const d=M.value,m=d[u]||x.value&&d[x.value]||d[n.defaultActive];x.value=(r=m==null?void 0:m.index)!=null?r:u},k=u=>{const r=getComputedStyle(u),d=Number.parseInt(r.marginLeft,10),m=Number.parseInt(r.marginRight,10);return u.offsetWidth+d+m||0},W=()=>{var u,r;if(!h.value)return-1;const d=Array.from((r=(u=h.value)==null?void 0:u.childNodes)!=null?r:[]).filter(O=>O.nodeName!=="#comment"&&(O.nodeName!=="#text"||O.nodeValue)),m=getComputedStyle(h.value),l=Number.parseInt(m.paddingLeft,10),g=Number.parseInt(m.paddingRight,10),v=h.value.clientWidth-l-g;let S=0,I=0;return d.forEach((O,se)=>{S+=k(O),S<=v-N&&(I=se+1)}),I===d.length?-1:I},D=u=>_.value[u].indexPath,j=(u,r=33.34)=>{let d;return()=>{d&&clearTimeout(d),d=setTimeout(()=>{u()},r)}};let F=!0;const A=()=>{const u=P.unrefElement(y);if(u&&(N=k(u)||64),C.value===W())return;const r=()=>{C.value=-1,e.nextTick(()=>{C.value=W()})};F?r():j(r)(),F=!1};e.watch(()=>n.defaultActive,u=>{M.value[u]||(x.value=""),z(u)}),e.watch(()=>n.collapse,u=>{u&&(p.value=[])}),e.watch(M.value,q);let V;e.watchEffect(()=>{n.mode==="horizontal"&&n.ellipsis?V=P.useResizeObserver(h,A).stop:V==null||V()});const R=e.ref(!1);{const u=l=>{_.value[l.index]=l},r=l=>{delete _.value[l.index]},d=l=>{M.value[l.index]=l},m=l=>{delete M.value[l.index]};e.provide(Q,e.reactive({props:n,openedMenus:p,items:M,subMenus:_,activeIndex:x,isMenuPopup:B,addMenuItem:d,removeMenuItem:m,addSubMenu:u,removeSubMenu:r,openMenu:w,closeMenu:L,handleMenuItemClick:T,handleSubMenuClick:G})),e.provide(`${U}${t.uid}`,{addSubMenu:u,removeSubMenu:r,mouseInChild:R,level:0})}e.onMounted(()=>{n.mode==="horizontal"&&new ve(t.vnode.el,c.namespace.value)}),s({open:r=>{const{indexPath:d}=_.value[r];d.forEach(m=>w(m,d))},close:$,updateActiveIndex:z,handleResize:A});const J=te(n,0);return()=>{var u,r;let d=(r=(u=i.default)==null?void 0:u.call(i))!=null?r:[];const m=[];if(n.mode==="horizontal"&&h.value){const v=re.flattedChildren(d).filter(O=>(O==null?void 0:O.shapeFlag)!==8),S=C.value===-1?v:v.slice(0,C.value),I=C.value===-1?[]:v.slice(C.value);I!=null&&I.length&&n.ellipsis&&(d=S,m.push(e.h(X,{ref:y,index:"sub-menu-more",class:E.e("hide-arrow"),popperOffset:n.popperOffset},{title:()=>e.h(H.ElIcon,{class:E.e("icon-more")},{default:()=>e.h(n.ellipsisIcon)}),default:()=>I})))}const l=n.closeOnClickOutside?[[ae.ClickOutside,()=>{p.value.length&&(R.value||(p.value.forEach(v=>o("close",v,D(v))),p.value=[]))}]]:[],g=e.withDirectives(e.h("ul",{key:String(n.collapse),role:"menubar",ref:h,style:J.value,class:{[c.b()]:!0,[c.m(n.mode)]:!0,[c.m("collapse")]:n.collapse}},[...d,...m]),l);return n.collapseTransition&&n.mode==="vertical"?e.h(be,()=>g):g}}});const Ie=a.buildProps({index:{type:a.definePropType([String,null]),default:null},route:{type:a.definePropType([String,Object])},disabled:Boolean}),_e={click:n=>a.isString(n.index)&&a.isArray(n.indexPath)},Z="ElMenuItem",Te=e.defineComponent({name:Z}),Se=e.defineComponent({...Te,props:Ie,emits:_e,setup(n,{expose:o,emit:i}){const s=n;a.isPropAbsent(s.index)&&f.debugWarn();const t=e.getCurrentInstance(),b=e.inject(Q),h=a.useNamespace("menu"),y=a.useNamespace("menu-item");b||f.throwError(Z,"can not inject root menu");const{parentMenu:c,indexPath:E}=ee(t,e.toRef(s,"index")),N=e.inject(`${U}${c.value.uid}`);N||f.throwError(Z,"can not inject sub menu");const C=e.computed(()=>s.index===b.activeIndex),p=e.reactive({index:s.index,indexPath:E,active:C}),x=()=>{s.disabled||(b.handleMenuItemClick({index:s.index,indexPath:E.value,route:s.route}),i("click",p))};return e.onMounted(()=>{N.addSubMenu(p),b.addMenuItem(p)}),e.onBeforeUnmount(()=>{N.removeSubMenu(p),b.removeMenuItem(p)}),o({parentMenu:c,rootMenu:b,active:C,nsMenu:h,nsMenuItem:y,handleClick:x}),(M,_)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([e.unref(y).b(),e.unref(y).is("active",e.unref(C)),e.unref(y).is("disabled",M.disabled)]),role:"menuitem",tabindex:"-1",onClick:x},[e.unref(c).type.name==="ElMenu"&&e.unref(b).props.collapse&&M.$slots.title?(e.openBlock(),e.createBlock(e.unref(f.ElTooltip),{key:0,effect:e.unref(b).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:e.unref(b).props.persistent,"focus-on-target":""},{content:e.withCtx(()=>[e.renderSlot(M.$slots,"title")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(h).be("tooltip","trigger"))},[e.renderSlot(M.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(M.$slots,"default"),e.renderSlot(M.$slots,"title")],64))],2))}});var ne=a._export_sfc(Se,[["__file","menu-item.vue"]]);const Ne={title:String},we=e.defineComponent({name:"ElMenuItemGroup"}),ke=e.defineComponent({...we,props:Ne,setup(n){const o=a.useNamespace("menu-item-group");return(i,s)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(e.unref(o).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("title"))},[i.$slots.title?e.renderSlot(i.$slots,"title",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.title),1)],64))],2),e.createElementVNode("ul",null,[e.renderSlot(i.$slots,"default")])],2))}});var oe=a._export_sfc(ke,[["__file","menu-item-group.vue"]]);const Oe=a.withInstall(xe,{MenuItem:ne,MenuItemGroup:oe,SubMenu:X}),Pe=a.withNoopInstall(ne);a.withNoopInstall(oe);a.withNoopInstall(X);exports.ElMenu=Oe;exports.ElMenuItem=Pe;