@element-plus/nightly 0.0.20260717 → 0.0.20260718

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 (328) hide show
  1. package/es/component.mjs +3 -3
  2. package/es/components/affix/src/affix.d.ts +1 -1
  3. package/es/components/affix/src/affix.vue.d.ts +2 -2
  4. package/es/components/alert/src/alert.vue.d.ts +1 -1
  5. package/es/components/anchor/src/anchor.d.ts +2 -2
  6. package/es/components/anchor/src/anchor.vue.d.ts +3 -3
  7. package/es/components/autocomplete/src/autocomplete.d.ts +2 -2
  8. package/es/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
  9. package/es/components/avatar/src/avatar.d.ts +1 -1
  10. package/es/components/backtop/src/backtop.vue.d.ts +1 -1
  11. package/es/components/button/src/button-group.d.ts +2 -2
  12. package/es/components/button/src/button-group.vue.d.ts +1 -1
  13. package/es/components/button/src/button.d.ts +1 -1
  14. package/es/components/button/src/button.vue.d.ts +1 -1
  15. package/es/components/button/src/use-button.d.ts +1 -1
  16. package/es/components/calendar/src/calendar.d.ts +1 -1
  17. package/es/components/card/src/card.vue.d.ts +1 -1
  18. package/es/components/carousel/src/carousel.d.ts +2 -2
  19. package/es/components/carousel/src/carousel.vue.d.ts +1 -1
  20. package/es/components/cascader/src/cascader.d.ts +2 -2
  21. package/es/components/cascader/src/cascader.vue.d.ts +6 -6
  22. package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +1 -1
  23. package/es/components/cascader-panel/src/index.vue.d.ts +3 -3
  24. package/es/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
  25. package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  26. package/es/components/checkbox/src/checkbox.d.ts +8 -8
  27. package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
  28. package/es/components/col/src/col.vue.d.ts +2 -2
  29. package/es/components/collapse/src/collapse.vue.d.ts +1 -1
  30. package/es/components/color-picker/src/color-picker.vue.d.ts +5 -5
  31. package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs +1 -1
  32. package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
  33. package/es/components/date-picker/src/date-picker.d.ts +7 -7
  34. package/es/components/date-picker/src/props.d.ts +2 -2
  35. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  36. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs +1 -1
  37. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +1 -1
  38. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  39. package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  40. package/es/components/descriptions/src/description-item.d.ts +18 -18
  41. package/es/components/descriptions/src/description.d.ts +1 -1
  42. package/es/components/descriptions/src/description.vue.d.ts +1 -1
  43. package/es/components/dialog/src/dialog.vue.d.ts +3 -3
  44. package/es/components/divider/src/divider.d.ts +2 -2
  45. package/es/components/divider/src/divider.vue.d.ts +1 -1
  46. package/es/components/drawer/src/drawer.vue.d.ts +4 -4
  47. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  48. package/es/components/dropdown/src/dropdown.d.ts +4 -4
  49. package/es/components/dropdown/src/dropdown.vue.d.ts +28 -28
  50. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  51. package/es/components/index.mjs +6 -6
  52. package/es/components/input/src/input.d.ts +1 -1
  53. package/es/components/input/src/input.vue.d.ts +4 -4
  54. package/es/components/input-number/src/input-number.d.ts +1 -1
  55. package/es/components/input-number/src/input-number.vue.d.ts +3 -3
  56. package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +1 -1
  57. package/es/components/input-otp/src/input-otp.vue.d.ts +3 -3
  58. package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
  59. package/es/components/link/src/link.d.ts +1 -1
  60. package/es/components/link/src/link.vue.d.ts +1 -1
  61. package/es/components/mention/src/mention.d.ts +2 -2
  62. package/es/components/menu/src/menu.d.ts +8 -8
  63. package/es/components/menu/src/menu.mjs +1 -1
  64. package/es/components/menu/src/sub-menu.d.ts +1 -1
  65. package/es/components/message/src/instance.d.ts +1 -1
  66. package/es/components/message/src/message.d.ts +1 -1
  67. package/es/components/message/src/message.vue.d.ts +4 -4
  68. package/es/components/message-box/src/index.vue.d.ts +17 -17
  69. package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
  70. package/es/components/notification/src/notification.vue.d.ts +5 -5
  71. package/es/components/pagination/src/components/sizes.vue.d.ts +1 -1
  72. package/es/components/pagination/src/pagination.d.ts +2 -2
  73. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  74. package/es/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
  75. package/es/components/popover/src/popover.d.ts +2 -2
  76. package/es/components/popover/src/popover.vue.d.ts +2 -2
  77. package/es/components/popper/src/composables/use-content.d.ts +2 -2
  78. package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  79. package/es/components/popper/src/content.vue.d.ts +1 -1
  80. package/es/components/popper/src/popper.d.ts +2 -2
  81. package/es/components/progress/src/progress.vue.d.ts +1 -1
  82. package/es/components/radio/src/radio-button.d.ts +3 -3
  83. package/es/components/radio/src/radio-group.vue.d.ts +2 -2
  84. package/es/components/radio/src/radio.d.ts +6 -6
  85. package/es/components/radio/src/radio.vue.d.ts +1 -1
  86. package/es/components/rate/src/rate.vue.d.ts +1 -1
  87. package/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
  88. package/es/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
  89. package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
  90. package/es/components/row/src/row.d.ts +1 -1
  91. package/es/components/segmented/index.d.ts +2 -2
  92. package/es/components/segmented/src/segmented.d.ts +2 -2
  93. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  94. package/es/components/select/src/option.d.ts +2 -2
  95. package/es/components/select/src/option.vue.d.ts +5 -5
  96. package/es/components/select/src/select.d.ts +3 -3
  97. package/es/components/select/src/select.vue.d.ts +31 -31
  98. package/es/components/select/src/select.vue_vue_type_script_lang.mjs +1 -1
  99. package/es/components/select/src/useOption.d.ts +2 -2
  100. package/es/components/select/src/useSelect.d.ts +5 -5
  101. package/es/components/select-v2/src/defaults.d.ts +1 -1
  102. package/es/components/select-v2/src/select.vue.d.ts +15 -15
  103. package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +1 -1
  104. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  105. package/es/components/slider/src/button.vue.d.ts +1 -1
  106. package/es/components/slider/src/slider.vue.d.ts +3 -3
  107. package/es/components/space/src/space.d.ts +4 -4
  108. package/es/components/splitter/src/splitter.d.ts +1 -1
  109. package/es/components/steps/src/steps.d.ts +1 -1
  110. package/es/components/steps/src/steps.vue.d.ts +1 -1
  111. package/es/components/switch/src/switch.vue.d.ts +2 -2
  112. package/es/components/table/src/filter-panel.vue.d.ts +16 -16
  113. package/es/components/table/src/table/defaults.d.ts +5 -5
  114. package/es/components/table/src/table-column/defaults.d.ts +2 -2
  115. package/es/components/table/src/table-header/index.d.ts +5 -5
  116. package/es/components/table/src/table.vue.d.ts +1 -1
  117. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +1 -1
  118. package/es/components/tabs/src/tabs.d.ts +4 -4
  119. package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
  120. package/es/components/time-picker/src/common/picker.vue.d.ts +11 -11
  121. package/es/components/time-picker/src/common/props.d.ts +2 -2
  122. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs +1 -1
  123. package/es/components/time-picker/src/time-picker.d.ts +7 -7
  124. package/es/components/time-select/src/time-select.vue.d.ts +5 -5
  125. package/es/components/timeline/src/timeline-item.d.ts +1 -1
  126. package/es/components/tooltip/src/content.vue.d.ts +2 -2
  127. package/es/components/tooltip/src/tooltip.d.ts +2 -2
  128. package/es/components/tooltip/src/tooltip.vue.d.ts +2 -2
  129. package/es/components/tooltip/src/trigger.d.ts +1 -1
  130. package/es/components/tour/src/content.d.ts +1 -1
  131. package/es/components/tour/src/content.vue.d.ts +1 -1
  132. package/es/components/tour/src/mask.vue.d.ts +1 -1
  133. package/es/components/tour/src/step.d.ts +1 -1
  134. package/es/components/tour/src/tour.d.ts +1 -1
  135. package/es/components/tour/src/tour.vue.d.ts +5 -5
  136. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  137. package/es/components/tree/src/tree-node.vue.d.ts +5 -5
  138. package/es/components/tree/src/tree.vue.d.ts +5 -5
  139. package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
  140. package/es/components/tree-select/src/tree-select.vue.d.ts +13 -13
  141. package/es/components/tree-v2/src/composables/useTree.d.ts +8 -8
  142. package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  143. package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
  144. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  145. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  146. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  147. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  148. package/es/components/virtual-list/src/components/scrollbar.d.ts +3 -3
  149. package/es/components/virtual-list/src/props.d.ts +2 -2
  150. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  151. package/es/hooks/use-floating/index.d.ts +4 -4
  152. package/es/hooks/use-popper/index.d.ts +2 -2
  153. package/es/index.mjs +11 -11
  154. package/es/plugin.mjs +1 -1
  155. package/es/version.d.ts +1 -1
  156. package/es/version.mjs +1 -1
  157. package/es/version.mjs.map +1 -1
  158. package/lib/component.js +109 -109
  159. package/lib/components/affix/src/affix.d.ts +1 -1
  160. package/lib/components/affix/src/affix.vue.d.ts +2 -2
  161. package/lib/components/alert/src/alert.vue.d.ts +1 -1
  162. package/lib/components/anchor/src/anchor.d.ts +2 -2
  163. package/lib/components/anchor/src/anchor.vue.d.ts +3 -3
  164. package/lib/components/autocomplete/src/autocomplete.d.ts +2 -2
  165. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
  166. package/lib/components/avatar/src/avatar.d.ts +1 -1
  167. package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
  168. package/lib/components/button/src/button-group.d.ts +2 -2
  169. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  170. package/lib/components/button/src/button.d.ts +1 -1
  171. package/lib/components/button/src/button.vue.d.ts +1 -1
  172. package/lib/components/button/src/use-button.d.ts +1 -1
  173. package/lib/components/calendar/src/calendar.d.ts +1 -1
  174. package/lib/components/card/src/card.vue.d.ts +1 -1
  175. package/lib/components/carousel/src/carousel.d.ts +2 -2
  176. package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
  177. package/lib/components/cascader/src/cascader.d.ts +2 -2
  178. package/lib/components/cascader/src/cascader.vue.d.ts +6 -6
  179. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +26 -26
  180. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  181. package/lib/components/cascader-panel/src/index.vue.d.ts +3 -3
  182. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
  183. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  184. package/lib/components/checkbox/src/checkbox.d.ts +8 -8
  185. package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
  186. package/lib/components/col/src/col.vue.d.ts +2 -2
  187. package/lib/components/collapse/src/collapse.vue.d.ts +1 -1
  188. package/lib/components/color-picker/src/color-picker.vue.d.ts +5 -5
  189. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js +18 -18
  190. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  191. package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
  192. package/lib/components/date-picker/src/date-picker.d.ts +7 -7
  193. package/lib/components/date-picker/src/props.d.ts +2 -2
  194. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  195. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js +18 -18
  196. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js.map +1 -1
  197. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +23 -23
  198. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
  199. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  200. package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  201. package/lib/components/descriptions/src/description-item.d.ts +18 -18
  202. package/lib/components/descriptions/src/description.d.ts +1 -1
  203. package/lib/components/descriptions/src/description.vue.d.ts +1 -1
  204. package/lib/components/dialog/src/dialog.vue.d.ts +3 -3
  205. package/lib/components/divider/src/divider.d.ts +2 -2
  206. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  207. package/lib/components/drawer/src/drawer.vue.d.ts +4 -4
  208. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  209. package/lib/components/dropdown/src/dropdown.d.ts +4 -4
  210. package/lib/components/dropdown/src/dropdown.vue.d.ts +28 -28
  211. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  212. package/lib/components/index.js +125 -125
  213. package/lib/components/input/src/input.d.ts +1 -1
  214. package/lib/components/input/src/input.vue.d.ts +4 -4
  215. package/lib/components/input-number/src/input-number.d.ts +1 -1
  216. package/lib/components/input-number/src/input-number.vue.d.ts +3 -3
  217. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +12 -12
  218. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
  219. package/lib/components/input-otp/src/input-otp.vue.d.ts +3 -3
  220. package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
  221. package/lib/components/link/src/link.d.ts +1 -1
  222. package/lib/components/link/src/link.vue.d.ts +1 -1
  223. package/lib/components/mention/src/mention.d.ts +2 -2
  224. package/lib/components/menu/src/menu.d.ts +8 -8
  225. package/lib/components/menu/src/menu.js +7 -7
  226. package/lib/components/menu/src/menu.js.map +1 -1
  227. package/lib/components/menu/src/sub-menu.d.ts +1 -1
  228. package/lib/components/message/src/instance.d.ts +1 -1
  229. package/lib/components/message/src/message.d.ts +1 -1
  230. package/lib/components/message/src/message.vue.d.ts +4 -4
  231. package/lib/components/message-box/src/index.vue.d.ts +17 -17
  232. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +19 -19
  233. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
  234. package/lib/components/notification/src/notification.vue.d.ts +5 -5
  235. package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -1
  236. package/lib/components/pagination/src/pagination.d.ts +2 -2
  237. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  238. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
  239. package/lib/components/popover/src/popover.d.ts +2 -2
  240. package/lib/components/popover/src/popover.vue.d.ts +2 -2
  241. package/lib/components/popper/src/composables/use-content.d.ts +2 -2
  242. package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  243. package/lib/components/popper/src/content.vue.d.ts +1 -1
  244. package/lib/components/popper/src/popper.d.ts +2 -2
  245. package/lib/components/progress/src/progress.vue.d.ts +1 -1
  246. package/lib/components/radio/src/radio-button.d.ts +3 -3
  247. package/lib/components/radio/src/radio-group.vue.d.ts +2 -2
  248. package/lib/components/radio/src/radio.d.ts +6 -6
  249. package/lib/components/radio/src/radio.vue.d.ts +1 -1
  250. package/lib/components/rate/src/rate.vue.d.ts +1 -1
  251. package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
  252. package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
  253. package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
  254. package/lib/components/row/src/row.d.ts +1 -1
  255. package/lib/components/segmented/index.d.ts +2 -2
  256. package/lib/components/segmented/src/segmented.d.ts +2 -2
  257. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  258. package/lib/components/select/src/option.d.ts +2 -2
  259. package/lib/components/select/src/option.vue.d.ts +5 -5
  260. package/lib/components/select/src/select.d.ts +3 -3
  261. package/lib/components/select/src/select.vue.d.ts +31 -31
  262. package/lib/components/select/src/select.vue_vue_type_script_lang.js +10 -10
  263. package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
  264. package/lib/components/select/src/useOption.d.ts +2 -2
  265. package/lib/components/select/src/useSelect.d.ts +5 -5
  266. package/lib/components/select-v2/src/defaults.d.ts +1 -1
  267. package/lib/components/select-v2/src/select.vue.d.ts +15 -15
  268. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +10 -10
  269. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
  270. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  271. package/lib/components/slider/src/button.vue.d.ts +1 -1
  272. package/lib/components/slider/src/slider.vue.d.ts +3 -3
  273. package/lib/components/space/src/space.d.ts +4 -4
  274. package/lib/components/splitter/src/splitter.d.ts +1 -1
  275. package/lib/components/steps/src/steps.d.ts +1 -1
  276. package/lib/components/steps/src/steps.vue.d.ts +1 -1
  277. package/lib/components/switch/src/switch.vue.d.ts +2 -2
  278. package/lib/components/table/src/filter-panel.vue.d.ts +16 -16
  279. package/lib/components/table/src/table/defaults.d.ts +5 -5
  280. package/lib/components/table/src/table-column/defaults.d.ts +2 -2
  281. package/lib/components/table/src/table-header/index.d.ts +5 -5
  282. package/lib/components/table/src/table.vue.d.ts +1 -1
  283. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +9 -9
  284. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -1
  285. package/lib/components/tabs/src/tabs.d.ts +4 -4
  286. package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
  287. package/lib/components/time-picker/src/common/picker.vue.d.ts +11 -11
  288. package/lib/components/time-picker/src/common/props.d.ts +2 -2
  289. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js +10 -10
  290. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  291. package/lib/components/time-picker/src/time-picker.d.ts +7 -7
  292. package/lib/components/time-select/src/time-select.vue.d.ts +5 -5
  293. package/lib/components/timeline/src/timeline-item.d.ts +1 -1
  294. package/lib/components/tooltip/src/content.vue.d.ts +2 -2
  295. package/lib/components/tooltip/src/tooltip.d.ts +2 -2
  296. package/lib/components/tooltip/src/tooltip.vue.d.ts +2 -2
  297. package/lib/components/tooltip/src/trigger.d.ts +1 -1
  298. package/lib/components/tour/src/content.d.ts +1 -1
  299. package/lib/components/tour/src/content.vue.d.ts +1 -1
  300. package/lib/components/tour/src/mask.vue.d.ts +1 -1
  301. package/lib/components/tour/src/step.d.ts +1 -1
  302. package/lib/components/tour/src/tour.d.ts +1 -1
  303. package/lib/components/tour/src/tour.vue.d.ts +5 -5
  304. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  305. package/lib/components/tree/src/tree-node.vue.d.ts +5 -5
  306. package/lib/components/tree/src/tree.vue.d.ts +5 -5
  307. package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
  308. package/lib/components/tree-select/src/tree-select.vue.d.ts +13 -13
  309. package/lib/components/tree-v2/src/composables/useTree.d.ts +8 -8
  310. package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  311. package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
  312. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  313. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  314. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  315. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  316. package/lib/components/virtual-list/src/components/scrollbar.d.ts +3 -3
  317. package/lib/components/virtual-list/src/props.d.ts +2 -2
  318. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  319. package/lib/hooks/use-floating/index.d.ts +4 -4
  320. package/lib/hooks/use-popper/index.d.ts +2 -2
  321. package/lib/index.js +267 -267
  322. package/lib/plugin.js +12 -12
  323. package/lib/plugin.js.map +1 -1
  324. package/lib/version.d.ts +1 -1
  325. package/lib/version.js +1 -1
  326. package/lib/version.js.map +1 -1
  327. package/package.json +1 -1
  328. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAmHA,MAA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A,OAAO,SAAA;WAAS;gCACR,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,SAAA,CAAA,CAAA;;gBAERA,KAAAA,OAAO,SAAA;WAAS;gCACR,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAmHA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,cAAA,WAAU;EACxB,MAAM,KAAK,gBAAA,aAAa,eAAc;EACtC,MAAM,SAAA,GAAA,IAAA,MAA2B;EAMjC,MAAM,QAAA,GAAA,IAAA,UAAsB;GAC1B,cAAc,MAAM;GACpB,WAAW;GACZ,CAAA;EAED,MAAM,EAAE,aAAa,sBAAA,aAAY;EAEjC,MAAM,eAAA,GAAA,IAAA,gBACE,cAAA,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,MAAM,IAChE;E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OjB,KAAA,QAAA,iBAAA,EAAA,QAAA,EAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OADK,gBAAA,OAAA,EAAA,MAAA;qCAF2B,CAAnB,gBAAA,UAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OAAmB,wBAAA,QAAA,EAAA,EAAA,KAAA,GAAA,CAAA,MAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OACpB,wBAAA,KAAA,EAAA,EAAA,KAAA,GAAA,CAAA,EAAA,CAAA;;6EATH,SAAQ,CAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA;wCA4Cf,gBAAA,QAAA,EAAA;KA9BR,IAAI,QAAA;cACD;KAAJ,KAAI;KACH,MAAM,QAAA,YAAS,SAAA;KACf,MAAM,QAAA;KACN,eAAa,aAAA;KACb,aAAa,QAAA;KACb,UAAU,QAAA;KACV,WAAA,GAAA,IAAA,OAAU,oBAAmB;KAC7B,OAAA,GAAA,IAAA,OAAM,gBAAe;KACrB,KAAK,QAAA;KACL,KAAK,QAAA;KACL,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,kBAAgB;KAChB,WAAW,QAAA;KACX,WAAW,QAAA;KACX,QAAQ,QAAA;KACR,UAAU,QAAA;KACV,WAAS;KACT,QAAM;KACN,SAAO;KACP,SAAO;KACP,UAAQ;uCAEOA,KAAAA,OAAO,SAAA;WAAS;gCACR,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,SAAA,CAAA,CAAA;;gBAERA,KAAAA,OAAO,SAAA;WAAS;gCACR,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -28,17 +28,17 @@ declare const __VLS_base: _$vue.DefineComponent<InputOtpProps, {
28
28
  blur: (eve: FocusEvent) => void;
29
29
  finish: (value: string) => void;
30
30
  }, string, _$vue.PublicProps, Readonly<InputOtpProps> & Readonly<{
31
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
32
31
  onChange?: ((value: string) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
33
33
  onFocus?: ((eve: FocusEvent) => any) | undefined;
34
34
  onBlur?: ((eve: FocusEvent) => any) | undefined;
35
35
  onFinish?: ((value: string) => any) | undefined;
36
36
  }>, {
37
- type: "outlined" | "filled" | "underlined";
38
37
  length: number;
39
- validator: (char: string, index: number) => boolean;
38
+ type: "outlined" | "filled" | "underlined";
40
39
  disabled: boolean;
41
40
  validateEvent: boolean;
41
+ validator: (char: string, index: number) => boolean;
42
42
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
43
43
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
44
  declare const _default: typeof __VLS_export;
@@ -24,20 +24,20 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
24
24
  focus: () => void;
25
25
  blur: () => void;
26
26
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
27
+ clear: () => void;
27
28
  "update:modelValue": (value?: string[] | undefined) => void;
28
- change: (value?: string[] | undefined) => void;
29
29
  input: (value: string) => void;
30
- clear: () => void;
30
+ change: (value?: string[] | undefined) => void;
31
31
  focus: (evt: FocusEvent) => void;
32
32
  blur: (evt: FocusEvent) => void;
33
33
  "add-tag": (value: string | string[]) => void;
34
34
  "remove-tag": (value: string, index: number) => void;
35
35
  "drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
36
36
  }, string, _$vue.PublicProps, Readonly<InputTagProps> & Readonly<{
37
- "onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
37
+ onClear?: (() => any) | undefined;
38
38
  onChange?: ((value?: string[] | undefined) => any) | undefined;
39
+ "onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
39
40
  onInput?: ((value: string) => any) | undefined;
40
- onClear?: (() => any) | undefined;
41
41
  onFocus?: ((evt: FocusEvent) => any) | undefined;
42
42
  onBlur?: ((evt: FocusEvent) => any) | undefined;
43
43
  "onAdd-tag"?: ((value: string | string[]) => any) | undefined;
@@ -35,7 +35,7 @@ interface LinkProps {
35
35
  * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
36
36
  */
37
37
  declare const linkProps: {
38
- readonly type: EpPropFinalized<StringConstructor, "default" | "info" | "primary" | "success" | "warning" | "danger", unknown, undefined, boolean>;
38
+ readonly type: EpPropFinalized<StringConstructor, "info" | "default" | "primary" | "success" | "warning" | "danger", unknown, undefined, boolean>;
39
39
  readonly underline: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
40
40
  readonly disabled: BooleanConstructor;
41
41
  readonly href: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -14,9 +14,9 @@ declare const __VLS_base: _$vue.DefineComponent<LinkProps, {}, {}, {}, {}, _$vue
14
14
  onClick?: ((evt: MouseEvent) => any) | undefined;
15
15
  }>, {
16
16
  type: "primary" | "success" | "warning" | "info" | "danger" | "default";
17
- target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
18
17
  underline: boolean | "always" | "never" | "hover";
19
18
  href: string;
19
+ target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
20
20
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
22
  declare const _default: typeof __VLS_export;
@@ -81,7 +81,7 @@ declare const mentionProps: {
81
81
  prefix: EpPropFinalized<(new (...args: any[]) => string | string[]) | (() => string | string[]) | (((new (...args: any[]) => string | string[]) | (() => string | string[])) | null)[], unknown, unknown, string, boolean>;
82
82
  split: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
83
83
  filterOption: EpPropFinalized<(new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (((new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean))) | null)[], unknown, unknown, () => <T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean, boolean>;
84
- placement: EpPropFinalized<(new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom") | (((new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom")) | null)[], unknown, unknown, string, boolean>;
84
+ placement: EpPropFinalized<(new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top") | (((new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top")) | null)[], unknown, unknown, string, boolean>;
85
85
  showArrow: BooleanConstructor;
86
86
  offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
87
87
  whole: BooleanConstructor;
@@ -224,7 +224,7 @@ declare const mentionProps: {
224
224
  };
225
225
  type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
226
226
  resize: {
227
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
227
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "vertical" | "horizontal" | "none" | "both", unknown>>;
228
228
  readonly required: false;
229
229
  readonly validator: ((val: unknown) => boolean) | undefined;
230
230
  __epPropKey: true;
@@ -7,12 +7,12 @@ import { NavigationFailure } from "vue-router";
7
7
 
8
8
  //#region ../../packages/components/menu/src/menu.d.ts
9
9
  declare const menuProps: {
10
- readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
10
+ readonly mode: EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "vertical", boolean>;
11
11
  readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
12
12
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
13
13
  readonly uniqueOpened: BooleanConstructor;
14
14
  readonly router: BooleanConstructor;
15
- readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
15
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
16
16
  readonly collapse: BooleanConstructor;
17
17
  readonly backgroundColor: StringConstructor;
18
18
  readonly textColor: StringConstructor;
@@ -43,12 +43,12 @@ declare const menuEmits: {
43
43
  };
44
44
  type MenuEmits = typeof menuEmits;
45
45
  declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
46
- readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
46
+ readonly mode: EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "vertical", boolean>;
47
47
  readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
48
48
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
49
49
  readonly uniqueOpened: BooleanConstructor;
50
50
  readonly router: BooleanConstructor;
51
- readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
51
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
52
52
  readonly collapse: BooleanConstructor;
53
53
  readonly backgroundColor: StringConstructor;
54
54
  readonly textColor: StringConstructor;
@@ -76,12 +76,12 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
76
76
  open: (index: string, indexPath: string[]) => boolean;
77
77
  select: (index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure>) => boolean;
78
78
  }, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
79
- readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
79
+ readonly mode: EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "vertical", boolean>;
80
80
  readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
81
81
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
82
82
  readonly uniqueOpened: BooleanConstructor;
83
83
  readonly router: BooleanConstructor;
84
- readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
84
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
85
85
  readonly collapse: BooleanConstructor;
86
86
  readonly backgroundColor: StringConstructor;
87
87
  readonly textColor: StringConstructor;
@@ -110,12 +110,12 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
110
110
  readonly collapse: boolean;
111
111
  readonly ellipsis: EpPropMergeType<BooleanConstructor, unknown, unknown>;
112
112
  readonly persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
113
- readonly mode: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
113
+ readonly mode: EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
114
114
  readonly showTimeout: number;
115
115
  readonly hideTimeout: number;
116
116
  readonly defaultActive: string;
117
117
  readonly defaultOpeneds: string[];
118
- readonly menuTrigger: EpPropMergeType<StringConstructor, "hover" | "click", unknown>;
118
+ readonly menuTrigger: EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
119
119
  readonly collapseTransition: EpPropMergeType<BooleanConstructor, unknown, unknown>;
120
120
  readonly popperOffset: number;
121
121
  readonly ellipsisIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
@@ -8,9 +8,9 @@ const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
8
8
  const require_icon = require("../../../utils/vue/icon.js");
9
9
  const require_vnode = require("../../../utils/vue/vnode.js");
10
10
  const require_typescript = require("../../../utils/typescript.js");
11
- const require_index = require("../../../directives/click-outside/index.js");
12
- const require_index$1 = require("../../../hooks/use-namespace/index.js");
13
- const require_index$2 = require("../../icon/index.js");
11
+ const require_index = require("../../../hooks/use-namespace/index.js");
12
+ const require_index$1 = require("../../icon/index.js");
13
+ const require_index$2 = require("../../../directives/click-outside/index.js");
14
14
  const require_menu_bar = require("./utils/menu-bar.js");
15
15
  const require_menu_collapse_transition = require("./menu-collapse-transition.js");
16
16
  const require_use_menu_css_var = require("./use-menu-css-var.js");
@@ -165,8 +165,8 @@ var menu_default = (0, vue.defineComponent)({
165
165
  const router = instance.appContext.config.globalProperties.$router;
166
166
  const menu = (0, vue.ref)();
167
167
  const subMenu = (0, vue.ref)();
168
- const nsMenu = require_index$1.useNamespace("menu");
169
- const nsSubMenu = require_index$1.useNamespace("sub-menu");
168
+ const nsMenu = require_index.useNamespace("menu");
169
+ const nsSubMenu = require_index.useNamespace("sub-menu");
170
170
  let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
171
171
  const sliceIndex = (0, vue.ref)(-1);
172
172
  const openedMenus = (0, vue.ref)(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
@@ -354,12 +354,12 @@ var menu_default = (0, vue.defineComponent)({
354
354
  class: nsSubMenu.e("hide-arrow"),
355
355
  popperOffset: props.popperOffset
356
356
  }, {
357
- title: () => (0, vue.h)(require_index$2.ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => (0, vue.h)(props.ellipsisIcon) }),
357
+ title: () => (0, vue.h)(require_index$1.ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => (0, vue.h)(props.ellipsisIcon) }),
358
358
  default: () => slotMore
359
359
  }));
360
360
  }
361
361
  }
