vue-devui 1.0.0-rc.9 → 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.
Files changed (200) hide show
  1. package/README.md +163 -149
  2. package/alert/index.es.js +12 -7
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8019 -254
  6. package/auto-complete/index.umd.js +29 -3
  7. package/auto-complete/style.css +1 -1
  8. package/badge/index.es.js +8 -2
  9. package/badge/index.umd.js +1 -1
  10. package/badge/style.css +1 -1
  11. package/button/index.es.js +104 -40
  12. package/button/index.umd.js +15 -15
  13. package/button/style.css +1 -1
  14. package/card/index.es.js +5 -1
  15. package/card/index.umd.js +1 -1
  16. package/card/style.css +1 -1
  17. package/checkbox/index.es.js +7772 -81
  18. package/checkbox/index.umd.js +27 -1
  19. package/checkbox/style.css +1 -1
  20. package/{date-picker → collapse}/index.d.ts +0 -0
  21. package/collapse/index.es.js +213 -0
  22. package/collapse/index.umd.js +1 -0
  23. package/{date-picker → collapse}/package.json +1 -1
  24. package/collapse/style.css +1 -0
  25. package/countdown/index.es.js +56 -13
  26. package/countdown/index.umd.js +1 -1
  27. package/date-picker-pro/index.d.ts +7 -0
  28. package/date-picker-pro/index.es.js +12020 -0
  29. package/date-picker-pro/index.umd.js +27 -0
  30. package/date-picker-pro/package.json +7 -0
  31. package/date-picker-pro/style.css +1 -0
  32. package/drawer/index.es.js +1 -1
  33. package/drawer/index.umd.js +1 -1
  34. package/drawer/style.css +1 -1
  35. package/dropdown/index.es.js +77 -121
  36. package/dropdown/index.umd.js +1 -1
  37. package/dropdown/style.css +1 -1
  38. package/editable-select/index.es.js +324 -104
  39. package/editable-select/index.umd.js +1 -1
  40. package/editable-select/style.css +1 -1
  41. package/form/index.es.js +91 -118
  42. package/form/index.umd.js +14 -14
  43. package/form/style.css +1 -1
  44. package/icon/index.es.js +106 -41
  45. package/icon/index.umd.js +1 -1
  46. package/icon/style.css +1 -1
  47. package/image-preview/style.css +1 -1
  48. package/input/index.es.js +8088 -169
  49. package/input/index.umd.js +27 -1
  50. package/input/style.css +1 -1
  51. package/input-number/index.es.js +8 -9
  52. package/input-number/index.umd.js +1 -1
  53. package/input-number/style.css +1 -1
  54. package/layout/index.es.js +1 -1
  55. package/layout/index.umd.js +1 -1
  56. package/loading/style.css +1 -1
  57. package/mention/index.d.ts +7 -0
  58. package/mention/index.es.js +8310 -0
  59. package/mention/index.umd.js +36 -0
  60. package/mention/package.json +7 -0
  61. package/mention/style.css +1 -0
  62. package/menu/index.d.ts +7 -0
  63. package/menu/index.es.js +934 -0
  64. package/menu/index.umd.js +1 -0
  65. package/menu/package.json +7 -0
  66. package/menu/style.css +1 -0
  67. package/message/index.d.ts +7 -0
  68. package/message/index.es.js +538 -0
  69. package/message/index.umd.js +1 -0
  70. package/message/package.json +7 -0
  71. package/message/style.css +1 -0
  72. package/modal/index.es.js +275 -185
  73. package/modal/index.umd.js +1 -1
  74. package/modal/style.css +1 -1
  75. package/notification/index.es.js +143 -72
  76. package/notification/index.umd.js +1 -1
  77. package/notification/style.css +1 -1
  78. package/nuxt/components/Collapse.js +3 -0
  79. package/nuxt/components/CollapseItem.js +3 -0
  80. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  81. package/nuxt/components/DatePickerPro.js +3 -0
  82. package/nuxt/components/IconGroup.js +3 -0
  83. package/nuxt/components/Mention.js +3 -0
  84. package/nuxt/components/Menu.js +3 -0
  85. package/nuxt/components/MenuItem.js +3 -0
  86. package/nuxt/components/Message.js +3 -0
  87. package/nuxt/components/OptionGroup.js +3 -0
  88. package/nuxt/components/RadioButton.js +3 -0
  89. package/nuxt/components/Step.js +3 -0
  90. package/nuxt/components/Steps.js +3 -0
  91. package/nuxt/components/SubMenu.js +3 -0
  92. package/nuxt/components/TABLE_TOKEN.js +3 -0
  93. package/nuxt/components/TimePicker.js +3 -0
  94. package/nuxt/components/TimeSelect.js +3 -0
  95. package/nuxt/components/animationInjectionKey.js +3 -0
  96. package/nuxt/components/collapseItemProps.js +3 -0
  97. package/nuxt/components/collapseProps.js +3 -0
  98. package/nuxt/components/datePickerProCommonProps.js +3 -0
  99. package/nuxt/components/datePickerProPanelProps.js +3 -0
  100. package/nuxt/components/datePickerProProps.js +3 -0
  101. package/nuxt/components/mentionProps.js +3 -0
  102. package/nuxt/components/messageProps.js +3 -0
  103. package/nuxt/components/roundInjectionKey.js +3 -0
  104. package/nuxt/components/skeletonItemProps.js +3 -0
  105. package/nuxt/components/stepProps.js +3 -0
  106. package/nuxt/components/stepsProps.js +3 -0
  107. package/nuxt/components/tableProps.js +3 -0
  108. package/nuxt/components/timerPickerPanelProps.js +3 -0
  109. package/nuxt/components/treeNodeProps.js +3 -0
  110. package/overlay/index.es.js +76 -139
  111. package/overlay/index.umd.js +1 -1
  112. package/overlay/style.css +1 -1
  113. package/package.json +6 -3
  114. package/pagination/index.es.js +175 -7
  115. package/pagination/index.umd.js +1 -1
  116. package/pagination/style.css +1 -1
  117. package/panel/style.css +1 -1
  118. package/popover/index.es.js +101 -162
  119. package/popover/index.umd.js +17 -17
  120. package/popover/style.css +1 -1
  121. package/progress/style.css +1 -1
  122. package/radio/index.es.js +7854 -58
  123. package/radio/index.umd.js +27 -1
  124. package/radio/style.css +1 -1
  125. package/rate/style.css +1 -1
  126. package/result/index.es.js +92 -41
  127. package/result/index.umd.js +1 -1
  128. package/result/style.css +1 -1
  129. package/search/index.es.js +3729 -1206
  130. package/search/index.umd.js +18 -18
  131. package/search/style.css +1 -1
  132. package/select/index.es.js +4426 -2501
  133. package/select/index.umd.js +17 -17
  134. package/select/style.css +1 -1
  135. package/skeleton/index.es.js +87 -261
  136. package/skeleton/index.umd.js +1 -1
  137. package/skeleton/style.css +1 -1
  138. package/slider/index.es.js +116 -143
  139. package/slider/index.umd.js +1 -1
  140. package/slider/style.css +1 -1
  141. package/splitter/index.es.js +256 -147
  142. package/splitter/index.umd.js +16 -16
  143. package/splitter/style.css +1 -1
  144. package/statistic/index.es.js +34 -16
  145. package/statistic/index.umd.js +1 -1
  146. package/statistic/style.css +1 -1
  147. package/status/style.css +1 -1
  148. package/steps/index.d.ts +7 -0
  149. package/steps/index.es.js +386 -0
  150. package/steps/index.umd.js +1 -0
  151. package/steps/package.json +7 -0
  152. package/steps/style.css +1 -0
  153. package/style.css +1 -1
  154. package/switch/index.es.js +7779 -60
  155. package/switch/index.umd.js +27 -1
  156. package/switch/style.css +1 -1
  157. package/table/index.es.js +4092 -1464
  158. package/table/index.umd.js +17 -17
  159. package/table/style.css +1 -1
  160. package/tabs/index.es.js +224 -77
  161. package/tabs/index.umd.js +1 -1
  162. package/tabs/style.css +1 -1
  163. package/tag/index.es.js +5 -1
  164. package/tag/index.umd.js +1 -1
  165. package/tag/style.css +1 -1
  166. package/textarea/index.es.js +3357 -1064
  167. package/textarea/index.umd.js +19 -19
  168. package/textarea/style.css +1 -1
  169. package/time-picker/index.d.ts +7 -0
  170. package/time-picker/index.es.js +9549 -0
  171. package/time-picker/index.umd.js +27 -0
  172. package/time-picker/package.json +7 -0
  173. package/time-picker/style.css +1 -0
  174. package/time-select/index.d.ts +7 -0
  175. package/time-select/index.es.js +9585 -0
  176. package/time-select/index.umd.js +27 -0
  177. package/time-select/package.json +7 -0
  178. package/time-select/style.css +1 -0
  179. package/timeline/index.es.js +92 -41
  180. package/timeline/index.umd.js +1 -1
  181. package/timeline/style.css +1 -1
  182. package/tooltip/index.es.js +100 -163
  183. package/tooltip/index.umd.js +16 -16
  184. package/tooltip/style.css +1 -1
  185. package/tree/index.es.js +11036 -608
  186. package/tree/index.umd.js +27 -1
  187. package/tree/style.css +1 -1
  188. package/upload/index.es.js +389 -105
  189. package/upload/index.umd.js +1 -1
  190. package/upload/style.css +1 -1
  191. package/vue-devui.es.js +17291 -9726
  192. package/vue-devui.umd.js +24 -23
  193. package/date-picker/index.es.js +0 -1298
  194. package/date-picker/index.umd.js +0 -1
  195. package/date-picker/style.css +0 -1
  196. package/nuxt/components/DatePicker.js +0 -3
  197. package/nuxt/components/StickSlider.js +0 -3
  198. package/nuxt/components/formControlProps.js +0 -3
  199. package/nuxt/components/overlayEmits.js +0 -3
  200. package/nuxt/components/overlayProps.js +0 -3
