vue-devui 1.0.0-beta.9 → 1.0.0-rc.1

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 (294) hide show
  1. package/README.md +100 -72
  2. package/accordion/index.es.js +525 -39
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.es.js +34 -37
  6. package/alert/index.umd.js +1 -1
  7. package/alert/style.css +1 -1
  8. package/{time-axis → auto-complete}/index.d.ts +0 -0
  9. package/auto-complete/index.es.js +983 -0
  10. package/auto-complete/index.umd.js +1 -0
  11. package/auto-complete/package.json +7 -0
  12. package/auto-complete/style.css +1 -0
  13. package/back-top/index.es.js +5 -3
  14. package/back-top/index.umd.js +1 -1
  15. package/badge/index.es.js +13 -19
  16. package/badge/index.umd.js +1 -1
  17. package/badge/style.css +1 -1
  18. package/breadcrumb/index.es.js +2 -1
  19. package/button/index.es.js +296 -117
  20. package/button/index.umd.js +1 -1
  21. package/button/style.css +1 -1
  22. package/carousel/index.es.js +43 -57
  23. package/carousel/index.umd.js +1 -1
  24. package/cascader/index.es.js +5412 -784
  25. package/cascader/index.umd.js +27 -1
  26. package/cascader/style.css +1 -1
  27. package/checkbox/style.css +1 -1
  28. package/{toast → color-picker}/index.d.ts +0 -0
  29. package/color-picker/index.es.js +8196 -0
  30. package/color-picker/index.umd.js +27 -0
  31. package/color-picker/package.json +7 -0
  32. package/color-picker/style.css +1 -0
  33. package/comment/index.es.js +42 -13
  34. package/comment/index.umd.js +1 -1
  35. package/comment/style.css +1 -1
  36. package/countdown/index.es.js +27 -17
  37. package/countdown/index.umd.js +1 -1
  38. package/countdown/style.css +1 -1
  39. package/date-picker/index.es.js +48 -66
  40. package/date-picker/index.umd.js +1 -1
  41. package/date-picker/style.css +1 -1
  42. package/dragdrop/index.es.js +135 -10
  43. package/dragdrop/index.umd.js +1 -1
  44. package/drawer/index.es.js +169 -223
  45. package/drawer/index.umd.js +1 -1
  46. package/drawer/style.css +1 -1
  47. package/dropdown/index.es.js +463 -300
  48. package/dropdown/index.umd.js +1 -1
  49. package/dropdown/style.css +1 -1
  50. package/editable-select/index.es.js +293 -5660
  51. package/editable-select/index.umd.js +1 -27
  52. package/editable-select/style.css +1 -1
  53. package/form/index.es.js +6210 -531
  54. package/form/index.umd.js +27 -1
  55. package/form/style.css +1 -1
  56. package/fullscreen/index.es.js +112 -133
  57. package/fullscreen/index.umd.js +1 -1
  58. package/fullscreen/style.css +1 -1
  59. package/gantt/index.es.js +6 -18
  60. package/gantt/index.umd.js +1 -1
  61. package/gantt/style.css +1 -1
  62. package/grid/index.es.js +1 -1
  63. package/grid/style.css +1 -1
  64. package/icon/index.es.js +39 -56
  65. package/icon/index.umd.js +1 -1
  66. package/image-preview/index.es.js +35 -16
  67. package/image-preview/index.umd.js +1 -1
  68. package/input/index.es.js +4 -5
  69. package/input/index.umd.js +1 -1
  70. package/input/style.css +1 -1
  71. package/input-icon/index.es.js +42 -41
  72. package/input-icon/index.umd.js +1 -1
  73. package/input-icon/style.css +1 -1
  74. package/input-number/index.es.js +46 -56
  75. package/input-number/index.umd.js +1 -1
  76. package/input-number/style.css +1 -1
  77. package/list/index.d.ts +7 -0
  78. package/list/index.es.js +39 -0
  79. package/list/index.umd.js +1 -0
  80. package/{toast → list}/package.json +1 -1
  81. package/list/style.css +1 -0
  82. package/loading/index.es.js +2 -2
  83. package/modal/index.es.js +304 -765
  84. package/modal/index.umd.js +1 -1
  85. package/modal/style.css +1 -1
  86. package/nav-sprite/index.es.js +1 -675
  87. package/nav-sprite/index.umd.js +1 -1
  88. package/notification/index.d.ts +7 -0
  89. package/notification/index.es.js +284 -0
  90. package/notification/index.umd.js +1 -0
  91. package/notification/package.json +7 -0
  92. package/notification/style.css +1 -0
  93. package/nuxt/components/Accordion.js +3 -0
  94. package/nuxt/components/Alert.js +3 -0
  95. package/nuxt/components/Anchor.js +3 -0
  96. package/nuxt/components/Aside.js +3 -0
  97. package/nuxt/components/AutoComplete.js +3 -0
  98. package/nuxt/components/Avatar.js +3 -0
  99. package/nuxt/components/BackTop.js +3 -0
  100. package/nuxt/components/Badge.js +3 -0
  101. package/nuxt/components/Breadcrumb.js +3 -0
  102. package/nuxt/components/Button.js +3 -0
  103. package/nuxt/components/Card.js +3 -0
  104. package/nuxt/components/Carousel.js +3 -0
  105. package/nuxt/components/CarouselItem.js +3 -0
  106. package/nuxt/components/Cascader.js +3 -0
  107. package/nuxt/components/Checkbox.js +3 -0
  108. package/nuxt/components/Col.js +3 -0
  109. package/nuxt/components/ColorPicker.js +3 -0
  110. package/nuxt/components/Column.js +3 -0
  111. package/nuxt/components/Comment.js +3 -0
  112. package/nuxt/components/Content.js +3 -0
  113. package/nuxt/components/Countdown.js +3 -0
  114. package/nuxt/components/DatePicker.js +3 -0
  115. package/nuxt/components/Drawer.js +3 -0
  116. package/nuxt/components/DrawerService.js +3 -0
  117. package/nuxt/components/Dropdown.js +3 -0
  118. package/nuxt/components/DropdownMenu.js +3 -0
  119. package/nuxt/components/EditableSelect.js +3 -0
  120. package/nuxt/components/FixedOverlay.js +3 -0
  121. package/nuxt/components/FlexibleOverlay.js +3 -0
  122. package/nuxt/components/Footer.js +3 -0
  123. package/nuxt/components/Form.js +3 -0
  124. package/nuxt/components/FormControl.js +3 -0
  125. package/nuxt/components/FormItem.js +3 -0
  126. package/nuxt/components/FormLabel.js +3 -0
  127. package/nuxt/components/FormOperation.js +3 -0
  128. package/nuxt/components/Fullscreen.js +3 -0
  129. package/nuxt/components/Gantt.js +3 -0
  130. package/nuxt/components/Header.js +3 -0
  131. package/nuxt/components/IFileOptions.js +3 -0
  132. package/nuxt/components/IUploadOptions.js +3 -0
  133. package/nuxt/components/Icon.js +2 -0
  134. package/nuxt/components/ImagePreviewService.js +3 -0
  135. package/nuxt/components/Input.js +3 -0
  136. package/nuxt/components/InputIcon.js +3 -0
  137. package/nuxt/components/InputNumber.js +3 -0
  138. package/nuxt/components/Layout.js +3 -0
  139. package/nuxt/components/List.js +3 -0
  140. package/nuxt/components/ListItem.js +3 -0
  141. package/nuxt/components/Loading.js +3 -0
  142. package/nuxt/components/LoadingService.js +3 -0
  143. package/nuxt/components/Modal.js +3 -0
  144. package/nuxt/components/NavSprite.js +2 -0
  145. package/nuxt/components/Notification.js +3 -0
  146. package/nuxt/components/NotificationService.js +3 -0
  147. package/nuxt/components/Pagination.js +3 -0
  148. package/nuxt/components/Panel.js +3 -0
  149. package/nuxt/components/PanelBody.js +3 -0
  150. package/nuxt/components/PanelFooter.js +3 -0
  151. package/nuxt/components/PanelHeader.js +3 -0
  152. package/nuxt/components/Popover.js +3 -0
  153. package/nuxt/components/Progress.js +3 -0
  154. package/nuxt/components/QuadrantDiagram.js +3 -0
  155. package/nuxt/components/Radio.js +3 -0
  156. package/nuxt/components/RadioGroup.js +3 -0
  157. package/nuxt/components/Rate.js +3 -0
  158. package/nuxt/components/ReadTip.js +3 -0
  159. package/nuxt/components/Result.js +3 -0
  160. package/nuxt/components/Row.js +3 -0
  161. package/nuxt/components/Search.js +3 -0
  162. package/nuxt/components/Select.js +3 -0
  163. package/nuxt/components/Skeleton.js +3 -0
  164. package/nuxt/components/SkeletonItem.js +3 -0
  165. package/nuxt/components/Slider.js +3 -0
  166. package/nuxt/components/Splitter.js +3 -0
  167. package/nuxt/components/Statistic.js +3 -0
  168. package/nuxt/components/Status.js +3 -0
  169. package/nuxt/components/StepsGuide.js +3 -0
  170. package/nuxt/components/StickSlider.js +3 -0
  171. package/nuxt/components/Sticky.js +2 -0
  172. package/nuxt/components/Switch.js +3 -0
  173. package/nuxt/components/Table.js +3 -0
  174. package/nuxt/components/Tabs.js +3 -0
  175. package/nuxt/components/Tag.js +3 -0
  176. package/nuxt/components/TagInput.js +3 -0
  177. package/nuxt/components/Textarea.js +3 -0
  178. package/nuxt/components/TimePicker.js +3 -0
  179. package/nuxt/components/Timeline.js +3 -0
  180. package/nuxt/components/TimelineItem.js +3 -0
  181. package/nuxt/components/Tooltip.js +3 -0
  182. package/nuxt/components/Transfer.js +3 -0
  183. package/nuxt/components/Tree.js +3 -0
  184. package/nuxt/components/TreeSelect.js +3 -0
  185. package/nuxt/components/Upload.js +3 -0
  186. package/nuxt/components/UploadStatus.js +3 -0
  187. package/nuxt/components/alertProps.js +3 -0
  188. package/nuxt/components/badgeProps.js +3 -0
  189. package/nuxt/components/buttonProps.js +3 -0
  190. package/nuxt/components/dropdownMenuProps.js +3 -0
  191. package/nuxt/components/fixedOverlayProps.js +3 -0
  192. package/nuxt/components/flexibleOverlayProps.js +3 -0
  193. package/nuxt/components/fullscreenProps.js +3 -0
  194. package/nuxt/components/iconProps.js +2 -0
  195. package/nuxt/components/notificationProps.js +3 -0
  196. package/nuxt/components/overlayEmits.js +3 -0
  197. package/nuxt/components/overlayProps.js +3 -0
  198. package/nuxt/components/paginationProps.js +3 -0
  199. package/nuxt/components/panelProps.js +3 -0
  200. package/nuxt/components/popoverProps.js +3 -0
  201. package/nuxt/components/searchProps.js +3 -0
  202. package/nuxt/components/tooltipProps.js +3 -0
  203. package/nuxt/components/uploadProps.js +3 -0
  204. package/nuxt/index.js +13 -0
  205. package/overlay/index.es.js +156 -205
  206. package/overlay/index.umd.js +1 -1
  207. package/overlay/style.css +1 -1
  208. package/package.json +12 -55
  209. package/pagination/index.es.js +11 -13
  210. package/pagination/index.umd.js +1 -1
  211. package/pagination/style.css +1 -1
  212. package/panel/index.es.js +48 -35
  213. package/panel/index.umd.js +1 -1
  214. package/popover/index.es.js +5954 -189
  215. package/popover/index.umd.js +27 -1
  216. package/popover/style.css +1 -1
  217. package/progress/index.es.js +8 -8
  218. package/progress/index.umd.js +3 -3
  219. package/quadrant-diagram/index.es.js +5405 -166
  220. package/quadrant-diagram/index.umd.js +27 -1
  221. package/radio/index.es.js +8 -14
  222. package/radio/index.umd.js +1 -1
  223. package/radio/style.css +1 -1
  224. package/read-tip/index.es.js +6 -3
  225. package/read-tip/style.css +1 -1
  226. package/result/index.es.js +38 -52
  227. package/result/index.umd.js +1 -1
  228. package/ripple/index.es.js +10 -6
  229. package/search/index.es.js +5428 -200
  230. package/search/index.umd.js +27 -1
  231. package/search/style.css +1 -1
  232. package/select/index.es.js +43 -42
  233. package/select/index.umd.js +1 -1
  234. package/select/style.css +1 -1
  235. package/skeleton/index.es.js +17 -17
  236. package/skeleton/index.umd.js +1 -1
  237. package/slider/index.es.js +4 -6
  238. package/slider/index.umd.js +1 -1
  239. package/slider/style.css +1 -1
  240. package/splitter/index.es.js +5896 -39
  241. package/splitter/index.umd.js +27 -1
  242. package/splitter/style.css +1 -1
  243. package/statistic/index.es.js +19 -32
  244. package/statistic/index.umd.js +1 -1
  245. package/statistic/style.css +1 -1
  246. package/status/index.es.js +1 -4
  247. package/status/index.umd.js +1 -1
  248. package/status/style.css +1 -1
  249. package/steps-guide/index.es.js +6 -3
  250. package/sticky/index.umd.js +1 -1
  251. package/style.css +1 -1
  252. package/table/index.es.js +753 -358
  253. package/table/index.umd.js +1 -1
  254. package/table/style.css +1 -1
  255. package/tabs/index.es.js +3 -4
  256. package/tabs/index.umd.js +1 -1
  257. package/tabs/style.css +1 -1
  258. package/tag/index.es.js +4 -3
  259. package/tag/index.umd.js +1 -1
  260. package/tag/style.css +1 -1
  261. package/tag-input/index.es.js +4 -14
  262. package/tag-input/index.umd.js +1 -1
  263. package/textarea/style.css +1 -1
  264. package/{theme → theme/theme.scss} +0 -0
  265. package/time-picker/index.es.js +309 -123
  266. package/time-picker/index.umd.js +1 -1
  267. package/time-picker/style.css +1 -1
  268. package/timeline/index.d.ts +7 -0
  269. package/{time-axis → timeline}/index.es.js +65 -77
  270. package/timeline/index.umd.js +1 -0
  271. package/{time-axis → timeline}/package.json +1 -1
  272. package/timeline/style.css +1 -0
  273. package/tooltip/index.es.js +5805 -141
  274. package/tooltip/index.umd.js +27 -1
  275. package/tooltip/style.css +1 -1
  276. package/transfer/index.es.js +6521 -630
  277. package/transfer/index.umd.js +27 -1
  278. package/transfer/style.css +1 -1
  279. package/tree/index.es.js +5781 -193
  280. package/tree/index.umd.js +27 -1
  281. package/tree/style.css +1 -1
  282. package/tree-select/index.es.js +138 -39
  283. package/tree-select/index.umd.js +1 -1
  284. package/tree-select/style.css +1 -1
  285. package/upload/index.es.js +450 -2669
  286. package/upload/index.umd.js +1 -1
  287. package/upload/style.css +1 -1
  288. package/vue-devui.es.js +14414 -14096
  289. package/vue-devui.umd.js +19 -19
  290. package/time-axis/index.umd.js +0 -1
  291. package/time-axis/style.css +0 -1
  292. package/toast/index.es.js +0 -2059
  293. package/toast/index.umd.js +0 -1
  294. package/toast/style.css +0 -1