362
- const directives = props.closeOnClickOutside ? [[require_index.default, () => {
362
+ const directives = props.closeOnClickOutside ? [[require_index$2.default, () => {
363
363
  if (!openedMenus.value.length) return;
364
364
  if (!mouseInChild.value) {
365
365
  openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n CSSProperties,\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: String,\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,YAAYA,kBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;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version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n CSSProperties,\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: String,\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,YAAYA,kBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;;;;CAID,eAAe;EACb,MAAM;EACN,SAAS;EACV;;;;CAID,gBAAgB;EACd,MAAMC,kBAAAA,eAAyB,MAAM;EACrC,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;;;;CAID,cAAc;;;;CAId,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,QAA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AAW,MAAM;IAErE,IAAI,UAAU,UAAU,MAAM,UAAU;KACtC,OAAO;KACP,UAAU,MAAA,GAAA,IAAA,GAENC,iBAAAA,SACA;MACE,KAAK;MACL,OAAO;MACP,OAAO,UAAU,EAAE,aAAa;MAChC,cAAc,MAAM;MACrB,EACD;MACE,cAAA,GAAA,IAAA,GAEIC,gBAAAA,QACA,EACE,OAAO,UAAU,EAAE,YAAY,EAChC,EACD,EACE,gBAAA,GAAA,IAAA,GAAiB,MAAM,aAA0B,EAClD,CACF;MACH,eAAe;MAChB,CACF,CACF;;;GAIL,MAAM,aAAiC,MAAM,sBACzC,CACE,CACEC,gBAAAA,eACM;IACJ,IAAI,CAAC,YAAY,MAAM,QAAQ;IAE/B,IAAI,CAAC,aAAa,OAAO;KACvB,YAAY,MAAM,SAAS,eACzB,KAAK,SAAS,YAAY,aAAa,WAAW,CAAC,CACpD;KAED,YAAY,QAAQ,EAAE;;KAG3B,CACF,GACD,EAAE;GAEN,MAAM,SAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,GAEF,MACA;IACE,KAAK,OAAO,MAAM,SAAS;IAC3B,MAAM;IACN,KAAK;IACL,OAAO,QAAQ;IACf,OAAO;MACJ,OAAO,GAAG,GAAG;MACb,OAAO,EAAE,MAAM,KAAK,GAAG;MACvB,OAAO,EAAE,WAAW,GAAG,MAAM;KAC/B;IACF,EACD,CAAC,GAAG,MAAM,GAAG,UAAU,CACxB,EACD,WACD;GAED,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAA,IAAA,GAASC,iCAAAA,eAAgC,MAAM;GAGjD,OAAO;;;CAGZ,CAAC"}
@@ -138,8 +138,8 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
138
138
  __epPropKey: true;
139
139
  };
140
140
  }>> & Readonly<{}>, {
141
- readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
142
141
  readonly disabled: boolean;
142
+ readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
143
143
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
144
144
  //#endregion
145
145
  export { SubMenuProps, SubMenuPropsPublic, _default as default, subMenuProps };
@@ -11,7 +11,7 @@ type MessageContext = {
11
11
  vm: ComponentInternalInstance;
12
12
  props: Mutable<MessageProps>;
13
13
  };
14
- declare const placementInstances: _$vue.ShallowReactive<Record<"top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right", MessageContext[]>>;
14
+ declare const placementInstances: _$vue.ShallowReactive<Record<"bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right", MessageContext[]>>;
15
15
  declare const getOrCreatePlacementInstances: (placement: MessagePlacement) => MessageContext[];
16
16
  declare const getInstance: (id: string, placement: MessagePlacement) => {
17
17
  current: MessageContext;
@@ -133,7 +133,7 @@ declare const messageProps: {
133
133
  readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
134
134
  readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
135
135
  readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 16, boolean>;
136
- readonly placement: EpPropFinalized<StringConstructor, "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
136
+ readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
137
137
  readonly zIndex: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
138
138
  readonly grouping: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
139
139
  readonly repeatNum: EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
@@ -18,16 +18,16 @@ declare const __VLS_base: _$vue.DefineComponent<MessageProps, {
18
18
  onDestroy?: (() => any) | undefined;
19
19
  }>, {
20
20
  type: MessageType;
21
- message: string | _$vue.VNode | (() => _$vue.VNode);
22
- zIndex: number;
23
- offset: number;
24
21
  onClose: () => void;
22
+ offset: number;
23
+ duration: number;
25
24
  id: string;
26
25
  icon: IconPropType;
26
+ zIndex: number;
27
27
  placement: MessagePlacement;
28
+ message: string | _$vue.VNode | (() => _$vue.VNode);
28
29
  plain: boolean;
29
30
  showClose: boolean;
30
- duration: number;
31
31
  customClass: string;
32
32
  dangerouslyUseHTMLString: boolean;
33
33
  grouping: boolean;
@@ -4031,8 +4031,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4031
4031
  dangerouslyUseHTMLString: _$vue.Ref<boolean, boolean>;
4032
4032
  confirmButtonText: _$vue.Ref<string, string>;
4033
4033
  cancelButtonText: _$vue.Ref<string, string>;
4034
- confirmButtonType: _$vue.Ref<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
4035
- cancelButtonType: _$vue.Ref<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
4034
+ confirmButtonType: _$vue.Ref<"" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger", "" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger">;
4035
+ cancelButtonType: _$vue.Ref<"" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger", "" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger">;
4036
4036
  confirmButtonLoading: _$vue.Ref<boolean, boolean>;
4037
4037
  cancelButtonLoading: _$vue.Ref<boolean, boolean>;
4038
4038
  confirmButtonLoadingIcon: _$vue.Ref<string | _$vue.FunctionalComponent<any, {}, any, {}> | {
@@ -4601,7 +4601,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4601
4601
  }>, {
4602
4602
  ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
4603
4603
  size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
4604
- type: _$vue.ComputedRef<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
4604
+ type: _$vue.ComputedRef<"" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger">;
4605
4605
  disabled: _$vue.ComputedRef<boolean>;
4606
4606
  shouldAddSpace: _$vue.ComputedRef<boolean>;
4607
4607
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
@@ -4629,7 +4629,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4629
4629
  }>, {
4630
4630
  ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
4631
4631
  size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
4632
- type: _$vue.ComputedRef<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
4632
+ type: _$vue.ComputedRef<"" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger">;
4633
4633
  disabled: _$vue.ComputedRef<boolean>;
4634
4634
  shouldAddSpace: _$vue.ComputedRef<boolean>;
4635
4635
  }, {}, {}, {}, {
@@ -4652,7 +4652,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4652
4652
  }>, {
4653
4653
  ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
4654
4654
  size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
4655
- type: _$vue.ComputedRef<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
4655
+ type: _$vue.ComputedRef<"" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger">;
4656
4656
  disabled: _$vue.ComputedRef<boolean>;
4657
4657
  shouldAddSpace: _$vue.ComputedRef<boolean>;
4658
4658
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
@@ -4680,7 +4680,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4680
4680
  setPropsDefaults: (defaults: {
4681
4681
  readonly size?: "" | "default" | "small" | "large" | (() => "" | "default" | "small" | "large") | undefined;
4682
4682
  readonly disabled?: boolean | (() => boolean) | undefined;
4683
- readonly type?: "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger" | (() => "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger") | undefined;
4683
+ readonly type?: "" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger" | (() => "" | "info" | "default" | "primary" | "success" | "warning" | "text" | "danger") | undefined;
4684
4684
  readonly icon?: string | _$vue.FunctionalComponent<any, {}, any, {}> | {
4685
4685
  new (...args: any[]): any;
4686
4686
  __isFragment?: never;
@@ -4744,14 +4744,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4744
4744
  }>, {
4745
4745
  loop: boolean;
4746
4746
  trapped: boolean;
4747
- focusStartEl: HTMLElement | "first" | "container";
4747
+ focusStartEl: HTMLElement | "container" | "first";
4748
4748
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
4749
4749
  ElInput: SFCWithInstall<{
4750
4750
  new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<InputProps> & Readonly<{
4751
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4751
+ onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4752
4752
  onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
4753
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4753
4754
  onInput?: ((value: string) => any) | undefined;
4754
- onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4755
4755
  onFocus?: ((evt: FocusEvent) => any) | undefined;
4756
4756
  onBlur?: ((evt: FocusEvent) => any) | undefined;
4757
4757
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
@@ -4774,10 +4774,10 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4774
4774
  clear: (evt?: MouseEvent) => void;
4775
4775
  resizeTextarea: () => void;
4776
4776
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
4777
- "update:modelValue": (value: string) => void;
4777
+ clear: (evt: MouseEvent | undefined) => void;
4778
4778
  change: (value: string, evt?: Event | undefined) => void;
4779
+ "update:modelValue": (value: string) => void;
4779
4780
  input: (value: string) => void;
4780
- clear: (evt: MouseEvent | undefined) => void;
4781
4781
  focus: (evt: FocusEvent) => void;
4782
4782
  blur: (evt: FocusEvent) => void;
4783
4783
  mouseleave: (evt: MouseEvent) => void;
@@ -4806,10 +4806,10 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4806
4806
  M: {};
4807
4807
  Defaults: {};
4808
4808
  }, Readonly<InputProps> & Readonly<{
4809
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4809
+ onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4810
4810
  onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
4811
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4811
4812
  onInput?: ((value: string) => any) | undefined;
4812
- onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4813
4813
  onFocus?: ((evt: FocusEvent) => any) | undefined;
4814
4814
  onBlur?: ((evt: FocusEvent) => any) | undefined;
4815
4815
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
@@ -4848,10 +4848,10 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4848
4848
  __isTeleport?: never;
4849
4849
  __isSuspense?: never;
4850
4850
  } & _$vue.ComponentOptionsBase<Readonly<InputProps> & Readonly<{
4851
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4851
+ onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4852
4852
  onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
4853
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
4853
4854
  onInput?: ((value: string) => any) | undefined;
4854
- onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
4855
4855
  onFocus?: ((evt: FocusEvent) => any) | undefined;
4856
4856
  onBlur?: ((evt: FocusEvent) => any) | undefined;
4857
4857
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
@@ -4874,10 +4874,10 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
4874
4874
  clear: (evt?: MouseEvent) => void;
4875
4875
  resizeTextarea: () => void;
4876
4876
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
4877
- "update:modelValue": (value: string) => void;
4877
+ clear: (evt: MouseEvent | undefined) => void;
4878
4878
  change: (value: string, evt?: Event | undefined) => void;
4879
+ "update:modelValue": (value: string) => void;
4879
4880
  input: (value: string) => void;
4880
- clear: (evt: MouseEvent | undefined) => void;
4881
4881
  focus: (evt: FocusEvent) => void;
4882
4882
  blur: (evt: FocusEvent) => void;
4883
4883
  mouseleave: (evt: MouseEvent) => void;