@@ -0,0 +1,934 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import { ref, defineComponent, getCurrentInstance, inject, toRefs, computed, createVNode, watch, onMounted, Transition, withDirectives, vShow, watchEffect, provide, reactive } from "vue";
8
+ function createBem(namespace, element, modifier) {
9
+ let cls = namespace;
10
+ if (element) {
11
+ cls += `__${element}`;
12
+ }
13
+ if (modifier) {
14
+ cls += `--${modifier}`;
15
+ }
16
+ return cls;
17
+ }
18
+ function useNamespace(block, needDot = false) {
19
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
20
+ const b = () => createBem(namespace);
21
+ const e = (element) => element ? createBem(namespace, element) : "";
22
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
23
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
24
+ return {
25
+ b,
26
+ e,
27
+ m,
28
+ em
29
+ };
30
+ }
31
+ const elements = [];
32
+ let parents = [];
33
+ const defaultIndent = ref(24);
34
+ const ns$5 = useNamespace("menu");
35
+ const subNs$2 = useNamespace("submenu");
36
+ const menuClass = ns$5.b();
37
+ const menuItemHorizontalWrapper = `${ns$5.b()}-item-horizontal-wrapper`;
38
+ const menuItemSelect$1 = `${ns$5.b()}-item-select`;
39
+ const menuActiveParent = `${ns$5.b()}-active-parent`;
40
+ function setDefaultIndent(indent) {
41
+ defaultIndent.value = indent;
42
+ }
43
+ function pushElement(element) {
44
+ elements.push(element);
45
+ }
46
+ function addLayer() {
47
+ parents = [];
48
+ elements.forEach((val) => {
49
+ parents.push(val.el.parentElement);
50
+ });
51
+ const stack = [...parents];
52
+ const getLayerFromClass = (className) => {
53
+ var _a;
54
+ return (_a = /layer_(\d*)/gim.exec(className)) == null ? void 0 : _a[1];
55
+ };
56
+ while (stack.length) {
57
+ const shiftItem = stack.shift();
58
+ if (shiftItem == null ? void 0 : shiftItem.classList.contains(menuClass)) {
59
+ const children = shiftItem.children;
60
+ stack.unshift(...Array.from(children));
61
+ continue;
62
+ } else {
63
+ if (shiftItem.tagName === "DIV") {
64
+ if (shiftItem.classList.contains(`${ns$5.b()}-item-vertical-wrapper`) || shiftItem.classList.contains(`${subNs$2.b()}-menu-item-vertical-wrapper`)) {
65
+ const parent = shiftItem.parentElement;
66
+ stack.unshift(...Array.from(shiftItem.children));
67
+ if (parent == null ? void 0 : parent.classList.contains(menuClass)) {
68
+ shiftItem.classList.add("layer_1");
69
+ } else {
70
+ let layer = getLayerFromClass((parent == null ? void 0 : parent.classList.value) || "");
71
+ layer = Number(layer);
72
+ shiftItem.classList.add(`layer_${layer}`);
73
+ }
74
+ } else {
75
+ const parent = shiftItem.parentElement;
76
+ let layer = getLayerFromClass((parent == null ? void 0 : parent.classList.value) || "");
77
+ layer = Number(layer);
78
+ shiftItem.classList.add(`layer_${layer}`);
79
+ shiftItem.style.paddingLeft = `${(layer === 2 ? 1 : layer - 1) * defaultIndent.value}px`;
80
+ }
81
+ }
82
+ if (shiftItem.tagName === "UL") {
83
+ const parent = shiftItem.parentElement;
84
+ const children = shiftItem.children;
85
+ for (let i = 0; i < children.length; i++) {
86
+ stack.unshift(children[i]);
87
+ }
88
+ const classList = (parent == null ? void 0 : parent.classList.value) || "";
89
+ let layer = getLayerFromClass(classList);
90
+ if (parent == null ? void 0 : parent.classList.contains(menuClass)) {
91
+ layer = 1;
92
+ shiftItem.classList.add(`layer_${2}`);
93
+ } else {
94
+ shiftItem.classList.add(`layer_${Number(layer) + 1}`);
95
+ layer = Number(layer) + 1;
96
+ }
97
+ }
98
+ if (shiftItem.tagName === "LI") {
99
+ const parent = shiftItem.parentElement;
100
+ const parentClassList = (parent == null ? void 0 : parent.classList.value) || "";
101
+ let layer = getLayerFromClass(parentClassList);
102
+ getLayerFromClass(parentClassList);
103
+ layer = Number(layer);
104
+ shiftItem.style.padding = `0 ${layer * defaultIndent.value}px`;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ function getRoot(path) {
110
+ var _a;
111
+ const paths = path;
112
+ let rootElement = null;
113
+ for (let i = 0; i < paths.length; i++) {
114
+ const p = paths[i];
115
+ if ((_a = p == null ? void 0 : p.classList) == null ? void 0 : _a.contains(`${ns$5.b()}-horizontal`)) {
116
+ rootElement = p;
117
+ }
118
+ }
119
+ return rootElement;
120
+ }
121
+ function clearSelect_isHorizontal(ele, event) {
122
+ let element = event.target;
123
+ let stack = [];
124
+ const { path } = event;
125
+ const root = getRoot(path);
126
+ stack = [...Array.from(root.children)];
127
+ if (element.tagName === "SPAN") {
128
+ element = element.parentElement;
129
+ }
130
+ while (stack.length) {
131
+ const shiftItem = stack.shift();
132
+ if ((shiftItem == null ? void 0 : shiftItem.tagName) === "UL" || (shiftItem == null ? void 0 : shiftItem.classList.contains(menuItemHorizontalWrapper))) {
133
+ const children = shiftItem == null ? void 0 : shiftItem.children;
134
+ stack.unshift(...Array.from(children));
135
+ }
136
+ if (shiftItem !== element) {
137
+ shiftItem == null ? void 0 : shiftItem.classList.remove(menuItemSelect$1);
138
+ shiftItem == null ? void 0 : shiftItem.classList.remove(menuActiveParent);
139
+ }
140
+ }
141
+ }
142
+ function clearSelect_notHorizontal(ele, event) {
143
+ const stack = [];
144
+ const path = event.path || event.composedPath && event.composedPath();
145
+ for (let i = 0; i < path.length; i++) {
146
+ const e = path[i];
147
+ if (!e.classList.contains(menuClass)) {
148
+ stack.push(...Array.from(e.children));
149
+ } else {
150
+ stack.push(...Array.from(e.children));
151
+ break;
152
+ }
153
+ }
154
+ while (stack.length) {
155
+ const shiftItem = stack.shift();
156
+ if ((shiftItem == null ? void 0 : shiftItem.tagName) === "UL" || (shiftItem == null ? void 0 : shiftItem.classList.contains(menuItemHorizontalWrapper))) {
157
+ stack.push(...Array.from(shiftItem == null ? void 0 : shiftItem.children));
158
+ }
159
+ if (shiftItem !== ele) {
160
+ if ((shiftItem == null ? void 0 : shiftItem.tagName) === "DIV") {
161
+ stack.unshift(...Array.from(shiftItem == null ? void 0 : shiftItem.children));
162
+ }
163
+ shiftItem == null ? void 0 : shiftItem.classList.remove(menuItemSelect$1);
164
+ shiftItem == null ? void 0 : shiftItem.classList.remove(menuActiveParent);
165
+ }
166
+ }
167
+ }
168
+ function clearSelect(ele, event, isHorizontal = false) {
169
+ if (isHorizontal) {
170
+ clearSelect_isHorizontal(ele, event);
171
+ } else {
172
+ clearSelect_notHorizontal(ele, event);
173
+ }
174
+ }
175
+ function getLayer(el) {
176
+ var _a;
177
+ const getLayerReg = /layer_(\d{1,})/gim;
178
+ const className = el.className;
179
+ return (_a = getLayerReg.exec(className)) == null ? void 0 : _a[1];
180
+ }
181
+ const menuItemProps = {
182
+ disabled: {
183
+ type: Boolean,
184
+ default: false
185
+ },
186
+ href: {
187
+ type: String,
188
+ default: ""
189
+ },
190
+ route: {
191
+ type: [String, Object]
192
+ }
193
+ };
194
+ const ns$4 = useNamespace("menu");
195
+ function initSelect(defaultSelectKeys, keys, isMultiple, disabled) {
196
+ const isSelect = ref(false);
197
+ if (!isMultiple) {
198
+ if (defaultSelectKeys[0] === keys && !disabled.value) {
199
+ isSelect.value = true;
200
+ } else {
201
+ isSelect.value = false;
202
+ }
203
+ } else {
204
+ if (defaultSelectKeys.includes(keys)) {
205
+ isSelect.value = true;
206
+ } else {
207
+ isSelect.value = false;
208
+ }
209
+ }
210
+ return isSelect.value;
211
+ }
212
+ function addActiveParent(ele) {
213
+ var _a, _b;
214
+ let cur = ele.parentElement;
215
+ while (!cur.classList.contains(ns$4.b())) {
216
+ if (((_a = cur.firstElementChild) == null ? void 0 : _a.tagName) === "DIV") {
217
+ (_b = cur == null ? void 0 : cur.firstElementChild) == null ? void 0 : _b.classList.add(`${ns$4.b()}-active-parent`);
218
+ }
219
+ cur = cur.parentElement;
220
+ }
221
+ return cur;
222
+ }
223
+ function changeRoute(props, router, useRouter, key) {
224
+ if (useRouter && router) {
225
+ const route = props.route || key;
226
+ const routerResult = router.push(route).then((res) => {
227
+ return res;
228
+ });
229
+ return { route, routerResult };
230
+ }
231
+ return void 0;
232
+ }
233
+ const ns$3 = useNamespace("menu");
234
+ function useClick(e) {
235
+ const paths = e.path;
236
+ for (let i = 0; i < paths.length; i++) {
237
+ const path = paths[i];
238
+ if (path.classList.contains(`${ns$3.b()}-horizontal`)) {
239
+ break;
240
+ } else if (path.classList.contains(`${ns$3.b()}-item-horizontal-wrapper`)) {
241
+ continue;
242
+ } else {
243
+ if (path.tagName !== "SPAN") {
244
+ path.classList.add(`${ns$3.b()}-item-select`);
245
+ }
246
+ }
247
+ }
248
+ }
249
+ const ns$2 = useNamespace("menu");
250
+ const menuItemSelect = `${ns$2.b()}-item-select`;
251
+ const menuItemDisabled = `${ns$2.b()}-item-disabled`;
252
+ var MenuItem = defineComponent({
253
+ name: "DMenuItem",
254
+ props: menuItemProps,
255
+ setup(props, ctx) {
256
+ var _a, _b;
257
+ const instance = getCurrentInstance();
258
+ const key = String(instance == null ? void 0 : instance.vnode.key);
259
+ const menuStore = inject("menuStore");
260
+ const mode = inject("mode");
261
+ const multiple = inject("multiple");
262
+ const indent = inject("defaultIndent");
263
+ const isCollapsed = inject("isCollapsed");
264
+ const defaultSelectKey = inject("defaultSelectKey");
265
+ const {
266
+ disabled
267
+ } = toRefs(props);
268
+ const isSelect = ref(initSelect(defaultSelectKey, key, multiple, disabled));
269
+ const isLayer1 = ref(true);
270
+ const rootMenuEmit = inject("rootMenuEmit");
271
+ const useRouter = inject("useRouter");
272
+ const router = instance == null ? void 0 : instance.appContext.config.globalProperties.$router;
273
+ const classObject = computed(() => ({
274
+ [`${ns$2.b()}-item`]: true,
275
+ [`${ns$2.b()}-item-isCollapsed`]: isCollapsed.value,
276
+ [menuItemSelect]: isSelect.value,
277
+ [menuItemDisabled]: disabled.value
278
+ }));
279
+ menuStore.on("menuItem:clear:select", () => {
280
+ isSelect.value = false;
281
+ });
282
+ const onClick = (e) => {
283
+ var _a2;
284
+ e.stopPropagation();
285
+ const ele = e.currentTarget;
286
+ let changeRouteResult = void 0;
287
+ props.disabled && e.preventDefault();
288
+ if (!props.disabled) {
289
+ if (!multiple) {
290
+ menuStore.emit("menuItem:clear:select");
291
+ clearSelect(ele, e, mode.value === "horizontal");
292
+ if (mode.value === "horizontal") {
293
+ useClick(e);
294
+ }
295
+ isSelect.value = true;
296
+ changeRouteResult = changeRoute(props, router, useRouter, key);
297
+ } else {
298
+ if (ele.classList.contains(menuItemSelect)) {
299
+ rootMenuEmit("deselect", {
300
+ type: "deselect",
301
+ key,
302
+ el: ele,
303
+ e
304
+ });
305
+ isSelect.value = false;
306
+ return;
307
+ } else {
308
+ isSelect.value = true;
309
+ ele.classList.add(menuItemSelect);
310
+ }
311
+ }
312
+ if (changeRouteResult === void 0) {
313
+ rootMenuEmit("select", {
314
+ type: "select",
315
+ key,
316
+ el: ele,
317
+ e
318
+ });
319
+ } else {
320
+ rootMenuEmit("select", {
321
+ type: "select",
322
+ key,
323
+ el: ele,
324
+ e,
325
+ route: changeRouteResult
326
+ });
327
+ }
328
+ }
329
+ if (mode.value === "vertical") {
330
+ const target = e.currentTarget;
331
+ addActiveParent(target);
332
+ }
333
+ if (mode.value === "horizontal") {
334
+ const ul = (_a2 = ele.parentElement) == null ? void 0 : _a2.parentElement;
335
+ ul == null ? void 0 : ul.classList.add(`${ns$2.b()}-active-parent`);
336
+ }
337
+ };
338
+ const icons = createVNode("span", {
339
+ "class": `${ns$2.b()}-icon`
340
+ }, [(_b = (_a = ctx.slots).icon) == null ? void 0 : _b.call(_a)]);
341
+ const menuItems = ref(null);
342
+ watch(disabled, () => {
343
+ if (!multiple) {
344
+ classObject.value[menuItemSelect] = false;
345
+ }
346
+ });
347
+ watch(() => defaultSelectKey, (n) => {
348
+ isSelect.value = initSelect(n, key, multiple, disabled);
349
+ classObject.value[menuItemSelect] = isSelect.value;
350
+ });
351
+ onMounted(() => {
352
+ var _a2, _b2;
353
+ let oldPadding = "";
354
+ const ele = menuItems.value;
355
+ if (mode.value === "vertical") {
356
+ if ((_b2 = (_a2 = ele.parentElement) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b2.classList.contains(ns$2.b())) {
357
+ isLayer1.value = true;
358
+ if (isLayer1.value) {
359
+ ele.style.paddingRight = ``;
360
+ ele.style.paddingLeft = `${indent}px`;
361
+ }
362
+ watch(isCollapsed, (val) => {
363
+ if (val) {
364
+ if (ele.style.padding !== "0") {
365
+ oldPadding = ele.style.padding;
366
+ }
367
+ setTimeout(() => {
368
+ ele.style.padding = "0";
369
+ ele.style.width = "";
370
+ ele.style.textAlign = `center`;
371
+ }, 300);
372
+ ele.style.display = `block`;
373
+ } else {
374
+ ele.style.padding = `${oldPadding}`;
375
+ ele.style.textAlign = ``;
376
+ ele.style.display = `flex`;
377
+ }
378
+ });
379
+ } else {
380
+ isLayer1.value = false;
381
+ }
382
+ }
383
+ });
384
+ return () => {
385
+ return mode.value === "vertical" ? createVNode("div", {
386
+ "class": `${ns$2.b()}-item-vertical-wrapper`
387
+ }, [createVNode("li", {
388
+ "class": classObject.value,
389
+ "onClick": onClick,
390
+ "ref": menuItems
391
+ }, [ctx.slots.icon !== void 0 && icons, props.href === "" ? createVNode(Transition, {
392
+ "name": "fade"
393
+ }, {
394
+ default: () => {
395
+ var _a2, _b2;
396
+ return [withDirectives(createVNode("span", null, [(_b2 = (_a2 = ctx.slots).default) == null ? void 0 : _b2.call(_a2)]), [[vShow, !isCollapsed.value]])];
397
+ }
398
+ }) : createVNode("a", {
399
+ "href": props.href
400
+ }, [createVNode(Transition, {
401
+ "name": "fade"
402
+ }, {
403
+ default: () => {
404
+ var _a2, _b2;
405
+ return [(_b2 = (_a2 = ctx.slots).default) == null ? void 0 : _b2.call(_a2)];
406
+ }
407
+ })])])]) : createVNode("li", {
408
+ "class": classObject.value,
409
+ "onClick": onClick,
410
+ "ref": menuItems
411
+ }, [ctx.slots.icon !== void 0 && icons, props.href === "" ? createVNode(Transition, {
412
+ "name": "fade"
413
+ }, {
414
+ default: () => {
415
+ var _a2, _b2;
416
+ return [withDirectives(createVNode("span", null, [(_b2 = (_a2 = ctx.slots).default) == null ? void 0 : _b2.call(_a2)]), [[vShow, !isCollapsed.value]])];
417
+ }
418
+ }) : createVNode("a", {
419
+ "href": props.href
420
+ }, [createVNode(Transition, {
421
+ "name": "fade"
422
+ }, {
423
+ default: () => {
424
+ var _a2, _b2;
425
+ return [(_b2 = (_a2 = ctx.slots).default) == null ? void 0 : _b2.call(_a2)];
426
+ }
427
+ })])]);
428
+ };
429
+ }
430
+ });
431
+ function randomId(n = 8) {
432
+ const str = "abcdefghijklmnopqrstuvwxyz0123456789";
433
+ let result = "";
434
+ for (let i = 0; i < n; i++) {
435
+ result += str[parseInt((Math.random() * str.length).toString())];
436
+ }
437
+ return result;
438
+ }
439
+ function useNearestMenuElement(ele) {
440
+ while (ele && ele.tagName !== "LI" && ele.tagName !== "UL") {
441
+ ele = ele.parentElement;
442
+ }
443
+ return ele;
444
+ }
445
+ const elTransition = "0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out";
446
+ const TransitionObj = {
447
+ "before-enter"(el) {
448
+ el.style.transition = elTransition;
449
+ el.setAttribute("data-oldPadding", el.style.padding);
450
+ el.setAttribute("data-oldMargin", el.style.margin);
451
+ el.style.height = "0";
452
+ el.style.padding = "0";
453
+ el.style.margin = "0";
454
+ },
455
+ enter(el) {
456
+ el.dataset.oldOverflow = el.style.overflow;
457
+ if (el.scrollHeight !== 0) {
458
+ el.style.height = el.scrollHeight + "px";
459
+ } else {
460
+ el.style.height = "";
461
+ }
462
+ el.style.padding = el.getAttribute("data-oldPadding");
463
+ el.style.margin = el.getAttribute("data-oldMargin");
464
+ el.style.overflow = "hidden";
465
+ },
466
+ "after-enter"(el) {
467
+ el.style.transition = "";
468
+ el.style.transition = "";
469
+ el.style.height = "";
470
+ el.style.overflow = el.getAttribute("data-overflow");
471
+ },
472
+ "before-leave"(el) {
473
+ if (!el.dataset) {
474
+ el.dataset = {};
475
+ }
476
+ el.dataset.oldPaddingTop = el.style.paddingTop;
477
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
478
+ el.dataset.oldOverflow = el.style.overflow;
479
+ el.style.height = el.scrollHeight + "px";
480
+ el.style.overflow = "hidden";
481
+ },
482
+ leave(el) {
483
+ if (el.scrollHeight !== 0) {
484
+ el.style.transition = elTransition;
485
+ el.style.height = "0";
486
+ el.style.paddingTop = "0";
487
+ el.style.paddingBottom = "0";
488
+ }
489
+ },
490
+ "after-leave"(el) {
491
+ el.style.transition = "";
492
+ el.style.height = "";
493
+ el.style.overflow = el.dataset.oldOverflow;
494
+ el.style.paddingTop = el.dataset.oldPaddingTop;
495
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
496
+ }
497
+ };
498
+ var MenuTransition = defineComponent({
499
+ name: "DMenuTransition",
500
+ setup(prop, ctx) {
501
+ return () => {
502
+ return createVNode(Transition, {
503
+ "onBeforeEnter": (e) => TransitionObj["before-enter"](e),
504
+ "onBeforeLeave": (e) => TransitionObj["before-leave"](e),
505
+ "onEnter": (e) => TransitionObj["enter"](e),
506
+ "onAfterEnter": (e) => TransitionObj["after-enter"](e),
507
+ "onLeave": (e) => TransitionObj["leave"](e),
508
+ "onAfterLeave": (e) => TransitionObj["after-leave"](e)
509
+ }, {
510
+ default: () => {
511
+ var _a, _b;
512
+ return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
513
+ }
514
+ });
515
+ };
516
+ }
517
+ });
518
+ const subMenuProps = {
519
+ title: {
520
+ type: String,
521
+ default: ""
522
+ },
523
+ disabled: {
524
+ type: Boolean,
525
+ default: false
526
+ }
527
+ };
528
+ const ns$1 = useNamespace("menu");
529
+ const subNs$1 = useNamespace("submenu");
530
+ const menuItemHorizontalWrapperHidden = `${ns$1.b()}-item-horizontal-wrapper-hidden`;
531
+ const menuItemHorizontalWrapperShow = `${ns$1.b()}-item-horizontal-wrapper-show`;
532
+ function useShowSubMenu(eventName, e, wrapper) {
533
+ const target = e.currentTarget;
534
+ const targetParent = target.parentElement;
535
+ const wrapperChildren = wrapper.children;
536
+ wrapper.style.padding = `0 20px !important`;
537
+ if (eventName === "mouseenter") {
538
+ if ((targetParent == null ? void 0 : targetParent.tagName) === "DIV") {
539
+ wrapper.classList.add(`${ns$1.b()}-item-horizontal-wrapper-level`);
540
+ const { width } = target.getClientRects()[0];
541
+ wrapper.style.top = `0px`;
542
+ wrapper.style.left = `${width}px`;
543
+ } else {
544
+ wrapper.style.top = `26px`;
545
+ wrapper.style.left = `0px`;
546
+ }
547
+ wrapper.classList.remove(menuItemHorizontalWrapperHidden);
548
+ wrapper.classList.add(menuItemHorizontalWrapperShow);
549
+ for (let i = 0; i < wrapperChildren.length; i++) {
550
+ const ul = wrapperChildren[i];
551
+ if (ul.tagName === "UL" && ul.classList.contains(subNs$1.b())) {
552
+ const levelUlWrapper = ul.getElementsByClassName(`${ns$1.b()}-item-horizontal-wrapper`)[0];
553
+ ul.addEventListener("mouseenter", (ev) => {
554
+ ev.stopPropagation();
555
+ useShowSubMenu("mouseenter", ev, levelUlWrapper);
556
+ levelUlWrapper.classList.remove(menuItemHorizontalWrapperHidden);
557
+ levelUlWrapper.classList.add(menuItemHorizontalWrapperShow);
558
+ });
559
+ ul.addEventListener("mouseleave", (ev) => {
560
+ ev.stopPropagation();
561
+ useShowSubMenu("mouseleave", ev, levelUlWrapper);
562
+ levelUlWrapper.classList.remove(menuItemHorizontalWrapperShow);
563
+ levelUlWrapper.classList.add(menuItemHorizontalWrapperHidden);
564
+ });
565
+ }
566
+ }
567
+ }
568
+ if (eventName === "mouseleave") {
569
+ wrapper.classList.remove(menuItemHorizontalWrapperShow);
570
+ wrapper.classList.add(menuItemHorizontalWrapperHidden);
571
+ }
572
+ }
573
+ const ns = useNamespace("menu");
574
+ const subNs = useNamespace("submenu");
575
+ const subMenuClass = subNs.b();
576
+ var SubMenu = defineComponent({
577
+ name: "DSubMenu",
578
+ props: subMenuProps,
579
+ setup(props, ctx) {
580
+ const isShow = ref(true);
581
+ const {
582
+ vnode: {
583
+ key
584
+ }
585
+ } = getCurrentInstance();
586
+ let key_ = String(key);
587
+ const defaultOpenKeys = inject("openKeys");
588
+ const isOpen = ref(defaultOpenKeys.value.includes(key_));
589
+ const indent = inject("defaultIndent");
590
+ const isCollapsed = inject("isCollapsed");
591
+ const mode = inject("mode");
592
+ const subMenuItemContainer = ref(null);
593
+ const parentEmit = inject("rootMenuEmit");
594
+ const isHorizontal = mode.value === "horizontal";
595
+ if (key_ === "null") {
596
+ console.warn(`[devui][menu]: Key can not be null`);
597
+ key_ = `randomKey-${randomId(16)}`;
598
+ }
599
+ const clickHandle = (e) => {
600
+ e.stopPropagation();
601
+ const ele = useNearestMenuElement(e.target);
602
+ if (ele.classList.contains(subMenuClass) && isHorizontal) {
603
+ return;
604
+ }
605
+ if (isHorizontal) {
606
+ clearSelect(ele, e, true);
607
+ useClick(e);
608
+ }
609
+ if (!props.disabled && mode.value !== "horizontal") {
610
+ const cur = useNearestMenuElement(e.target);
611
+ const idx = defaultOpenKeys.value.indexOf(key_);
612
+ if (idx >= 0 && cur.tagName === "UL") {
613
+ defaultOpenKeys.value.splice(idx, 1);
614
+ } else {
615
+ if (cur.tagName === "UL") {
616
+ defaultOpenKeys.value.push(key_);
617
+ }
618
+ }
619
+ isOpen.value = defaultOpenKeys.value.indexOf(key_) >= 0;
620
+ parentEmit("submenu-change", {
621
+ type: "submenu-change",
622
+ state: isOpen.value,
623
+ key: key_,
624
+ el: ele
625
+ });
626
+ }
627
+ };
628
+ const wrapper = ref(null);
629
+ let wrapperDom;
630
+ const subMenu = ref(null);
631
+ const title = ref(null);
632
+ let oldPadding = "";
633
+ const class_layer = ref("");
634
+ watchEffect(() => {
635
+ wrapperDom = wrapper.value;
636
+ pushElement({
637
+ el: subMenu.value
638
+ });
639
+ }, {
640
+ flush: "post"
641
+ });
642
+ watch(() => defaultOpenKeys, (n) => {
643
+ if (n.value.includes(key_)) {
644
+ isOpen.value = true;
645
+ } else {
646
+ isOpen.value = false;
647
+ }
648
+ }, {
649
+ deep: true
650
+ });
651
+ onMounted(() => {
652
+ var _a;
653
+ const subMenuTitle = title.value;
654
+ const subMenuWrapper = subMenu.value;
655
+ addLayer();
656
+ class_layer.value = `layer_${(_a = Array.from(subMenuWrapper.classList).at(-1)) == null ? void 0 : _a.replace("layer_", "")}`;
657
+ if (isHorizontal && !props.disabled) {
658
+ subMenu.value.addEventListener("mouseenter", (ev) => {
659
+ ev.stopPropagation();
660
+ useShowSubMenu("mouseenter", ev, wrapperDom);
661
+ });
662
+ subMenu.value.addEventListener("mouseleave", (ev) => {
663
+ ev.stopPropagation();
664
+ useShowSubMenu("mouseleave", ev, wrapperDom);
665
+ });
666
+ }
667
+ watch(isCollapsed, (newValue) => {
668
+ const layer = Number(getLayer(subMenuWrapper));
669
+ if (!Number.isNaN(layer)) {
670
+ layer > 2 && (isShow.value = !isCollapsed.value);
671
+ }
672
+ if (newValue) {
673
+ subMenuTitle.style.padding !== "0" && (oldPadding = subMenuTitle.style.padding);
674
+ setTimeout(() => {
675
+ subMenuTitle.style.padding = "0";
676
+ subMenuTitle.style.width = "";
677
+ subMenuTitle.style.textAlign = `center`;
678
+ }, 300);
679
+ subMenuTitle.style.display = `block`;
680
+ } else {
681
+ subMenuTitle.style.padding = `${oldPadding}`;
682
+ subMenuTitle.style.textAlign = ``;
683
+ subMenuTitle.style.display = `flex`;
684
+ }
685
+ });
686
+ });
687
+ return () => {
688
+ var _a, _b, _c, _d;
689
+ return withDirectives(createVNode("ul", {
690
+ "onClick": clickHandle,
691
+ "class": [subMenuClass, class_layer.value, props["disabled"] && `${subMenuClass}-disabled`],
692
+ "ref": subMenu
693
+ }, [createVNode("div", {
694
+ "class": [`${subMenuClass}-title`],
695
+ "style": `padding: 0 ${indent}px`,
696
+ "ref": title
697
+ }, [createVNode("span", {
698
+ "class": `${ns.b()}-icon`
699
+ }, [(_b = (_a = ctx.slots) == null ? void 0 : _a.icon) == null ? void 0 : _b.call(_a)]), withDirectives(createVNode("span", {
700
+ "class": `${subMenuClass}-title-content`
701
+ }, [props.title]), [[vShow, !isCollapsed.value]]), withDirectives(createVNode("i", {
702
+ "class": {
703
+ "icon icon-chevron-up": class_layer.value !== `layer_${subMenuClass}`,
704
+ "icon icon-chevron-right": class_layer.value === `layer_${subMenuClass}`,
705
+ "is-opened": isOpen.value
706
+ }
707
+ }, null), [[vShow, !isCollapsed.value && key !== "overflowContainer"]])]), isHorizontal ? withDirectives(createVNode("div", {
708
+ "class": `${ns.b()}-item-horizontal-wrapper ${ns.b()}-item-horizontal-wrapper-hidden`,
709
+ "ref": wrapper
710
+ }, [(_d = (_c = ctx.slots).default) == null ? void 0 : _d.call(_c)]), [[vShow, !props.disabled]]) : createVNode(MenuTransition, null, {
711
+ default: () => {
712
+ var _a2, _b2;
713
+ return [withDirectives(createVNode("div", {
714
+ "class": [`${subMenuClass}-menu-item-vertical-wrapper`],
715
+ "ref": subMenuItemContainer
716
+ }, [(_b2 = (_a2 = ctx.slots).default) == null ? void 0 : _b2.call(_a2)]), [[vShow, isOpen.value]])];
717
+ }
718
+ })]), [[vShow, isShow.value]]);
719
+ };
720
+ }
721
+ });
722
+ const menuProps = {
723
+ width: {
724
+ type: String,
725
+ default: ""
726
+ },
727
+ collapsed: {
728
+ type: Boolean,
729
+ default: false
730
+ },
731
+ collapsedIndent: {
732
+ type: Number,
733
+ default: 24
734
+ },
735
+ indentSize: {
736
+ type: Number,
737
+ default: 24
738
+ },
739
+ multiple: {
740
+ type: Boolean,
741
+ default: false
742
+ },
743
+ openKeys: {
744
+ type: Array,
745
+ default: []
746
+ },
747
+ defaultSelectKeys: {
748
+ type: Array,
749
+ default: []
750
+ },
751
+ mode: {
752
+ type: String,
753
+ default: "vertical"
754
+ },
755
+ router: {
756
+ type: Boolean,
757
+ default: false
758
+ }
759
+ };
760
+ var menu = "";
761
+ const recordTable = {};
762
+ class Store {
763
+ constructor(rootName) {
764
+ __publicField(this, "rootMenuName");
765
+ this.rootMenuName = rootName;
766
+ }
767
+ on(eventName, fn) {
768
+ var _a;
769
+ if (!((_a = recordTable == null ? void 0 : recordTable[this.rootMenuName]) == null ? void 0 : _a[eventName])) {
770
+ Reflect.set(recordTable[this.rootMenuName], eventName, []);
771
+ }
772
+ recordTable[this.rootMenuName][eventName].push(fn);
773
+ }
774
+ emit(eventName, ...args) {
775
+ recordTable[this.rootMenuName][eventName].forEach((fn) => fn(...args));
776
+ }
777
+ off(eventName, fn) {
778
+ const idx = recordTable[this.rootMenuName][eventName].indexOf(fn);
779
+ if (idx >= 0) {
780
+ recordTable[this.rootMenuName][eventName].splice(idx, 1);
781
+ }
782
+ }
783
+ }
784
+ function useStore(rootName) {
785
+ if (!recordTable[rootName]) {
786
+ Reflect.set(recordTable, rootName, {});
787
+ }
788
+ return new Store(rootName);
789
+ }
790
+ var Menu = defineComponent({
791
+ name: "DMenu",
792
+ props: menuProps,
793
+ emits: ["select", "deselect", "submenu-change"],
794
+ setup(props, ctx) {
795
+ const ns2 = useNamespace("menu");
796
+ const {
797
+ openKeys,
798
+ mode,
799
+ collapsed
800
+ } = toRefs(props);
801
+ const menuId = randomId(16);
802
+ const store = useStore(menuId);
803
+ provide("menuStore", store);
804
+ provide("isCollapsed", collapsed);
805
+ provide("defaultIndent", props["indentSize"]);
806
+ provide("multiple", props["multiple"]);
807
+ provide("openKeys", openKeys);
808
+ provide("defaultSelectKey", props.defaultSelectKeys);
809
+ provide("mode", mode);
810
+ provide("collapsedIndent", props["collapsedIndent"]);
811
+ provide("rootMenuEmit", ctx.emit);
812
+ provide("useRouter", props.router);
813
+ setDefaultIndent(props["indentSize"]);
814
+ const menuRoot = ref(null);
815
+ const overflowItemLength = ref(0);
816
+ const overflowContainer = ref(null);
817
+ const selectClassName = `${ns2.b()}-item-select`;
818
+ const rootClassName = computed(() => ({
819
+ [`${ns2.b()}`]: true,
820
+ [`${ns2.b()}-vertical`]: mode.value === "vertical",
821
+ [`${ns2.b()}-horizontal`]: mode.value === "horizontal",
822
+ [`${ns2.b()}-collapsed`]: collapsed.value
823
+ }));
824
+ const overflowContainerClassName = reactive({
825
+ [selectClassName]: false,
826
+ [`${ns2.b()}-overflow-container`]: true
827
+ });
828
+ const resetOverflowContainerSelectState = (e) => {
829
+ const children = Array.from(e.children);
830
+ for (const item of children) {
831
+ if (item.classList.contains(selectClassName)) {
832
+ overflowContainerClassName[selectClassName] = true;
833
+ break;
834
+ } else {
835
+ overflowContainerClassName[selectClassName] = false;
836
+ }
837
+ }
838
+ };
839
+ onMounted(() => {
840
+ var _a;
841
+ if (props["mode"] === "horizontal") {
842
+ let flag = false;
843
+ const overflowContainerElement = (_a = overflowContainer.value) == null ? void 0 : _a.$el;
844
+ const root = menuRoot.value;
845
+ const children = root.children;
846
+ const container = overflowContainerElement.children[1];
847
+ const ob = new IntersectionObserver((entries) => {
848
+ entries.forEach((entry) => {
849
+ if (!entry.isIntersecting) {
850
+ const cloneNode = entry.target.cloneNode(true);
851
+ if (entry.target.classList.contains(`${ns2.b()}-overflow-container`)) {
852
+ if (flag && entry.target.previousElementSibling && container.children.length) {
853
+ root.appendChild(entry.target.previousElementSibling);
854
+ } else {
855
+ flag = true;
856
+ }
857
+ } else {
858
+ overflowItemLength.value += 1;
859
+ entry.target.style.visibility = "hidden";
860
+ if (overflowContainerElement.nextSibling) {
861
+ root.insertBefore(entry.target, overflowContainerElement.nextSibling);
862
+ } else {
863
+ root.appendChild(entry.target);
864
+ }
865
+ container.appendChild(cloneNode);
866
+ resetOverflowContainerSelectState(container);
867
+ }
868
+ } else {
869
+ if (!entry.target.classList.contains(`${ns2.b()}-overflow-container`) && entry.target.style.visibility === "hidden") {
870
+ ob.unobserve(entry.target);
871
+ root.insertBefore(entry.target, overflowContainerElement);
872
+ entry.target.style.visibility = "";
873
+ const obItem = overflowContainerElement.previousElementSibling;
874
+ const canObAgin = obItem && entry.boundingClientRect.width % entry.target.getBoundingClientRect().width === 0;
875
+ if (canObAgin) {
876
+ ob.observe(obItem);
877
+ }
878
+ if (obItem == null ? void 0 : obItem.classList.contains("devui-submenu")) {
879
+ const sub = obItem;
880
+ const wrapper = obItem.children[1];
881
+ sub.addEventListener("mouseenter", (ev) => {
882
+ ev.stopPropagation();
883
+ useShowSubMenu("mouseenter", ev, wrapper);
884
+ });
885
+ sub.addEventListener("mouseleave", (ev) => {
886
+ ev.stopPropagation();
887
+ useShowSubMenu("mouseleave", ev, wrapper);
888
+ });
889
+ }
890
+ overflowItemLength.value -= 1;
891
+ ob.observe(entry.target);
892
+ if (container.lastChild) {
893
+ container.removeChild(container.lastChild);
894
+ }
895
+ resetOverflowContainerSelectState(container);
896
+ }
897
+ }
898
+ });
899
+ }, {
900
+ root,
901
+ threshold: 1,
902
+ rootMargin: "8px"
903
+ });
904
+ for (let i = 0; i < children.length; i++) {
905
+ ob.observe(children[i]);
906
+ }
907
+ }
908
+ });
909
+ return () => {
910
+ var _a, _b;
911
+ return createVNode("ul", {
912
+ "ref": menuRoot,
913
+ "class": rootClassName.value,
914
+ "style": [props["collapsed"] ? `width:${props["collapsedIndent"] * 2}px` : `width: ${props["width"]}`]
915
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a), withDirectives(createVNode(SubMenu, {
916
+ "ref": overflowContainer,
917
+ "key": "overflowContainer",
918
+ "title": "...",
919
+ "class": overflowContainerClassName
920
+ }, null), [[vShow, overflowItemLength.value > 0 && mode.value === "horizontal"]])]);
921
+ };
922
+ }
923
+ });
924
+ var index = {
925
+ title: "Menu \u83DC\u5355",
926
+ category: "\u5BFC\u822A",
927
+ status: "100%",
928
+ install(app) {
929
+ app.component(Menu.name, Menu);
930
+ app.component(MenuItem.name, MenuItem);
931
+ app.component(SubMenu.name, SubMenu);
932
+ }
933
+ };
934
+ export { Menu, MenuItem, SubMenu, index as default };