@@ -17,16 +17,11 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, watch, defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, onUnmounted, withDirectives, vShow, reactive, toRef, isRef, toRefs, Fragment } from "vue";
20
+ import { toRefs, watch, onMounted, onUnmounted, ref, computed, defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, unref, nextTick, mergeProps, Fragment, withDirectives, vShow } from "vue";
21
+ import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
22
+ import { onClickOutside } from "@vueuse/core";
21
23
  const dropdownProps = {
22
- origin: {
23
- type: Object
24
- },
25
- isOpen: {
26
- type: Boolean,
27
- default: false
28
- },
29
- disabled: {
24
+ visible: {
30
25
  type: Boolean,
31
26
  default: false
32
27
  },
@@ -38,6 +33,18 @@ const dropdownProps = {
38
33
  type: String,
39
34
  default: "all"
40
35
  },
36
+ position: {
37
+ type: Array,
38
+ default: ["bottom"]
39
+ },
40
+ align: {
41
+ type: String,
42
+ default: null
43
+ },
44
+ offset: {
45
+ type: [Number, Object],
46
+ default: 4
47
+ },
41
48
  closeOnMouseLeaveMenu: {
42
49
  type: Boolean,
43
50
  default: false
@@ -45,11 +52,16 @@ const dropdownProps = {
45
52
  showAnimation: {
46
53
  type: Boolean,
47
54
  default: true
55
+ },
56
+ overlayClass: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ destroyOnHide: {
61
+ type: Boolean,
62
+ default: true
48
63
  }
49
64
  };
50
- function isComponent(target) {
51
- return !!(target == null ? void 0 : target.$el);
52
- }
53
65
  function getElement(element) {
54
66
  if (element instanceof Element) {
55
67
  return element;
@@ -59,85 +71,158 @@ function getElement(element) {
59
71
  }
60
72
  return null;
61
73
  }
74
+ const dropdownMap = /* @__PURE__ */ new Map();
62
75
  function subscribeEvent(dom, type, callback) {
63
76
  dom == null ? void 0 : dom.addEventListener(type, callback);
64
77
  return () => {
65
78
  dom == null ? void 0 : dom.removeEventListener(type, callback);
66
79
  };
67
80
  }
68
- const useDropdown = ({
69
- visible,
70
- trigger,
71
- origin,
72
- closeScope,
73
- closeOnMouseLeaveMenu
74
- }) => {
75
- const dropdownElRef = ref();
76
- const closeByScope = () => {
77
- if (closeScope.value === "none") {
78
- return;
79
- }
80
- visible.value = false;
81
+ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
82
+ let overlayEnter = false;
83
+ let originEnter = false;
84
+ const { trigger, closeScope, closeOnMouseLeaveMenu } = toRefs(props);
85
+ const toggle = (status) => {
86
+ isOpen.value = status;
87
+ emit("toggle", isOpen.value);
81
88
  };
82
- watch([trigger, origin, dropdownElRef], ([trigger2, origin2, dropdownEl], ov, onInvalidate) => {
83
- const originEl = getElement(origin2);
84
- if (!originEl || !dropdownEl) {
89
+ const handleLeave = async (elementType, closeAll) => {
90
+ await new Promise((resolve) => setTimeout(resolve, 50));
91
+ if (elementType === "origin" && overlayEnter || elementType === "dropdown" && originEnter) {
85
92
  return;
86
93
  }
87
- const subscriptions = [
88
- subscribeEvent(dropdownEl, "click", () => {
89
- if (closeScope.value === "all") {
90
- visible.value = false;
91
- }
92
- })
93
- ];
94
- if (trigger2 === "click") {
95
- subscriptions.push(subscribeEvent(originEl, "click", () => visible.value = !visible.value), subscribeEvent(document, "click", (e) => {
96
- if (!visible.value) {
97
- return;
98
- }
99
- const target = e.target;
100
- const isContain = originEl.contains(target) || dropdownEl.contains(target);
101
- if (isContain) {
94
+ if (closeAll) {
95
+ [...dropdownMap.values()].reverse().forEach((item) => {
96
+ setTimeout(() => {
97
+ var _a;
98
+ (_a = item.toggle) == null ? void 0 : _a.call(item);
99
+ }, 0);
100
+ });
101
+ }
102
+ toggle(false);
103
+ };
104
+ watch([trigger, origin, dropdownRef], ([triggerVal, originVal, dropdownEl], ov, onInvalidate) => {
105
+ const originEl = getElement(originVal);
106
+ const subscriptions = [];
107
+ setTimeout(() => {
108
+ subscriptions.push(subscribeEvent(document, "click", (e) => {
109
+ const dropdownValues = [...dropdownMap.values()];
110
+ if (!isOpen.value || closeScope.value === "none" || dropdownEl.contains(e.target) && closeScope.value === "blank" || dropdownValues.some((item) => {
111
+ var _a;
112
+ return (_a = item.toggleEl) == null ? void 0 : _a.contains(e.target);
113
+ }) && dropdownValues.some((item) => {
114
+ var _a;
115
+ return (_a = item.menuEl) == null ? void 0 : _a.contains(e.target);
116
+ })) {
102
117
  return;
103
118
  }
104
- closeByScope();
105
- }), subscribeEvent(dropdownEl, "mouseleave", () => {
106
- if (closeOnMouseLeaveMenu.value) {
107
- visible.value = false;
108
- }
119
+ [...dropdownMap.values()].reverse().forEach((item) => {
120
+ setTimeout(() => {
121
+ var _a, _b;
122
+ if (!((_a = item.toggleEl) == null ? void 0 : _a.contains(e.target))) {
123
+ (_b = item.toggle) == null ? void 0 : _b.call(item);
124
+ }
125
+ }, 0);
126
+ });
127
+ overlayEnter = false;
109
128
  }));
110
- } else if (trigger2 === "hover") {
111
- let overlayEnter = false;
112
- let originEnter = false;
113
- const handleLeave = async (elementType) => {
114
- await new Promise((resolve) => setTimeout(resolve, 50));
115
- if (elementType === "origin" && overlayEnter || elementType === "dropdown" && originEnter) {
116
- return;
129
+ }, 0);
130
+ if (triggerVal === "click") {
131
+ subscriptions.push(subscribeEvent(originEl, "click", () => toggle(!isOpen.value)), subscribeEvent(dropdownEl, "mouseleave", (e) => {
132
+ var _a;
133
+ if (closeOnMouseLeaveMenu.value && !((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget))) {
134
+ handleLeave("dropdown", true);
117
135
  }
118
- closeByScope();
119
- };
136
+ }));
137
+ } else if (triggerVal === "hover") {
120
138
  subscriptions.push(subscribeEvent(originEl, "mouseenter", () => {
121
139
  originEnter = true;
122
- visible.value = true;
140
+ toggle(true);
123
141
  }), subscribeEvent(originEl, "mouseleave", () => {
124
142
  originEnter = false;
125
- if (!closeOnMouseLeaveMenu.value) {
126
- handleLeave("origin");
127
- }
143
+ handleLeave("origin");
128
144
  }), subscribeEvent(dropdownEl, "mouseenter", () => {
129
145
  overlayEnter = true;
130
- visible.value = true;
131
- }), subscribeEvent(dropdownEl, "mouseleave", () => {
146
+ isOpen.value = true;
147
+ }), subscribeEvent(dropdownEl, "mouseleave", (e) => {
148
+ var _a;
132
149
  overlayEnter = false;
133
- handleLeave("dropdown");
150
+ if (e.relatedTarget && ((originEl == null ? void 0 : originEl.contains(e.relatedTarget)) || ((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget)))) {
151
+ return;
152
+ }
153
+ handleLeave("dropdown", true);
134
154
  }));
135
155
  }
136
156
  onInvalidate(() => subscriptions.forEach((v) => v()));
137
157
  });
138
- return { dropdownEl: dropdownElRef };
139
158
  };
140
- var overlay = "";
159
+ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emit) {
160
+ const calcPopDirection = (dropdownEl) => {
161
+ const elementHeight = dropdownEl.offsetHeight;
162
+ const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
163
+ const isBottomEnough = bottomDistance >= elementHeight;
164
+ if (!isBottomEnough) {
165
+ popDirection.value = "top";
166
+ } else {
167
+ popDirection.value = "bottom";
168
+ }
169
+ };
170
+ watch(visible, (newVal, oldVal) => {
171
+ if (oldVal === void 0) {
172
+ return;
173
+ }
174
+ isOpen.value = newVal;
175
+ emit("toggle", isOpen.value);
176
+ }, { immediate: true });
177
+ watch([isOpen, dropdownRef], ([isOpenVal, dropdownEl]) => {
178
+ var _a;
179
+ if (isOpenVal) {
180
+ dropdownMap.set(id, __spreadProps(__spreadValues({}, dropdownMap.get(id)), {
181
+ menuEl: dropdownEl,
182
+ toggle: () => {
183
+ isOpen.value = false;
184
+ emit("toggle", isOpen.value);
185
+ }
186
+ }));
187
+ for (const value of dropdownMap.values()) {
188
+ if ((_a = value.menuEl) == null ? void 0 : _a.contains(origin.value)) {
189
+ value.child = dropdownEl;
190
+ }
191
+ }
192
+ }
193
+ if (dropdownEl) {
194
+ calcPopDirection(dropdownEl);
195
+ }
196
+ });
197
+ onMounted(() => {
198
+ dropdownMap.set(id, { toggleEl: origin.value });
199
+ });
200
+ onUnmounted(() => {
201
+ dropdownMap.delete(id);
202
+ });
203
+ }
204
+ function useOverlayProps(props, currentPosition, isOpen) {
205
+ const { showAnimation, overlayClass, destroyOnHide } = toRefs(props);
206
+ const overlayModelValue = ref(false);
207
+ const overlayShowValue = ref(false);
208
+ const styles = computed(() => ({
209
+ transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
210
+ }));
211
+ const classes = computed(() => ({
212
+ "fade-in-bottom": showAnimation.value && isOpen.value && currentPosition.value === "bottom",
213
+ "fade-in-top": showAnimation.value && isOpen.value && currentPosition.value === "top",
214
+ [`${overlayClass.value}`]: true
215
+ }));
216
+ const handlePositionChange = (pos) => {
217
+ currentPosition.value = pos.includes("top") || pos.includes("end") ? "top" : "bottom";
218
+ };
219
+ watch(isOpen, (isOpenVal) => {
220
+ overlayModelValue.value = destroyOnHide.value ? isOpenVal : true;
221
+ overlayShowValue.value = isOpenVal;
222
+ });
223
+ return { overlayModelValue, overlayShowValue, styles, classes, handlePositionChange };
224
+ }
225
+ var baseOverlay = "";
141
226
  function _isSlot(s) {
142
227
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
143
228
  }
@@ -161,9 +246,6 @@ const overlayProps = {
161
246
  visible: {
162
247
  type: Boolean
163
248
  },
164
- "onUpdate:visible": {
165
- type: Function
166
- },
167
249
  backgroundBlock: {
168
250
  type: Boolean,
169
251
  default: false
@@ -187,29 +269,14 @@ const overlayProps = {
187
269
  default: true
188
270
  }
189
271
  };
190
- const overlayEmits = ["onUpdate:visible", "backdropClick"];
191
272
  const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
192
273
  overlayStyle: {
193
274
  type: [String, Object],
194
275
  default: void 0
195
276
  }
196
277
  });
197
- const flexibleOverlayProps = __spreadValues({
198
- origin: {
199
- type: Object,
200
- require: true
201
- },
202
- position: {
203
- type: Object,
204
- default: () => ({
205
- originX: "left",
206
- originY: "top",
207
- overlayX: "left",
208
- overlayY: "top"
209
- })
210
- }
211
- }, overlayProps);
212
- function useOverlayLogic(props) {
278
+ const overlayEmits = ["update:visible", "backdropClick"];
279
+ function useOverlayLogic(props, ctx) {
213
280
  const backgroundClass = computed(() => {
214
281
  return [
215
282
  "devui-overlay-background",
@@ -221,11 +288,11 @@ function useOverlayLogic(props) {
221
288
  return "devui-overlay";
222
289
  });
223
290
  const handleBackdropClick = (event) => {
224
- var _a, _b;
291
+ var _a;
225
292
  event.preventDefault();
226
293
  (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
227
294
  if (props.backdropClose) {
228
- (_b = props["onUpdate:visible"]) == null ? void 0 : _b.call(props, false);
295
+ ctx.emit("update:visible", false);
229
296
  }
230
297
  };
231
298
  const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
@@ -259,7 +326,8 @@ function useOverlayLogic(props) {
259
326
  handleOverlayBubbleCancel
260
327
  };
261
328
  }
262
- const FixedOverlay = defineComponent({
329
+ var fixedOverlay = "";
330
+ defineComponent({
263
331
  name: "DFixedOverlay",
264
332
  props: fixedOverlayProps,
265
333
  emits: overlayEmits,
@@ -269,9 +337,9 @@ const FixedOverlay = defineComponent({
269
337
  overlayClass,
270
338
  handleBackdropClick,
271
339
  handleOverlayBubbleCancel
272
- } = useOverlayLogic(props);
340
+ } = useOverlayLogic(props, ctx);
273
341
  return () => createVNode(CommonOverlay, null, {
274
- default: () => [withDirectives(createVNode("div", {
342
+ default: () => [props.visible && createVNode("div", {
275
343
  "class": backgroundClass.value,
276
344
  "style": props.backgroundStyle,
277
345
  "onClick": handleBackdropClick
@@ -279,252 +347,347 @@ const FixedOverlay = defineComponent({
279
347
  "class": overlayClass.value,
280
348
  "style": props.overlayStyle,
281
349
  "onClick": handleOverlayBubbleCancel
282
- }, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
283
- });
284
- }
285
- });
286
- const FlexibleOverlay = defineComponent({
287
- name: "DFlexibleOverlay",
288
- props: flexibleOverlayProps,
289
- emits: overlayEmits,
290
- setup(props, ctx) {
291
- const overlayRef = ref(null);
292
- const positionedStyle = reactive({
293
- position: "absolute"
294
- });
295
- onMounted(async () => {
296
- const handleRectChange = (position, rect, origin) => {
297
- const point = calculatePosition(position, rect, origin);
298
- positionedStyle.left = `${point.x}px`;
299
- positionedStyle.top = `${point.y}px`;
300
- };
301
- const locationElements = computed(() => {
302
- const overlay2 = overlayRef.value;
303
- const origin = getOrigin(props.origin);
304
- if (!overlay2 || !origin) {
305
- return;
306
- }
307
- return {
308
- origin,
309
- overlay: overlay2
310
- };
311
- });
312
- const visibleRef = toRef(props, "visible");
313
- const positionRef = toRef(props, "position");
314
- watch([locationElements, visibleRef, positionRef], async ([locationElements2, visible, position], ov, onInvalidate) => {
315
- if (!visible || !locationElements2) {
316
- return;
317
- }
318
- const {
319
- origin,
320
- overlay: overlay2
321
- } = locationElements2;
322
- handleRectChange(position, overlay2.getBoundingClientRect(), origin);
323
- const unsubscriptions = [subscribeLayoutEvent(() => handleRectChange(position, overlay2.getBoundingClientRect(), origin)), subscribeOverlayResize(overlay2, (entries) => handleRectChange(position, entries[0].contentRect, origin)), subscribeOriginResize(origin, () => handleRectChange(position, overlay2.getBoundingClientRect(), origin))];
324
- onInvalidate(() => {
325
- unsubscriptions.forEach((fn) => fn());
326
- });
327
- });
328
- });
329
- const {
330
- backgroundClass,
331
- overlayClass,
332
- handleBackdropClick,
333
- handleOverlayBubbleCancel
334
- } = useOverlayLogic(props);
335
- return () => createVNode(CommonOverlay, null, {
336
- default: () => [withDirectives(createVNode("div", {
337
- "style": props.backgroundStyle,
338
- "class": backgroundClass.value,
339
- "onClick": handleBackdropClick
340
- }, [createVNode("div", {
341
- "ref": overlayRef,
342
- "class": overlayClass.value,
343
- "style": positionedStyle,
344
- "onClick": handleOverlayBubbleCancel
345
- }, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
350
+ }, [renderSlot(ctx.slots, "default")])])]
346
351
  });
347
352
  }
348
353
  });
349
- function getOrigin(origin) {
350
- if (origin instanceof Element) {
351
- return origin;
352
- }
353
- if (isRef(origin)) {
354
- return getElement(origin.value);
355
- }
356
- if (isComponent(origin)) {
357
- return getElement(origin);
358
- }
359
- return origin;
360
- }
361
- function calculatePosition(position, rect, origin) {
362
- const originRect = getOriginRect(origin);
363
- const originPoint = getOriginRelativePoint(originRect, position);
364
- return getOverlayPoint(originPoint, rect, position);
365
- }
366
- function getOriginRect(origin) {
367
- if (origin instanceof Element) {
368
- return origin.getBoundingClientRect();
369
- }
370
- const width = origin.width || 0;
371
- const height = origin.height || 0;
372
- return {
373
- top: origin.y,
374
- bottom: origin.y + height,
375
- left: origin.x,
376
- right: origin.x + width,
377
- height,
378
- width
379
- };
380
- }
381
- function getOverlayPoint(originPoint, rect, position) {
382
- let x;
383
- const {
384
- width,
385
- height
386
- } = rect;
387
- if (position.overlayX == "center") {
388
- x = originPoint.x - width / 2;
389
- } else {
390
- x = position.overlayX == "left" ? originPoint.x : originPoint.x - width;
354
+ const flexibleOverlayProps = {
355
+ modelValue: {
356
+ type: Boolean,
357
+ default: false
358
+ },
359
+ origin: {
360
+ type: Object,
361
+ require: true
362
+ },
363
+ position: {
364
+ type: Array,
365
+ default: ["bottom"]
366
+ },
367
+ offset: {
368
+ type: [Number, Object],
369
+ default: 8
370
+ },
371
+ align: {
372
+ type: String,
373
+ default: null
374
+ },
375
+ showArrow: {
376
+ type: Boolean,
377
+ default: false
378
+ },
379
+ isArrowCenter: {
380
+ type: Boolean,
381
+ default: true
391
382
  }
392
- let y;
393
- if (position.overlayY == "center") {
394
- y = originPoint.y - height / 2;
395
- } else {
396
- y = position.overlayY == "top" ? originPoint.y : originPoint.y - height;
383
+ };
384
+ function getScrollParent(element) {
385
+ const overflowRegex = /(auto|scroll|hidden)/;
386
+ for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
387
+ const style = window.getComputedStyle(parent);
388
+ if (overflowRegex.test(style.overflow + style.overflowX + style.overflowY)) {
389
+ return parent;
390
+ }
397
391
  }
398
- return {
399
- x,
400
- y
401
- };
392
+ return window;
402
393
  }
403
- function getOriginRelativePoint(originRect, position) {
404
- let x;
405
- if (position.originX == "center") {
406
- x = originRect.left + originRect.width / 2;
407
- } else {
408
- const startX = originRect.left;
409
- const endX = originRect.right;
410
- x = position.originX == "left" ? startX : endX;
411
- }
412
- let y;
413
- if (position.originY == "center") {
414
- y = originRect.top + originRect.height / 2;
415
- } else {
416
- y = position.originY == "top" ? originRect.top : originRect.bottom;
394
+ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
395
+ let { x, y } = point;
396
+ if (!isArrowCenter) {
397
+ const { width, height } = originRect;
398
+ if (x && placement.includes("start")) {
399
+ x = 12;
400
+ }
401
+ if (x && placement.includes("end")) {
402
+ x = Math.round(width - 24);
403
+ }
404
+ if (y && placement.includes("start")) {
405
+ y = 10;
406
+ }
407
+ if (y && placement.includes("end")) {
408
+ y = height - 14;
409
+ }
417
410
  }
418
- return {
419
- x,
420
- y
421
- };
411
+ return { x, y };
422
412
  }
423
- function subscribeLayoutEvent(event) {
424
- window.addEventListener("scroll", event, true);
425
- window.addEventListener("resize", event);
426
- window.addEventListener("orientationchange", event);
427
- return () => {
428
- window.removeEventListener("scroll", event, true);
429
- window.removeEventListener("resize", event);
430
- window.removeEventListener("orientationchange", event);
413
+ function useOverlay(props, emit) {
414
+ const overlayRef = ref();
415
+ const arrowRef = ref();
416
+ const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
417
+ const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
418
+ const staticSide = {
419
+ top: "bottom",
420
+ right: "left",
421
+ bottom: "top",
422
+ left: "right"
423
+ }[placement.split("-")[0]];
424
+ Object.assign(arrowEl.style, {
425
+ left: x ? `${x}px` : "",
426
+ top: y ? `${y}px` : "",
427
+ right: "",
428
+ bottom: "",
429
+ [staticSide]: "-4px"
430
+ });
431
431
  };
432
- }
433
- function subscribeOverlayResize(overlay2, callback) {
434
- if (overlay2 instanceof Element) {
435
- const resizeObserver = new ResizeObserver(callback);
436
- resizeObserver.observe(overlay2);
437
- return () => resizeObserver.disconnect();
438
- }
439
- return () => {
432
+ const updatePosition = async () => {
433
+ const hostEl = props.origin;
434
+ const overlayEl = unref(overlayRef.value);
435
+ const arrowEl = unref(arrowRef.value);
436
+ const middleware = [
437
+ shift(),
438
+ offset(props.offset),
439
+ autoPlacement({
440
+ alignment: props.align,
441
+ allowedPlacements: props.position
442
+ })
443
+ ];
444
+ props.showArrow && middleware.push(arrow({ element: arrowEl }));
445
+ const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
446
+ strategy: "fixed",
447
+ middleware
448
+ });
449
+ emit("positionChange", placement);
450
+ Object.assign(overlayEl.style, { top: `${y}px`, left: `${x}px` });
451
+ props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
440
452
  };
453
+ watch(() => props.modelValue, () => {
454
+ const originParent = getScrollParent(props.origin);
455
+ if (props.modelValue && props.origin) {
456
+ nextTick(updatePosition);
457
+ originParent.addEventListener("scroll", updatePosition);
458
+ originParent !== window && window.addEventListener("scroll", updatePosition);
459
+ window.addEventListener("resize", updatePosition);
460
+ } else {
461
+ originParent.removeEventListener("scroll", updatePosition);
462
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
463
+ window.removeEventListener("resize", updatePosition);
464
+ }
465
+ });
466
+ onUnmounted(() => {
467
+ const originParent = getScrollParent(props.origin);
468
+ originParent.removeEventListener("scroll", updatePosition);
469
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
470
+ window.removeEventListener("resize", updatePosition);
471
+ });
472
+ return { arrowRef, overlayRef, updatePosition };
441
473
  }
442
- function subscribeOriginResize(origin, callback) {
443
- if (origin instanceof Element) {
444
- const observer = new MutationObserver(callback);
445
- observer.observe(origin, {
446
- attributeFilter: ["style"]
474
+ var flexibleOverlay = "";
475
+ const FlexibleOverlay = defineComponent({
476
+ name: "DFlexibleOverlay",
477
+ inheritAttrs: false,
478
+ props: flexibleOverlayProps,
479
+ emits: ["update:modelValue", "positionChange"],
480
+ setup(props, {
481
+ slots,
482
+ attrs,
483
+ emit,
484
+ expose
485
+ }) {
486
+ const {
487
+ arrowRef,
488
+ overlayRef,
489
+ updatePosition
490
+ } = useOverlay(props, emit);
491
+ expose({
492
+ updatePosition
447
493
  });
448
- return () => observer.disconnect();
494
+ return () => {
495
+ var _a;
496
+ return props.modelValue && createVNode("div", mergeProps({
497
+ "ref": overlayRef,
498
+ "class": "devui-flexible-overlay"
499
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
500
+ "ref": arrowRef,
501
+ "class": "devui-flexible-overlay-arrow"
502
+ }, null)]);
503
+ };
449
504
  }
450
- return () => {
451
- };
452
- }
453
- FlexibleOverlay.install = function(app) {
454
- app.component(FlexibleOverlay.name, FlexibleOverlay);
455
- };
456
- FixedOverlay.install = function(app) {
457
- app.component(FixedOverlay.name, FixedOverlay);
458
- };
505
+ });
459
506
  var dropdown = "";
507
+ let dropdownId = 1;
460
508
  var Dropdown = defineComponent({
461
509
  name: "DDropdown",
510
+ inheritAttrs: false,
462
511
  props: dropdownProps,
463
- emits: [],
464
- setup(props, ctx) {
512
+ emits: ["toggle"],
513
+ setup(props, {
514
+ slots,
515
+ attrs,
516
+ emit,
517
+ expose
518
+ }) {
465
519
  const {
520
+ visible,
521
+ position,
522
+ align,
523
+ offset: offset2,
524
+ showAnimation
525
+ } = toRefs(props);
526
+ const origin = ref();
527
+ const dropdownRef = ref();
528
+ const overlayRef = ref();
529
+ const id = `dropdown_${dropdownId++}`;
530
+ const isOpen = ref(false);
531
+ const currentPosition = ref("bottom");
532
+ useDropdownEvent({
533
+ id,
466
534
  isOpen,
467
535
  origin,
468
- trigger,
469
- closeScope,
470
- closeOnMouseLeaveMenu
471
- } = toRefs(props);
472
- const visible = ref(false);
473
- watch(isOpen, (value) => {
474
- visible.value = value;
475
- }, {
476
- immediate: true
536
+ dropdownRef,
537
+ props,
538
+ emit
477
539
  });
478
- const position = {
479
- originX: "center",
480
- originY: "bottom",
481
- overlayX: "center",
482
- overlayY: "top"
483
- };
540
+ useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
484
541
  const {
485
- dropdownEl
486
- } = useDropdown({
487
- visible,
488
- origin,
489
- trigger,
490
- closeScope,
491
- closeOnMouseLeaveMenu
492
- });
493
- const animatedVisible = computed(() => {
494
- return props.showAnimation ? visible.value : true;
542
+ overlayModelValue,
543
+ overlayShowValue,
544
+ styles,
545
+ classes,
546
+ handlePositionChange
547
+ } = useOverlayProps(props, currentPosition, isOpen);
548
+ expose({
549
+ updatePosition: () => overlayRef.value.updatePosition()
495
550
  });
496
551
  return () => {
497
- return createVNode(Fragment, null, [createVNode(FlexibleOverlay, {
498
- "origin": props.origin,
499
- "visible": visible.value,
500
- "onUpdate:visible": ($event) => visible.value = $event,
501
- "position": position,
502
- "hasBackdrop": false
552
+ var _a;
553
+ return createVNode(Fragment, null, [createVNode("div", {
554
+ "ref": origin,
555
+ "class": "devui-dropdown-toggle"
556
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode(Teleport, {
557
+ "to": "body"
503
558
  }, {
504
559
  default: () => [createVNode(Transition, {
505
- "name": "devui-dropdown-fade"
560
+ "name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
506
561
  }, {
507
- default: () => {
508
- var _a, _b;
509
- return [withDirectives(createVNode("div", {
510
- "ref": dropdownEl,
511
- "style": "min-width:102px"
512
- }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), [[vShow, animatedVisible.value]])];
513
- }
562
+ default: () => [withDirectives(createVNode(FlexibleOverlay, {
563
+ "modelValue": overlayModelValue.value,
564
+ "onUpdate:modelValue": ($event) => overlayModelValue.value = $event,
565
+ "ref": overlayRef,
566
+ "origin": origin.value,
567
+ "position": position.value,
568
+ "align": align.value,
569
+ "offset": offset2.value,
570
+ "onPositionChange": handlePositionChange,
571
+ "class": classes.value,
572
+ "style": styles.value
573
+ }, {
574
+ default: () => {
575
+ var _a2;
576
+ return [createVNode("div", mergeProps({
577
+ "ref": dropdownRef,
578
+ "class": "devui-dropdown-menu-wrap"
579
+ }, attrs), [(_a2 = slots.menu) == null ? void 0 : _a2.call(slots)])];
580
+ }
581
+ }), [[vShow, overlayShowValue.value]])]
514
582
  })]
515
583
  })]);
516
584
  };
517
585
  }
518
586
  });
519
- Dropdown.install = function(app) {
520
- app.component(Dropdown.name, Dropdown);
587
+ const dropdownMenuProps = {
588
+ modelValue: {
589
+ type: Boolean,
590
+ default: false
591
+ },
592
+ origin: {
593
+ type: Object,
594
+ require: true
595
+ },
596
+ position: {
597
+ type: Array,
598
+ default: ["bottom"]
599
+ },
600
+ align: {
601
+ type: String,
602
+ default: null
603
+ },
604
+ offset: {
605
+ type: [Number, Object],
606
+ default: 4
607
+ },
608
+ clickOutside: {
609
+ type: Function,
610
+ default: () => true
611
+ },
612
+ showAnimation: {
613
+ type: Boolean,
614
+ default: true
615
+ },
616
+ overlayClass: {
617
+ type: String,
618
+ default: ""
619
+ }
521
620
  };
621
+ var DropdownMenu = defineComponent({
622
+ name: "DDropdownMenu",
623
+ inheritAttrs: false,
624
+ props: dropdownMenuProps,
625
+ emits: ["update:modelValue"],
626
+ setup(props, {
627
+ slots,
628
+ attrs,
629
+ emit
630
+ }) {
631
+ const {
632
+ modelValue,
633
+ origin,
634
+ position,
635
+ align,
636
+ offset: offset2,
637
+ clickOutside,
638
+ showAnimation,
639
+ overlayClass
640
+ } = toRefs(props);
641
+ const dropdownMenuRef = ref(null);
642
+ onClickOutside(dropdownMenuRef, (value) => {
643
+ var _a, _b;
644
+ if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
645
+ emit("update:modelValue", false);
646
+ }
647
+ });
648
+ const currentPosition = ref("bottom");
649
+ const handlePositionChange = (pos) => {
650
+ currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
651
+ };
652
+ const styles = computed(() => ({
653
+ transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
654
+ }));
655
+ return () => createVNode(Teleport, {
656
+ "to": "body"
657
+ }, {
658
+ default: () => [createVNode(Transition, {
659
+ "name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
660
+ }, {
661
+ default: () => [createVNode(FlexibleOverlay, {
662
+ "modelValue": modelValue.value,
663
+ "onUpdate:modelValue": ($event) => modelValue.value = $event,
664
+ "origin": origin == null ? void 0 : origin.value,
665
+ "position": position.value,
666
+ "align": align.value,
667
+ "offset": offset2.value,
668
+ "onPositionChange": handlePositionChange,
669
+ "class": overlayClass.value,
670
+ "style": styles.value
671
+ }, {
672
+ default: () => {
673
+ var _a;
674
+ return [createVNode("div", mergeProps({
675
+ "ref": dropdownMenuRef,
676
+ "class": "devui-dropdown-menu-wrap"
677
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)])];
678
+ }
679
+ })]
680
+ })]
681
+ });
682
+ }
683
+ });
522
684
  var index = {
523
685
  title: "Dropdown \u4E0B\u62C9\u83DC\u5355",
524
686
  category: "\u5BFC\u822A",
525
687
  status: "10%",
526
688
  install(app) {
527
- app.use(Dropdown);
689
+ app.component(Dropdown.name, Dropdown);
690
+ app.component(DropdownMenu.name, DropdownMenu);
528
691
  }
529
692
  };
530
- export { Dropdown, index as default };
693
+ export { Dropdown, DropdownMenu, index as default, dropdownMenuProps };