element-pe 2.2.80 → 2.2.82

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 (713) hide show
  1. package/README.md +5 -8
  2. package/dist/index.full.js +173 -130
  3. package/dist/index.full.min.js +14 -14
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +15 -15
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +173 -130
  8. package/es/components/affix/index.mjs +2 -2
  9. package/es/components/affix/src/affix.mjs +119 -26
  10. package/es/components/affix/src/affix.mjs.map +1 -1
  11. package/es/components/affix/src/affix2.mjs +26 -119
  12. package/es/components/affix/src/affix2.mjs.map +1 -1
  13. package/es/components/autocomplete/index.d.ts +1 -1
  14. package/es/components/autocomplete/index.mjs +2 -2
  15. package/es/components/autocomplete/src/autocomplete.d.ts +3 -9
  16. package/es/components/autocomplete/src/autocomplete.mjs +379 -99
  17. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  18. package/es/components/autocomplete/src/autocomplete.vue.d.ts +7 -8
  19. package/es/components/autocomplete/src/autocomplete2.mjs +99 -380
  20. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  21. package/es/components/avatar/index.mjs +2 -2
  22. package/es/components/avatar/src/avatar.mjs +76 -35
  23. package/es/components/avatar/src/avatar.mjs.map +1 -1
  24. package/es/components/avatar/src/avatar2.mjs +35 -76
  25. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  26. package/es/components/backtop/index.mjs +2 -2
  27. package/es/components/backtop/src/backtop.mjs +61 -23
  28. package/es/components/backtop/src/backtop.mjs.map +1 -1
  29. package/es/components/backtop/src/backtop2.mjs +23 -61
  30. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  31. package/es/components/breadcrumb/index.mjs +2 -2
  32. package/es/components/breadcrumb/src/breadcrumb.mjs +11 -36
  33. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  34. package/es/components/breadcrumb/src/breadcrumb2.mjs +36 -11
  35. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  36. package/es/components/button/index.mjs +1 -1
  37. package/es/components/button/src/button-group.mjs +30 -6
  38. package/es/components/button/src/button-group.mjs.map +1 -1
  39. package/es/components/button/src/button-group2.mjs +6 -30
  40. package/es/components/button/src/button-group2.mjs.map +1 -1
  41. package/es/components/card/index.d.ts +2 -0
  42. package/es/components/card/index.mjs +2 -2
  43. package/es/components/card/src/card.d.ts +1 -0
  44. package/es/components/card/src/card.mjs +35 -16
  45. package/es/components/card/src/card.mjs.map +1 -1
  46. package/es/components/card/src/card.vue.d.ts +2 -0
  47. package/es/components/card/src/card2.mjs +17 -35
  48. package/es/components/card/src/card2.mjs.map +1 -1
  49. package/es/components/cascader/index.d.ts +8 -0
  50. package/es/components/cascader/index.mjs +2 -2
  51. package/es/components/cascader/src/cascader.d.ts +1 -0
  52. package/es/components/cascader/src/cascader.mjs +647 -82
  53. package/es/components/cascader/src/cascader.mjs.map +1 -1
  54. package/es/components/cascader/src/cascader.vue.d.ts +4 -0
  55. package/es/components/cascader/src/cascader2.mjs +86 -647
  56. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  57. package/es/components/check-tag/index.mjs +2 -2
  58. package/es/components/check-tag/src/check-tag.mjs +31 -12
  59. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  60. package/es/components/check-tag/src/check-tag2.mjs +12 -31
  61. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  62. package/es/components/checkbox/index.mjs +4 -4
  63. package/es/components/checkbox/src/checkbox-button.mjs +11 -7
  64. package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
  65. package/es/components/checkbox/src/checkbox-group.mjs +72 -33
  66. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  67. package/es/components/checkbox/src/checkbox-group2.mjs +33 -72
  68. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  69. package/es/components/checkbox/src/checkbox.mjs +54 -125
  70. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  71. package/es/components/checkbox/src/checkbox2.mjs +125 -54
  72. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  73. package/es/components/col/index.mjs +2 -2
  74. package/es/components/col/src/col.mjs +43 -66
  75. package/es/components/col/src/col.mjs.map +1 -1
  76. package/es/components/col/src/col2.mjs +66 -43
  77. package/es/components/col/src/col2.mjs.map +1 -1
  78. package/es/components/collapse/index.mjs +2 -2
  79. package/es/components/collapse/src/collapse.mjs +30 -17
  80. package/es/components/collapse/src/collapse.mjs.map +1 -1
  81. package/es/components/collapse/src/collapse2.mjs +17 -30
  82. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  83. package/es/components/collection/index.mjs +1 -1
  84. package/es/components/collection/src/collection.mjs +66 -10
  85. package/es/components/collection/src/collection.mjs.map +1 -1
  86. package/es/components/collection/src/collection2.mjs +10 -66
  87. package/es/components/collection/src/collection2.mjs.map +1 -1
  88. package/es/components/color-picker/index.d.ts +8 -0
  89. package/es/components/color-picker/src/color-picker.d.ts +2 -0
  90. package/es/components/color-picker/src/color-picker.mjs +7 -0
  91. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  92. package/es/components/color-picker/src/color-picker.vue.d.ts +8 -0
  93. package/es/components/color-picker/src/color-picker2.mjs +23 -6
  94. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  95. package/es/components/countdown/index.mjs +2 -2
  96. package/es/components/countdown/src/countdown.mjs +76 -23
  97. package/es/components/countdown/src/countdown.mjs.map +1 -1
  98. package/es/components/countdown/src/countdown2.mjs +23 -76
  99. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  100. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +6 -4
  101. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
  102. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
  103. package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +7 -13
  104. package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
  105. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  106. package/es/components/date-picker/src/panel-utils.d.ts +2 -2
  107. package/es/components/descriptions/src/description2.mjs +1 -1
  108. package/es/components/descriptions/src/descriptions-row.mjs +7 -64
  109. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  110. package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
  111. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  112. package/es/components/dialog/index.d.ts +12 -0
  113. package/es/components/dialog/index.mjs +2 -2
  114. package/es/components/dialog/src/dialog-content.d.ts +1 -0
  115. package/es/components/dialog/src/dialog-content.mjs +9 -7
  116. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  117. package/es/components/dialog/src/dialog-content.vue.d.ts +4 -0
  118. package/es/components/dialog/src/dialog-content2.mjs +5 -1
  119. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  120. package/es/components/dialog/src/dialog.d.ts +2 -0
  121. package/es/components/dialog/src/dialog.mjs +68 -174
  122. package/es/components/dialog/src/dialog.mjs.map +1 -1
  123. package/es/components/dialog/src/dialog.vue.d.ts +12 -0
  124. package/es/components/dialog/src/dialog2.mjs +175 -64
  125. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  126. package/es/components/divider/index.mjs +2 -2
  127. package/es/components/divider/src/divider.mjs +17 -35
  128. package/es/components/divider/src/divider.mjs.map +1 -1
  129. package/es/components/divider/src/divider2.mjs +35 -17
  130. package/es/components/divider/src/divider2.mjs.map +1 -1
  131. package/es/components/drawer/index.d.ts +6 -0
  132. package/es/components/drawer/index.mjs +2 -2
  133. package/es/components/drawer/src/drawer.d.ts +2 -0
  134. package/es/components/drawer/src/drawer.mjs +29 -186
  135. package/es/components/drawer/src/drawer.mjs.map +1 -1
  136. package/es/components/drawer/src/drawer.vue.d.ts +6 -0
  137. package/es/components/drawer/src/drawer2.mjs +187 -25
  138. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  139. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  140. package/es/components/dropdown/src/dropdown.mjs +2 -2
  141. package/es/components/dropdown/src/dropdown2.mjs +6 -6
  142. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  143. package/es/components/form/index.mjs +2 -2
  144. package/es/components/form/src/form-item.mjs.map +1 -1
  145. package/es/components/form/src/form.mjs +150 -58
  146. package/es/components/form/src/form.mjs.map +1 -1
  147. package/es/components/form/src/form2.mjs +58 -150
  148. package/es/components/form/src/form2.mjs.map +1 -1
  149. package/es/components/image/index.mjs +2 -2
  150. package/es/components/image/src/image.mjs +227 -56
  151. package/es/components/image/src/image.mjs.map +1 -1
  152. package/es/components/image/src/image2.mjs +56 -227
  153. package/es/components/image/src/image2.mjs.map +1 -1
  154. package/es/components/index.mjs +42 -42
  155. package/es/components/input/index.mjs +2 -2
  156. package/es/components/input/src/input.mjs +114 -468
  157. package/es/components/input/src/input.mjs.map +1 -1
  158. package/es/components/input/src/input2.mjs +468 -114
  159. package/es/components/input/src/input2.mjs.map +1 -1
  160. package/es/components/input-number/src/input-number2.mjs +3 -3
  161. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  162. package/es/components/link/index.mjs +2 -2
  163. package/es/components/link/src/link.mjs +21 -50
  164. package/es/components/link/src/link.mjs.map +1 -1
  165. package/es/components/link/src/link2.mjs +50 -21
  166. package/es/components/link/src/link2.mjs.map +1 -1
  167. package/es/components/menu/index.mjs +2 -2
  168. package/es/components/menu/src/menu-item.mjs +97 -14
  169. package/es/components/menu/src/menu-item.mjs.map +1 -1
  170. package/es/components/menu/src/menu-item2.mjs +14 -97
  171. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  172. package/es/components/notification/index.mjs +1 -1
  173. package/es/components/notification/src/notification.mjs +67 -151
  174. package/es/components/notification/src/notification.mjs.map +1 -1
  175. package/es/components/notification/src/notification2.mjs +151 -67
  176. package/es/components/notification/src/notification2.mjs.map +1 -1
  177. package/es/components/notification/src/notify.mjs +2 -2
  178. package/es/components/page-header/index.mjs +2 -2
  179. package/es/components/page-header/src/page-header.mjs +103 -17
  180. package/es/components/page-header/src/page-header.mjs.map +1 -1
  181. package/es/components/page-header/src/page-header2.mjs +17 -103
  182. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  183. package/es/components/pagination/src/components/jumper.mjs +9 -60
  184. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  185. package/es/components/pagination/src/components/jumper2.mjs +60 -9
  186. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  187. package/es/components/pagination/src/components/pager.mjs +218 -17
  188. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  189. package/es/components/pagination/src/components/pager2.mjs +17 -218
  190. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  191. package/es/components/pagination/src/components/sizes.mjs +22 -70
  192. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  193. package/es/components/pagination/src/components/sizes.vue.d.ts +22 -49
  194. package/es/components/pagination/src/components/sizes2.mjs +70 -22
  195. package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
  196. package/es/components/pagination/src/components/total.mjs +7 -28
  197. package/es/components/pagination/src/components/total.mjs.map +1 -1
  198. package/es/components/pagination/src/components/total2.mjs +28 -7
  199. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  200. package/es/components/pagination/src/pagination.mjs +4 -4
  201. package/es/components/popover/src/popover.mjs +1 -1
  202. package/es/components/popper/index.mjs +6 -6
  203. package/es/components/popper/src/content.mjs +139 -94
  204. package/es/components/popper/src/content.mjs.map +1 -1
  205. package/es/components/popper/src/content2.mjs +94 -139
  206. package/es/components/popper/src/content2.mjs.map +1 -1
  207. package/es/components/popper/src/popper.mjs +25 -32
  208. package/es/components/popper/src/popper.mjs.map +1 -1
  209. package/es/components/popper/src/popper2.mjs +32 -25
  210. package/es/components/popper/src/popper2.mjs.map +1 -1
  211. package/es/components/popper/src/trigger.mjs +121 -31
  212. package/es/components/popper/src/trigger.mjs.map +1 -1
  213. package/es/components/popper/src/trigger2.mjs +31 -121
  214. package/es/components/popper/src/trigger2.mjs.map +1 -1
  215. package/es/components/progress/index.mjs +2 -2
  216. package/es/components/progress/src/progress.mjs +205 -59
  217. package/es/components/progress/src/progress.mjs.map +1 -1
  218. package/es/components/progress/src/progress2.mjs +59 -205
  219. package/es/components/progress/src/progress2.mjs.map +1 -1
  220. package/es/components/radio/index.mjs +2 -2
  221. package/es/components/radio/src/radio-button.mjs +9 -65
  222. package/es/components/radio/src/radio-button.mjs.map +1 -1
  223. package/es/components/radio/src/radio-button2.mjs +67 -9
  224. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  225. package/es/components/radio/src/radio2.mjs +5 -3
  226. package/es/components/radio/src/radio2.mjs.map +1 -1
  227. package/es/components/rate/index.mjs +2 -2
  228. package/es/components/rate/src/rate.mjs +258 -92
  229. package/es/components/rate/src/rate.mjs.map +1 -1
  230. package/es/components/rate/src/rate2.mjs +92 -258
  231. package/es/components/rate/src/rate2.mjs.map +1 -1
  232. package/es/components/resizable-columns/index.mjs +4 -4
  233. package/es/components/resizable-columns/src/resizable-column.mjs +114 -7
  234. package/es/components/resizable-columns/src/resizable-column.mjs.map +1 -1
  235. package/es/components/resizable-columns/src/resizable-column2.mjs +7 -114
  236. package/es/components/resizable-columns/src/resizable-column2.mjs.map +1 -1
  237. package/es/components/resizable-columns/src/resizable-columns.mjs +237 -12
  238. package/es/components/resizable-columns/src/resizable-columns.mjs.map +1 -1
  239. package/es/components/resizable-columns/src/resizable-columns2.mjs +12 -237
  240. package/es/components/resizable-columns/src/resizable-columns2.mjs.map +1 -1
  241. package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
  242. package/es/components/scrollbar/index.mjs +2 -2
  243. package/es/components/scrollbar/src/bar.mjs +42 -17
  244. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  245. package/es/components/scrollbar/src/bar2.mjs +17 -42
  246. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  247. package/es/components/scrollbar/src/scrollbar.mjs +176 -46
  248. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  249. package/es/components/scrollbar/src/scrollbar2.mjs +46 -176
  250. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  251. package/es/components/select/index.d.ts +24 -57
  252. package/es/components/select/src/option-group.mjs +1 -4
  253. package/es/components/select/src/option-group.mjs.map +1 -1
  254. package/es/components/select/src/option-group.vue.d.ts +14 -8
  255. package/es/components/select/src/option.mjs +1 -4
  256. package/es/components/select/src/option.mjs.map +1 -1
  257. package/es/components/select/src/option.vue.d.ts +20 -8
  258. package/es/components/select/src/select.mjs +11 -14
  259. package/es/components/select/src/select.mjs.map +1 -1
  260. package/es/components/select/src/select.vue.d.ts +349 -43
  261. package/es/components/select/src/useSelect.d.ts +1 -0
  262. package/es/components/select/src/useSelect.mjs +19 -10
  263. package/es/components/select/src/useSelect.mjs.map +1 -1
  264. package/es/components/select-v2/index.d.ts +2 -2
  265. package/es/components/select-v2/src/select.vue.d.ts +1 -1
  266. package/es/components/skeleton/index.mjs +4 -4
  267. package/es/components/skeleton/src/skeleton-item.mjs +23 -18
  268. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  269. package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
  270. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  271. package/es/components/skeleton/src/skeleton.mjs +22 -49
  272. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  273. package/es/components/skeleton/src/skeleton2.mjs +49 -22
  274. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  275. package/es/components/switch/index.mjs +2 -2
  276. package/es/components/switch/src/switch.mjs +267 -99
  277. package/es/components/switch/src/switch.mjs.map +1 -1
  278. package/es/components/switch/src/switch2.mjs +99 -267
  279. package/es/components/switch/src/switch2.mjs.map +1 -1
  280. package/es/components/table/src/config.d.ts +1 -1
  281. package/es/components/table/src/config.mjs +5 -3
  282. package/es/components/table/src/config.mjs.map +1 -1
  283. package/es/components/table/src/table-body/index.mjs +2 -5
  284. package/es/components/table/src/table-body/index.mjs.map +1 -1
  285. package/es/components/table/src/table-body/render-helper.mjs +1 -1
  286. package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
  287. package/es/components/table-v2/src/table-v2.mjs +1 -1
  288. package/es/components/table-v2/src/table-v2.mjs.map +1 -1
  289. package/es/components/tabs/index.mjs +1 -1
  290. package/es/components/tabs/src/tab-bar.mjs +75 -7
  291. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  292. package/es/components/tabs/src/tab-bar2.mjs +7 -75
  293. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  294. package/es/components/tabs/src/tab-nav.mjs +1 -1
  295. package/es/components/teleport/index.mjs +2 -2
  296. package/es/components/teleport/src/teleport.mjs +44 -18
  297. package/es/components/teleport/src/teleport.mjs.map +1 -1
  298. package/es/components/teleport/src/teleport2.mjs +18 -44
  299. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  300. package/es/components/text/index.mjs +2 -2
  301. package/es/components/text/src/text.mjs +22 -35
  302. package/es/components/text/src/text.mjs.map +1 -1
  303. package/es/components/text/src/text2.mjs +35 -22
  304. package/es/components/text/src/text2.mjs.map +1 -1
  305. package/es/components/time-picker/src/common/picker.mjs.map +1 -1
  306. package/es/components/time-picker/src/common/picker.vue.d.ts +1 -1
  307. package/es/components/time-select/index.d.ts +84 -180
  308. package/es/components/time-select/index.mjs +1 -1
  309. package/es/components/time-select/src/time-select.mjs +132 -55
  310. package/es/components/time-select/src/time-select.mjs.map +1 -1
  311. package/es/components/time-select/src/time-select.vue.d.ts +42 -90
  312. package/es/components/time-select/src/time-select2.mjs +55 -132
  313. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  314. package/es/components/timeline/index.mjs +2 -2
  315. package/es/components/timeline/src/timeline-item.mjs +72 -42
  316. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  317. package/es/components/timeline/src/timeline-item2.mjs +42 -72
  318. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  319. package/es/components/tooltip/index.mjs +1 -1
  320. package/es/components/tooltip/src/content.mjs +1 -1
  321. package/es/components/tooltip/src/content2.mjs +1 -1
  322. package/es/components/tooltip/src/tooltip.mjs +2 -2
  323. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  324. package/es/components/tooltip/src/trigger.mjs +73 -16
  325. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  326. package/es/components/tooltip/src/trigger2.mjs +16 -73
  327. package/es/components/tooltip/src/trigger2.mjs.map +1 -1
  328. package/es/components/tooltip-v2/index.mjs +4 -4
  329. package/es/components/tooltip-v2/src/root.mjs +82 -17
  330. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  331. package/es/components/tooltip-v2/src/root2.mjs +17 -82
  332. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  333. package/es/components/tooltip-v2/src/tooltip.mjs +20 -77
  334. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  335. package/es/components/tooltip-v2/src/tooltip2.mjs +77 -20
  336. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  337. package/es/components/tooltip-v2/src/trigger.mjs +91 -12
  338. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  339. package/es/components/tooltip-v2/src/trigger2.mjs +12 -91
  340. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  341. package/es/components/transfer/src/transfer.mjs.map +1 -1
  342. package/es/components/tree/src/tree-node.mjs +1 -1
  343. package/es/components/tree/src/tree-node.mjs.map +1 -1
  344. package/es/components/tree-select/src/tree-select-option.d.ts +8 -32
  345. package/es/components/tree-v2/src/composables/useTree.mjs +1 -1
  346. package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
  347. package/es/components/upload/index.d.ts +0 -3
  348. package/es/components/upload/index.mjs +1 -1
  349. package/es/components/upload/src/ajax.mjs +2 -1
  350. package/es/components/upload/src/ajax.mjs.map +1 -1
  351. package/es/components/upload/src/upload-content2.mjs +1 -1
  352. package/es/components/upload/src/upload-dragger.mjs +72 -11
  353. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  354. package/es/components/upload/src/upload-dragger2.mjs +11 -72
  355. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  356. package/es/components/upload/src/upload.vue.d.ts +0 -3
  357. package/es/components/upload/src/upload2.mjs +5 -6
  358. package/es/components/upload/src/upload2.mjs.map +1 -1
  359. package/es/index.mjs +42 -42
  360. package/lib/components/affix/index.js +2 -2
  361. package/lib/components/affix/src/affix.js +119 -27
  362. package/lib/components/affix/src/affix.js.map +1 -1
  363. package/lib/components/affix/src/affix2.js +27 -119
  364. package/lib/components/affix/src/affix2.js.map +1 -1
  365. package/lib/components/autocomplete/index.d.ts +1 -1
  366. package/lib/components/autocomplete/index.js +2 -2
  367. package/lib/components/autocomplete/src/autocomplete.d.ts +3 -9
  368. package/lib/components/autocomplete/src/autocomplete.js +378 -99
  369. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  370. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +7 -8
  371. package/lib/components/autocomplete/src/autocomplete2.js +99 -379
  372. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  373. package/lib/components/avatar/index.js +2 -2
  374. package/lib/components/avatar/src/avatar.js +75 -35
  375. package/lib/components/avatar/src/avatar.js.map +1 -1
  376. package/lib/components/avatar/src/avatar2.js +35 -75
  377. package/lib/components/avatar/src/avatar2.js.map +1 -1
  378. package/lib/components/backtop/index.js +2 -2
  379. package/lib/components/backtop/src/backtop.js +61 -24
  380. package/lib/components/backtop/src/backtop.js.map +1 -1
  381. package/lib/components/backtop/src/backtop2.js +24 -61
  382. package/lib/components/backtop/src/backtop2.js.map +1 -1
  383. package/lib/components/breadcrumb/index.js +2 -2
  384. package/lib/components/breadcrumb/src/breadcrumb.js +11 -36
  385. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  386. package/lib/components/breadcrumb/src/breadcrumb2.js +36 -11
  387. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  388. package/lib/components/button/index.js +1 -1
  389. package/lib/components/button/src/button-group.js +30 -6
  390. package/lib/components/button/src/button-group.js.map +1 -1
  391. package/lib/components/button/src/button-group2.js +6 -30
  392. package/lib/components/button/src/button-group2.js.map +1 -1
  393. package/lib/components/card/index.d.ts +2 -0
  394. package/lib/components/card/index.js +2 -2
  395. package/lib/components/card/src/card.d.ts +1 -0
  396. package/lib/components/card/src/card.js +35 -16
  397. package/lib/components/card/src/card.js.map +1 -1
  398. package/lib/components/card/src/card.vue.d.ts +2 -0
  399. package/lib/components/card/src/card2.js +17 -35
  400. package/lib/components/card/src/card2.js.map +1 -1
  401. package/lib/components/cascader/index.d.ts +8 -0
  402. package/lib/components/cascader/index.js +2 -2
  403. package/lib/components/cascader/src/cascader.d.ts +1 -0
  404. package/lib/components/cascader/src/cascader.js +647 -83
  405. package/lib/components/cascader/src/cascader.js.map +1 -1
  406. package/lib/components/cascader/src/cascader.vue.d.ts +4 -0
  407. package/lib/components/cascader/src/cascader2.js +87 -647
  408. package/lib/components/cascader/src/cascader2.js.map +1 -1
  409. package/lib/components/check-tag/index.js +2 -2
  410. package/lib/components/check-tag/src/check-tag.js +31 -13
  411. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  412. package/lib/components/check-tag/src/check-tag2.js +13 -31
  413. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  414. package/lib/components/checkbox/index.js +4 -4
  415. package/lib/components/checkbox/src/checkbox-button.js +10 -6
  416. package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
  417. package/lib/components/checkbox/src/checkbox-group.js +72 -34
  418. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  419. package/lib/components/checkbox/src/checkbox-group2.js +34 -72
  420. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  421. package/lib/components/checkbox/src/checkbox.js +55 -125
  422. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  423. package/lib/components/checkbox/src/checkbox2.js +125 -55
  424. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  425. package/lib/components/col/index.js +2 -2
  426. package/lib/components/col/src/col.js +43 -66
  427. package/lib/components/col/src/col.js.map +1 -1
  428. package/lib/components/col/src/col2.js +66 -43
  429. package/lib/components/col/src/col2.js.map +1 -1
  430. package/lib/components/collapse/index.js +2 -2
  431. package/lib/components/collapse/src/collapse.js +30 -19
  432. package/lib/components/collapse/src/collapse.js.map +1 -1
  433. package/lib/components/collapse/src/collapse2.js +19 -30
  434. package/lib/components/collapse/src/collapse2.js.map +1 -1
  435. package/lib/components/collection/index.js +1 -1
  436. package/lib/components/collection/src/collection.js +66 -9
  437. package/lib/components/collection/src/collection.js.map +1 -1
  438. package/lib/components/collection/src/collection2.js +9 -66
  439. package/lib/components/collection/src/collection2.js.map +1 -1
  440. package/lib/components/color-picker/index.d.ts +8 -0
  441. package/lib/components/color-picker/src/color-picker.d.ts +2 -0
  442. package/lib/components/color-picker/src/color-picker.js +7 -0
  443. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  444. package/lib/components/color-picker/src/color-picker.vue.d.ts +8 -0
  445. package/lib/components/color-picker/src/color-picker2.js +22 -5
  446. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  447. package/lib/components/countdown/index.js +2 -2
  448. package/lib/components/countdown/src/countdown.js +76 -24
  449. package/lib/components/countdown/src/countdown.js.map +1 -1
  450. package/lib/components/countdown/src/countdown2.js +24 -76
  451. package/lib/components/countdown/src/countdown2.js.map +1 -1
  452. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +6 -4
  453. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
  454. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
  455. package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +7 -13
  456. package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
  457. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  458. package/lib/components/date-picker/src/panel-utils.d.ts +2 -2
  459. package/lib/components/descriptions/src/description2.js +1 -1
  460. package/lib/components/descriptions/src/descriptions-row.js +7 -64
  461. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  462. package/lib/components/descriptions/src/descriptions-row2.js +64 -7
  463. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  464. package/lib/components/dialog/index.d.ts +12 -0
  465. package/lib/components/dialog/index.js +2 -2
  466. package/lib/components/dialog/src/dialog-content.d.ts +1 -0
  467. package/lib/components/dialog/src/dialog-content.js +9 -7
  468. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  469. package/lib/components/dialog/src/dialog-content.vue.d.ts +4 -0
  470. package/lib/components/dialog/src/dialog-content2.js +5 -1
  471. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  472. package/lib/components/dialog/src/dialog.d.ts +2 -0
  473. package/lib/components/dialog/src/dialog.js +69 -174
  474. package/lib/components/dialog/src/dialog.js.map +1 -1
  475. package/lib/components/dialog/src/dialog.vue.d.ts +12 -0
  476. package/lib/components/dialog/src/dialog2.js +175 -65
  477. package/lib/components/dialog/src/dialog2.js.map +1 -1
  478. package/lib/components/divider/index.js +2 -2
  479. package/lib/components/divider/src/divider.js +17 -35
  480. package/lib/components/divider/src/divider.js.map +1 -1
  481. package/lib/components/divider/src/divider2.js +35 -17
  482. package/lib/components/divider/src/divider2.js.map +1 -1
  483. package/lib/components/drawer/index.d.ts +6 -0
  484. package/lib/components/drawer/index.js +2 -2
  485. package/lib/components/drawer/src/drawer.d.ts +2 -0
  486. package/lib/components/drawer/src/drawer.js +30 -186
  487. package/lib/components/drawer/src/drawer.js.map +1 -1
  488. package/lib/components/drawer/src/drawer.vue.d.ts +6 -0
  489. package/lib/components/drawer/src/drawer2.js +187 -26
  490. package/lib/components/drawer/src/drawer2.js.map +1 -1
  491. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  492. package/lib/components/dropdown/src/dropdown.js +2 -2
  493. package/lib/components/dropdown/src/dropdown2.js +5 -5
  494. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  495. package/lib/components/form/index.js +2 -2
  496. package/lib/components/form/src/form-item.js.map +1 -1
  497. package/lib/components/form/src/form.js +149 -58
  498. package/lib/components/form/src/form.js.map +1 -1
  499. package/lib/components/form/src/form2.js +58 -149
  500. package/lib/components/form/src/form2.js.map +1 -1
  501. package/lib/components/image/index.js +2 -2
  502. package/lib/components/image/src/image.js +226 -56
  503. package/lib/components/image/src/image.js.map +1 -1
  504. package/lib/components/image/src/image2.js +56 -226
  505. package/lib/components/image/src/image2.js.map +1 -1
  506. package/lib/components/index.js +42 -42
  507. package/lib/components/input/index.js +2 -2
  508. package/lib/components/input/src/input.js +114 -467
  509. package/lib/components/input/src/input.js.map +1 -1
  510. package/lib/components/input/src/input2.js +467 -114
  511. package/lib/components/input/src/input2.js.map +1 -1
  512. package/lib/components/input-number/src/input-number2.js +3 -3
  513. package/lib/components/input-number/src/input-number2.js.map +1 -1
  514. package/lib/components/link/index.js +2 -2
  515. package/lib/components/link/src/link.js +22 -50
  516. package/lib/components/link/src/link.js.map +1 -1
  517. package/lib/components/link/src/link2.js +50 -22
  518. package/lib/components/link/src/link2.js.map +1 -1
  519. package/lib/components/menu/index.js +2 -2
  520. package/lib/components/menu/src/menu-item.js +97 -15
  521. package/lib/components/menu/src/menu-item.js.map +1 -1
  522. package/lib/components/menu/src/menu-item2.js +15 -97
  523. package/lib/components/menu/src/menu-item2.js.map +1 -1
  524. package/lib/components/notification/index.js +1 -1
  525. package/lib/components/notification/src/notification.js +68 -150
  526. package/lib/components/notification/src/notification.js.map +1 -1
  527. package/lib/components/notification/src/notification2.js +150 -68
  528. package/lib/components/notification/src/notification2.js.map +1 -1
  529. package/lib/components/notification/src/notify.js +2 -2
  530. package/lib/components/page-header/index.js +2 -2
  531. package/lib/components/page-header/src/page-header.js +103 -18
  532. package/lib/components/page-header/src/page-header.js.map +1 -1
  533. package/lib/components/page-header/src/page-header2.js +18 -103
  534. package/lib/components/page-header/src/page-header2.js.map +1 -1
  535. package/lib/components/pagination/src/components/jumper.js +9 -60
  536. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  537. package/lib/components/pagination/src/components/jumper2.js +60 -9
  538. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  539. package/lib/components/pagination/src/components/pager.js +218 -17
  540. package/lib/components/pagination/src/components/pager.js.map +1 -1
  541. package/lib/components/pagination/src/components/pager2.js +17 -218
  542. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  543. package/lib/components/pagination/src/components/sizes.js +22 -70
  544. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  545. package/lib/components/pagination/src/components/sizes.vue.d.ts +22 -49
  546. package/lib/components/pagination/src/components/sizes2.js +70 -22
  547. package/lib/components/pagination/src/components/sizes2.js.map +1 -1
  548. package/lib/components/pagination/src/components/total.js +7 -28
  549. package/lib/components/pagination/src/components/total.js.map +1 -1
  550. package/lib/components/pagination/src/components/total2.js +28 -7
  551. package/lib/components/pagination/src/components/total2.js.map +1 -1
  552. package/lib/components/pagination/src/pagination.js +4 -4
  553. package/lib/components/popover/src/popover.js +1 -1
  554. package/lib/components/popper/index.js +6 -6
  555. package/lib/components/popper/src/content.js +139 -99
  556. package/lib/components/popper/src/content.js.map +1 -1
  557. package/lib/components/popper/src/content2.js +99 -139
  558. package/lib/components/popper/src/content2.js.map +1 -1
  559. package/lib/components/popper/src/popper.js +28 -32
  560. package/lib/components/popper/src/popper.js.map +1 -1
  561. package/lib/components/popper/src/popper2.js +32 -28
  562. package/lib/components/popper/src/popper2.js.map +1 -1
  563. package/lib/components/popper/src/trigger.js +121 -32
  564. package/lib/components/popper/src/trigger.js.map +1 -1
  565. package/lib/components/popper/src/trigger2.js +32 -121
  566. package/lib/components/popper/src/trigger2.js.map +1 -1
  567. package/lib/components/progress/index.js +2 -2
  568. package/lib/components/progress/src/progress.js +205 -59
  569. package/lib/components/progress/src/progress.js.map +1 -1
  570. package/lib/components/progress/src/progress2.js +59 -205
  571. package/lib/components/progress/src/progress2.js.map +1 -1
  572. package/lib/components/radio/index.js +2 -2
  573. package/lib/components/radio/src/radio-button.js +9 -65
  574. package/lib/components/radio/src/radio-button.js.map +1 -1
  575. package/lib/components/radio/src/radio-button2.js +67 -9
  576. package/lib/components/radio/src/radio-button2.js.map +1 -1
  577. package/lib/components/radio/src/radio2.js +4 -2
  578. package/lib/components/radio/src/radio2.js.map +1 -1
  579. package/lib/components/rate/index.js +2 -2
  580. package/lib/components/rate/src/rate.js +257 -92
  581. package/lib/components/rate/src/rate.js.map +1 -1
  582. package/lib/components/rate/src/rate2.js +92 -257
  583. package/lib/components/rate/src/rate2.js.map +1 -1
  584. package/lib/components/resizable-columns/index.js +4 -4
  585. package/lib/components/resizable-columns/src/resizable-column.js +114 -7
  586. package/lib/components/resizable-columns/src/resizable-column.js.map +1 -1
  587. package/lib/components/resizable-columns/src/resizable-column2.js +7 -114
  588. package/lib/components/resizable-columns/src/resizable-column2.js.map +1 -1
  589. package/lib/components/resizable-columns/src/resizable-columns.js +237 -12
  590. package/lib/components/resizable-columns/src/resizable-columns.js.map +1 -1
  591. package/lib/components/resizable-columns/src/resizable-columns2.js +12 -237
  592. package/lib/components/resizable-columns/src/resizable-columns2.js.map +1 -1
  593. package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
  594. package/lib/components/scrollbar/index.js +2 -2
  595. package/lib/components/scrollbar/src/bar.js +42 -17
  596. package/lib/components/scrollbar/src/bar.js.map +1 -1
  597. package/lib/components/scrollbar/src/bar2.js +17 -42
  598. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  599. package/lib/components/scrollbar/src/scrollbar.js +176 -47
  600. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  601. package/lib/components/scrollbar/src/scrollbar2.js +47 -176
  602. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  603. package/lib/components/select/index.d.ts +24 -57
  604. package/lib/components/select/src/option-group.js +1 -4
  605. package/lib/components/select/src/option-group.js.map +1 -1
  606. package/lib/components/select/src/option-group.vue.d.ts +14 -8
  607. package/lib/components/select/src/option.js +1 -4
  608. package/lib/components/select/src/option.js.map +1 -1
  609. package/lib/components/select/src/option.vue.d.ts +20 -8
  610. package/lib/components/select/src/select.js +11 -14
  611. package/lib/components/select/src/select.js.map +1 -1
  612. package/lib/components/select/src/select.vue.d.ts +349 -43
  613. package/lib/components/select/src/useSelect.d.ts +1 -0
  614. package/lib/components/select/src/useSelect.js +17 -8
  615. package/lib/components/select/src/useSelect.js.map +1 -1
  616. package/lib/components/select-v2/index.d.ts +2 -2
  617. package/lib/components/select-v2/src/select.vue.d.ts +1 -1
  618. package/lib/components/skeleton/index.js +4 -4
  619. package/lib/components/skeleton/src/skeleton-item.js +23 -18
  620. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  621. package/lib/components/skeleton/src/skeleton-item2.js +18 -23
  622. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  623. package/lib/components/skeleton/src/skeleton.js +22 -49
  624. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  625. package/lib/components/skeleton/src/skeleton2.js +49 -22
  626. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  627. package/lib/components/switch/index.js +2 -2
  628. package/lib/components/switch/src/switch.js +266 -99
  629. package/lib/components/switch/src/switch.js.map +1 -1
  630. package/lib/components/switch/src/switch2.js +99 -266
  631. package/lib/components/switch/src/switch2.js.map +1 -1
  632. package/lib/components/table/src/config.d.ts +1 -1
  633. package/lib/components/table/src/config.js +5 -3
  634. package/lib/components/table/src/config.js.map +1 -1
  635. package/lib/components/table/src/table-body/index.js +2 -5
  636. package/lib/components/table/src/table-body/index.js.map +1 -1
  637. package/lib/components/table/src/table-body/render-helper.js +1 -1
  638. package/lib/components/table/src/table-body/render-helper.js.map +1 -1
  639. package/lib/components/table-v2/src/table-v2.js +1 -1
  640. package/lib/components/table-v2/src/table-v2.js.map +1 -1
  641. package/lib/components/tabs/index.js +1 -1
  642. package/lib/components/tabs/src/tab-bar.js +75 -7
  643. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  644. package/lib/components/tabs/src/tab-bar2.js +7 -75
  645. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  646. package/lib/components/tabs/src/tab-nav.js +1 -1
  647. package/lib/components/teleport/index.js +2 -2
  648. package/lib/components/teleport/src/teleport.js +44 -18
  649. package/lib/components/teleport/src/teleport.js.map +1 -1
  650. package/lib/components/teleport/src/teleport2.js +18 -44
  651. package/lib/components/teleport/src/teleport2.js.map +1 -1
  652. package/lib/components/text/index.js +2 -2
  653. package/lib/components/text/src/text.js +22 -35
  654. package/lib/components/text/src/text.js.map +1 -1
  655. package/lib/components/text/src/text2.js +35 -22
  656. package/lib/components/text/src/text2.js.map +1 -1
  657. package/lib/components/time-picker/src/common/picker.js.map +1 -1
  658. package/lib/components/time-picker/src/common/picker.vue.d.ts +1 -1
  659. package/lib/components/time-select/index.d.ts +84 -180
  660. package/lib/components/time-select/index.js +1 -1
  661. package/lib/components/time-select/src/time-select.js +137 -55
  662. package/lib/components/time-select/src/time-select.js.map +1 -1
  663. package/lib/components/time-select/src/time-select.vue.d.ts +42 -90
  664. package/lib/components/time-select/src/time-select2.js +55 -137
  665. package/lib/components/time-select/src/time-select2.js.map +1 -1
  666. package/lib/components/timeline/index.js +2 -2
  667. package/lib/components/timeline/src/timeline-item.js +72 -42
  668. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  669. package/lib/components/timeline/src/timeline-item2.js +42 -72
  670. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  671. package/lib/components/tooltip/index.js +1 -1
  672. package/lib/components/tooltip/src/content.js +1 -1
  673. package/lib/components/tooltip/src/content2.js +1 -1
  674. package/lib/components/tooltip/src/tooltip.js +2 -2
  675. package/lib/components/tooltip/src/tooltip2.js +1 -1
  676. package/lib/components/tooltip/src/trigger.js +73 -16
  677. package/lib/components/tooltip/src/trigger.js.map +1 -1
  678. package/lib/components/tooltip/src/trigger2.js +16 -73
  679. package/lib/components/tooltip/src/trigger2.js.map +1 -1
  680. package/lib/components/tooltip-v2/index.js +4 -4
  681. package/lib/components/tooltip-v2/src/root.js +82 -17
  682. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  683. package/lib/components/tooltip-v2/src/root2.js +17 -82
  684. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  685. package/lib/components/tooltip-v2/src/tooltip.js +20 -77
  686. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  687. package/lib/components/tooltip-v2/src/tooltip2.js +77 -20
  688. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  689. package/lib/components/tooltip-v2/src/trigger.js +91 -12
  690. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  691. package/lib/components/tooltip-v2/src/trigger2.js +12 -91
  692. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  693. package/lib/components/transfer/src/transfer.js.map +1 -1
  694. package/lib/components/tree/src/tree-node.js +1 -1
  695. package/lib/components/tree/src/tree-node.js.map +1 -1
  696. package/lib/components/tree-select/src/tree-select-option.d.ts +8 -32
  697. package/lib/components/tree-v2/src/composables/useTree.js +1 -1
  698. package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
  699. package/lib/components/upload/index.d.ts +0 -3
  700. package/lib/components/upload/index.js +1 -1
  701. package/lib/components/upload/src/ajax.js +2 -1
  702. package/lib/components/upload/src/ajax.js.map +1 -1
  703. package/lib/components/upload/src/upload-content2.js +1 -1
  704. package/lib/components/upload/src/upload-dragger.js +72 -12
  705. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  706. package/lib/components/upload/src/upload-dragger2.js +12 -72
  707. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  708. package/lib/components/upload/src/upload.vue.d.ts +0 -3
  709. package/lib/components/upload/src/upload2.js +4 -5
  710. package/lib/components/upload/src/upload2.js.map +1 -1
  711. package/lib/index.js +42 -42
  712. package/package.json +1 -1
  713. package/web-types.json +1 -1
@@ -2,278 +2,111 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../config-provider/index.js');
7
- var shared = require('@vue/shared');
8
5
  require('../../../utils/index.js');
9
- var index$2 = require('../../icon/index.js');
10
- require('../../form/index.js');
11
- var iconsVue = require('@element-plus/icons-vue');
12
6
  require('../../../constants/index.js');
13
- require('../../../hooks/index.js');
14
- var _switch = require('./switch.js');
15
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
16
- var useFormItem = require('../../form/src/hooks/use-form-item.js');
17
- var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
18
- var index = require('../../../hooks/use-namespace/index.js');
19
- var index$1 = require('../../../hooks/use-deprecated/index.js');
20
- var style = require('../../../utils/dom/style.js');
21
- var forEditor = require('../../config-provider/src/for-editor.js');
7
+ var runtime = require('../../../utils/vue/props/runtime.js');
8
+ var size = require('../../../constants/size.js');
9
+ var validator = require('../../../utils/vue/validator.js');
10
+ var icon = require('../../../utils/vue/icon.js');
22
11
  var event = require('../../../constants/event.js');
23
- var error = require('../../../utils/error.js');
24
12
  var types = require('../../../utils/types.js');
13
+ var shared = require('@vue/shared');
25
14
 
26
- const _hoisted_1 = ["onClick"];
27
- const _hoisted_2 = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"];
28
- const _hoisted_3 = ["aria-hidden"];
29
- const _hoisted_4 = ["aria-hidden"];
30
- const _hoisted_5 = ["aria-hidden"];
31
- const COMPONENT_NAME = "ElSwitch";
32
- const __default__ = vue.defineComponent({
33
- name: COMPONENT_NAME
34
- });
35
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
- ...__default__,
37
- props: _switch.switchProps,
38
- emits: _switch.switchEmits,
39
- setup(__props, { expose, emit }) {
40
- const props = __props;
41
- const vm = vue.getCurrentInstance();
42
- const { formItem } = useFormItem.useFormItem();
43
- const switchSize = useFormCommonProps.useFormSize();
44
- const ns = index.useNamespace("switch");
45
- const useBatchDeprecated = (list) => {
46
- list.forEach((param) => {
47
- index$1.useDeprecated({
48
- from: param[0],
49
- replacement: param[1],
50
- scope: COMPONENT_NAME,
51
- version: "2.3.0",
52
- ref: "https://element-plus.org/en-US/component/switch.html#attributes",
53
- type: "Attribute"
54
- }, vue.computed(() => {
55
- var _a;
56
- return !!((_a = vm.vnode.props) == null ? void 0 : _a[param[2]]);
57
- }));
58
- });
59
- };
60
- useBatchDeprecated([
61
- ['"value"', '"model-value" or "v-model"', "value"],
62
- ['"active-color"', "CSS var `--el-switch-on-color`", "activeColor"],
63
- ['"inactive-color"', "CSS var `--el-switch-off-color`", "inactiveColor"],
64
- ['"border-color"', "CSS var `--el-switch-border-color`", "borderColor"]
65
- ]);
66
- const { inputId } = useFormItem.useFormItemInputId(props, {
67
- formItemContext: formItem
68
- });
69
- const switchDisabled = useFormCommonProps.useFormDisabled(vue.computed(() => props.loading));
70
- const switchViewMode = useFormCommonProps.useFormViewMode();
71
- const isControlled = vue.ref(props.modelValue !== false);
72
- const input = vue.ref();
73
- const core = vue.ref();
74
- const switchKls = vue.computed(() => [
75
- ns.b(),
76
- ns.m(switchSize.value),
77
- ns.is("disabled", switchDisabled.value),
78
- ns.is("view-mode", !!switchViewMode.value),
79
- ns.is("checked", checked.value)
80
- ]);
81
- const labelLeftKls = vue.computed(() => [
82
- ns.e("label"),
83
- ns.em("label", "left"),
84
- ns.is("active", !checked.value)
85
- ]);
86
- const labelRightKls = vue.computed(() => [
87
- ns.e("label"),
88
- ns.em("label", "right"),
89
- ns.is("active", checked.value)
90
- ]);
91
- const coreStyle = vue.computed(() => ({
92
- width: style.addUnit(props.width)
93
- }));
94
- forEditor.watch(() => props.modelValue, () => {
95
- isControlled.value = true;
96
- });
97
- forEditor.watch(() => props.value, () => {
98
- isControlled.value = false;
99
- });
100
- const actualValue = vue.computed(() => {
101
- return isControlled.value ? props.modelValue : props.value;
102
- });
103
- const checked = vue.computed(() => actualValue.value === props.activeValue);
104
- if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
105
- emit(event.UPDATE_MODEL_EVENT, props.inactiveValue);
106
- emit(event.CHANGE_EVENT, props.inactiveValue);
107
- emit(event.INPUT_EVENT, props.inactiveValue);
108
- }
109
- forEditor.watch(checked, (val) => {
110
- var _a;
111
- input.value.checked = val;
112
- if (props.validateEvent) {
113
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => error.debugWarn(err));
114
- }
115
- });
116
- const handleChange = () => {
117
- const val = checked.value ? props.inactiveValue : props.activeValue;
118
- emit(event.UPDATE_MODEL_EVENT, val);
119
- emit(event.CHANGE_EVENT, val);
120
- emit(event.INPUT_EVENT, val);
121
- vue.nextTick(() => {
122
- input.value.checked = checked.value;
123
- });
124
- };
125
- const switchValue = () => {
126
- if (switchDisabled.value || switchViewMode.value)
127
- return;
128
- const { beforeChange } = props;
129
- if (!beforeChange) {
130
- handleChange();
131
- return;
132
- }
133
- const shouldChange = beforeChange();
134
- const isPromiseOrBool = [
135
- shared.isPromise(shouldChange),
136
- types.isBoolean(shouldChange)
137
- ].includes(true);
138
- if (!isPromiseOrBool) {
139
- error.throwError(COMPONENT_NAME, "beforeChange must return type `Promise<boolean>` or `boolean`");
140
- }
141
- if (shared.isPromise(shouldChange)) {
142
- shouldChange.then((result) => {
143
- if (result) {
144
- handleChange();
145
- }
146
- }).catch((e) => {
147
- error.debugWarn(COMPONENT_NAME, `some error occurred: ${e}`);
148
- });
149
- } else if (shouldChange) {
150
- handleChange();
151
- }
152
- };
153
- const styles = vue.computed(() => {
154
- return ns.cssVarBlock({
155
- ...props.activeColor ? { "on-color": props.activeColor } : null,
156
- ...props.inactiveColor ? { "off-color": props.inactiveColor } : null,
157
- ...props.borderColor ? { "border-color": props.borderColor } : null
158
- });
159
- });
160
- const focus = () => {
161
- var _a, _b;
162
- (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
163
- };
164
- vue.onMounted(() => {
165
- input.value.checked = checked.value;
166
- });
167
- expose({
168
- focus,
169
- checked
170
- });
171
- return (_ctx, _cache) => {
172
- return vue.openBlock(), vue.createElementBlock("div", {
173
- class: vue.normalizeClass(vue.unref(switchKls)),
174
- style: vue.normalizeStyle(vue.unref(styles)),
175
- onClick: vue.withModifiers(switchValue, ["prevent"])
176
- }, [
177
- vue.createElementVNode("input", {
178
- id: vue.unref(inputId),
179
- ref_key: "input",
180
- ref: input,
181
- class: vue.normalizeClass(vue.unref(ns).e("input")),
182
- type: "checkbox",
183
- role: "switch",
184
- "aria-checked": vue.unref(checked),
185
- "aria-disabled": vue.unref(switchDisabled),
186
- name: _ctx.name,
187
- "true-value": _ctx.activeValue,
188
- "false-value": _ctx.inactiveValue,
189
- disabled: vue.unref(switchDisabled) || vue.unref(switchViewMode),
190
- tabindex: _ctx.tabindex,
191
- onChange: handleChange,
192
- onKeydown: vue.withKeys(switchValue, ["enter"])
193
- }, null, 42, _hoisted_2),
194
- !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (vue.openBlock(), vue.createElementBlock("span", {
195
- key: 0,
196
- class: vue.normalizeClass(vue.unref(labelLeftKls))
197
- }, [
198
- _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 0 }, {
199
- default: vue.withCtx(() => [
200
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveIcon)))
201
- ]),
202
- _: 1
203
- })) : vue.createCommentVNode("v-if", true),
204
- !_ctx.inactiveIcon && _ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
205
- key: 1,
206
- "aria-hidden": vue.unref(checked)
207
- }, vue.toDisplayString(_ctx.inactiveText), 9, _hoisted_3)) : vue.createCommentVNode("v-if", true)
208
- ], 2)) : vue.createCommentVNode("v-if", true),
209
- vue.createElementVNode("span", {
210
- ref_key: "core",
211
- ref: core,
212
- class: vue.normalizeClass(vue.unref(ns).e("core")),
213
- style: vue.normalizeStyle(vue.unref(coreStyle))
214
- }, [
215
- _ctx.inlinePrompt ? (vue.openBlock(), vue.createElementBlock("div", {
216
- key: 0,
217
- class: vue.normalizeClass(vue.unref(ns).e("inner"))
218
- }, [
219
- _ctx.activeIcon || _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
220
- key: 0,
221
- class: vue.normalizeClass(vue.unref(ns).is("icon"))
222
- }, {
223
- default: vue.withCtx(() => [
224
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
225
- ]),
226
- _: 1
227
- }, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
228
- key: 1,
229
- class: vue.normalizeClass(vue.unref(ns).is("text")),
230
- "aria-hidden": !vue.unref(checked)
231
- }, vue.toDisplayString(vue.unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, _hoisted_4)) : vue.createCommentVNode("v-if", true)
232
- ], 2)) : vue.createCommentVNode("v-if", true),
233
- vue.createElementVNode("div", {
234
- class: vue.normalizeClass(vue.unref(ns).e("action"))
235
- }, [
236
- _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
237
- key: 0,
238
- class: vue.normalizeClass(vue.unref(ns).is("loading"))
239
- }, {
240
- default: vue.withCtx(() => [
241
- vue.createVNode(vue.unref(iconsVue.Loading))
242
- ]),
243
- _: 1
244
- }, 8, ["class"])) : _ctx.activeActionIcon && vue.unref(checked) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 1 }, {
245
- default: vue.withCtx(() => [
246
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeActionIcon)))
247
- ]),
248
- _: 1
249
- })) : _ctx.inactiveActionIcon && !vue.unref(checked) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 2 }, {
250
- default: vue.withCtx(() => [
251
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveActionIcon)))
252
- ]),
253
- _: 1
254
- })) : vue.createCommentVNode("v-if", true)
255
- ], 2)
256
- ], 6),
257
- !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (vue.openBlock(), vue.createElementBlock("span", {
258
- key: 1,
259
- class: vue.normalizeClass(vue.unref(labelRightKls))
260
- }, [
261
- _ctx.activeIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 0 }, {
262
- default: vue.withCtx(() => [
263
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeIcon)))
264
- ]),
265
- _: 1
266
- })) : vue.createCommentVNode("v-if", true),
267
- !_ctx.activeIcon && _ctx.activeText ? (vue.openBlock(), vue.createElementBlock("span", {
268
- key: 1,
269
- "aria-hidden": !vue.unref(checked)
270
- }, vue.toDisplayString(_ctx.activeText), 9, _hoisted_5)) : vue.createCommentVNode("v-if", true)
271
- ], 2)) : vue.createCommentVNode("v-if", true)
272
- ], 14, _hoisted_1);
273
- };
15
+ const switchProps = runtime.buildProps({
16
+ modelValue: {
17
+ type: [Boolean, String, Number],
18
+ default: false
19
+ },
20
+ disabled: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ viewMode: {
25
+ type: String,
26
+ values: size.viewModes
27
+ },
28
+ loading: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ size: {
33
+ type: String,
34
+ validator: validator.isValidComponentSize
35
+ },
36
+ width: {
37
+ type: [String, Number],
38
+ default: ""
39
+ },
40
+ inlinePrompt: {
41
+ type: Boolean,
42
+ default: false
43
+ },
44
+ inactiveActionIcon: {
45
+ type: icon.iconPropType
46
+ },
47
+ activeActionIcon: {
48
+ type: icon.iconPropType
49
+ },
50
+ activeIcon: {
51
+ type: icon.iconPropType
52
+ },
53
+ inactiveIcon: {
54
+ type: icon.iconPropType
55
+ },
56
+ activeText: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ inactiveText: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ activeValue: {
65
+ type: [Boolean, String, Number],
66
+ default: true
67
+ },
68
+ inactiveValue: {
69
+ type: [Boolean, String, Number],
70
+ default: false
71
+ },
72
+ activeColor: {
73
+ type: String,
74
+ default: ""
75
+ },
76
+ inactiveColor: {
77
+ type: String,
78
+ default: ""
79
+ },
80
+ borderColor: {
81
+ type: String,
82
+ default: ""
83
+ },
84
+ name: {
85
+ type: String,
86
+ default: ""
87
+ },
88
+ validateEvent: {
89
+ type: Boolean,
90
+ default: true
91
+ },
92
+ beforeChange: {
93
+ type: runtime.definePropType(Function)
94
+ },
95
+ id: String,
96
+ tabindex: {
97
+ type: [String, Number]
98
+ },
99
+ value: {
100
+ type: [Boolean, String, Number],
101
+ default: false
274
102
  }
275
103
  });
276
- var Switch = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\switch\\src\\switch.vue"]]);
104
+ const switchEmits = {
105
+ [event.UPDATE_MODEL_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val),
106
+ [event.CHANGE_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val),
107
+ [event.INPUT_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val)
108
+ };
277
109
 
278
- exports["default"] = Switch;
110
+ exports.switchEmits = switchEmits;
111
+ exports.switchProps = switchProps;
279
112
  //# sourceMappingURL=switch2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" :style=\"styles\" @click.prevent=\"switchValue\">\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled || switchViewMode\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @keydown.enter=\"switchValue\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"labelLeftKls\"\n >\n <el-icon v-if=\"inactiveIcon\">\n <component :is=\"inactiveIcon\" />\n </el-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span ref=\"core\" :class=\"ns.e('core')\" :style=\"coreStyle\">\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <el-icon :class=\"ns.is('icon')\">\n <component :is=\"checked ? activeIcon : inactiveIcon\" />\n </el-icon>\n </template>\n <template v-else-if=\"activeText || inactiveText\">\n <span :class=\"ns.is('text')\" :aria-hidden=\"!checked\">\n {{ checked ? activeText : inactiveText }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <el-icon v-if=\"loading\" :class=\"ns.is('loading')\">\n <loading />\n </el-icon>\n <el-icon v-else-if=\"activeActionIcon && checked\">\n <component :is=\"activeActionIcon\" />\n </el-icon>\n <el-icon v-else-if=\"inactiveActionIcon && !checked\">\n <component :is=\"inactiveActionIcon\" />\n </el-icon>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"labelRightKls\"\n >\n <el-icon v-if=\"activeIcon\">\n <component :is=\"activeIcon\" />\n </el-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n} from 'vue'\nimport { watch } from '../../config-provider'\nimport { isPromise } from '@vue/shared'\nimport { addUnit, debugWarn, isBoolean, throwError } from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize, useFormViewMode\n} from '@element-plus/components/form'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { switchEmits, switchProps } from './switch'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElSwitch'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(switchProps)\nconst emit = defineEmits(switchEmits)\n\nconst vm = getCurrentInstance()!\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst useBatchDeprecated = (list: string[][]) => {\n list.forEach((param) => {\n useDeprecated(\n {\n from: param[0],\n replacement: param[1],\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/switch.html#attributes',\n type: 'Attribute',\n },\n computed(() => !!vm.vnode.props?.[param[2]])\n )\n })\n}\nuseBatchDeprecated([\n ['\"value\"', '\"model-value\" or \"v-model\"', 'value'],\n ['\"active-color\"', 'CSS var `--el-switch-on-color`', 'activeColor'],\n ['\"inactive-color\"', 'CSS var `--el-switch-off-color`', 'inactiveColor'],\n ['\"border-color\"', 'CSS var `--el-switch-border-color`', 'borderColor'],\n])\n\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst switchDisabled = useFormDisabled(computed(() => props.loading))\nconst switchViewMode = useFormViewMode()\nconst isControlled = ref(props.modelValue !== false)\nconst input = ref<HTMLInputElement>()\nconst core = ref<HTMLSpanElement>()\n\nconst switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('view-mode', !!switchViewMode.value),\n ns.is('checked', checked.value),\n])\n\nconst labelLeftKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked.value),\n])\n\nconst labelRightKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked.value),\n])\n\nconst coreStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.width),\n}))\n\nwatch(\n () => props.modelValue,\n () => {\n isControlled.value = true\n }\n)\n\nwatch(\n () => props.value,\n () => {\n isControlled.value = false\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : props.value\n})\n\nconst checked = computed(() => actualValue.value === props.activeValue)\n\nif (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {\n emit(UPDATE_MODEL_EVENT, props.inactiveValue)\n emit(CHANGE_EVENT, props.inactiveValue)\n emit(INPUT_EVENT, props.inactiveValue)\n}\n\nwatch(checked, (val) => {\n input.value!.checked = val\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n})\n\nconst handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n emit(INPUT_EVENT, val)\n nextTick(() => {\n input.value!.checked = checked.value\n })\n}\n\nconst switchValue = () => {\n if (switchDisabled.value || switchViewMode.value) return\n\n const { beforeChange } = props\n if (!beforeChange) {\n handleChange()\n return\n }\n\n const shouldChange = beforeChange()\n\n const isPromiseOrBool = [\n isPromise(shouldChange),\n isBoolean(shouldChange),\n ].includes(true)\n if (!isPromiseOrBool) {\n throwError(\n COMPONENT_NAME,\n 'beforeChange must return type `Promise<boolean>` or `boolean`'\n )\n }\n\n if (isPromise(shouldChange)) {\n shouldChange\n .then((result) => {\n if (result) {\n handleChange()\n }\n })\n .catch((e) => {\n debugWarn(COMPONENT_NAME, `some error occurred: ${e}`)\n })\n } else if (shouldChange) {\n handleChange()\n }\n}\n\nconst styles = computed(() => {\n return ns.cssVarBlock({\n ...(props.activeColor ? { 'on-color': props.activeColor } : null),\n ...(props.inactiveColor ? { 'off-color': props.inactiveColor } : null),\n ...(props.borderColor ? { 'border-color': props.borderColor } : null),\n })\n})\n\nconst focus = (): void => {\n input.value?.focus?.()\n}\n\nonMounted(() => {\n input.value!.checked = checked.value\n})\n\ndefineExpose({\n /**\n * @description manual focus to the switch component\n **/\n focus,\n /**\n * @description whether Switch is checked\n */\n checked,\n})\n</script>\n"],"names":["getCurrentInstance","useFormItem","useFormSize","useNamespace","useDeprecated","computed","useFormDisabled","useFormViewMode","ref","addUnit","watch","UPDATE_MODEL_EVENT","CHANGE_EVENT","INPUT_EVENT","debugWarn","nextTick","isPromise","isBoolean","throwError","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAiGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAA,MAAM,KAAKA,sBAAmB,EAAA,CAAA;AAC9B,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,aAAaC,8BAAY,EAAA,CAAA;AAC/B,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,kBAAA,GAAqB,CAAC,IAAqB,KAAA;AAC/C,MAAK,IAAA,CAAA,OAAA,CAAQ,CAAC,KAAU,KAAA;AACtB,QACEC,qBAAA,CAAA;AAAA,UACE,MAAM,KAAM,CAAA,CAAA,CAAA;AAAA,UACZ,aAAa,KAAM,CAAA,CAAA,CAAA;AAAA,UACnB,KAAO,EAAA,cAAA;AAAA,UACP,OAAS,EAAA,OAAA;AAAA,UACT,GAAK,EAAA,iEAAA;AAAA,UACL,IAAM,EAAA,WAAA;AAAA,SACR,EACAC,YAAS,CAAA,MAAM;AACjB,UACD,IAAA,EAAA,CAAA;AAAA,UACH,OAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EA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AA,EAAA,CAAA;AAED,MAAa,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KAIX,CAAA;AAAA,IAIAc,aAAA,CAAA,MAAA;AAAA,MACD,KAAA,CAAA,KAAA,CAAA,OAAA,GAAA,OAAA,CAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n isString,\n isValidComponentSize,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT, viewModes\n} from '@element-plus/constants'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport const switchProps = buildProps({\n /**\n * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type\n */\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description whether Switch is disabled\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * @description 浏览模式\n */\n viewMode: {\n type: String,\n values: viewModes\n },\n /**\n * @description whether Switch is in loading state\n */\n loading: {\n type: Boolean,\n default: false,\n },\n /**\n * @description size of Switch\n */\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n /**\n * @description width of Switch\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether icon or text is displayed inside dot, only the first character will be rendered for text\n */\n inlinePrompt: {\n type: Boolean,\n default: false,\n },\n /**\n * @description component of the icon displayed in action when in `off` state\n */\n inactiveActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed in action when in `on` state\n */\n activeActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `on` state, overrides `active-text`\n */\n activeIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `off` state, overrides `inactive-text`\n */\n inactiveIcon: {\n type: iconPropType,\n },\n /**\n * @description text displayed when in `on` state\n */\n activeText: {\n type: String,\n default: '',\n },\n /**\n * @description text displayed when in `off` state\n */\n inactiveText: {\n type: String,\n default: '',\n },\n /**\n * @description switch value when in `on` state\n */\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n /**\n * @description switch value when in `off` state\n */\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @deprecated background color when in `on` state ( deprecated, use CSS var `--el-switch-on-color` instead )\n */\n activeColor: {\n type: String,\n default: '',\n },\n /**\n * @deprecated background color when in `off` state ( deprecated, use CSS var `--el-switch-off-color` instead )\n */\n inactiveColor: {\n type: String,\n default: '',\n },\n /**\n * @deprecated border color of the switch ( deprecated, use CSS var `--el-switch-border-color` instead )\n */\n borderColor: {\n type: String,\n default: '',\n },\n /**\n * @description input name of Switch\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching\n */\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n /**\n * @description id for input\n */\n id: String,\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n },\n /**\n * @deprecated binding value ( deprecated, use `model-value / v-model` instead )\n */\n value: {\n type: [Boolean, String, Number],\n default: false,\n },\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\n\nexport const switchEmits = {\n [UPDATE_MODEL_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [CHANGE_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [INPUT_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n}\nexport type SwitchEmits = typeof switchEmits\n\nexport type SwitchInstance = InstanceType<typeof Switch>\n"],"names":["buildProps","viewModes","isValidComponentSize","iconPropType","definePropType","UPDATE_MODEL_EVENT","isBoolean","isString","isNumber","CHANGE_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;;;;;AAeY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,cAAS;AACrB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAEC,8BAAoB;AACnC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,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E,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC3E,EAAE,CAACE,iBAAW,GAAG,CAAC,GAAG,KAAKJ,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC1E;;;;;"}
@@ -28,7 +28,7 @@ export declare const cellStarts: {
28
28
  export declare const getDefaultClassName: (type: any) => any;
29
29
  export declare const cellForced: {
30
30
  selection: {
31
- renderHeader<T>({ store }: {
31
+ renderHeader<T>({ store, column }: {
32
32
  store: any;
33
33
  }): VNode<import("vue").RendererNode, import("vue").RendererElement, {
34
34
  [key: string]: any;
@@ -41,7 +41,7 @@ const getDefaultClassName = (type) => {
41
41
  };
42
42
  const cellForced = {
43
43
  selection: {
44
- renderHeader({ store }) {
44
+ renderHeader({ store, column }) {
45
45
  function isDisabled() {
46
46
  return store.states.data.value && store.states.data.value.length === 0;
47
47
  }
@@ -50,7 +50,8 @@ const cellForced = {
50
50
  size: store.states.tableSize.value,
51
51
  indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
52
52
  "onUpdate:modelValue": store.toggleAllSelection,
53
- modelValue: store.states.isAllSelected.value
53
+ modelValue: store.states.isAllSelected.value,
54
+ ariaLabel: column.label
54
55
  });
55
56
  },
56
57
  renderCell({
@@ -66,7 +67,8 @@ const cellForced = {
66
67
  store.commit("rowSelectedChanged", row);
67
68
  },
68
69
  onClick: (event) => event.stopPropagation(),
69
- modelValue: store.isSelected(row)
70
+ modelValue: store.isSelected(row),
71
+ ariaLabel: column.label
70
72
  });
71
73
  },
72
74
  sortable: false,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../../../../packages/components/table/src/config.ts"],"sourcesContent":["// @ts-nocheck\nimport { h } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowRight, Loading } from '@element-plus/icons-vue'\nimport { getProp } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { Store } from './store'\nimport type { TreeNode } from './table/defaults'\n\nconst defaultClassNames = {\n selection: 'table-column--selection',\n expand: 'table__expand-column',\n}\n\nexport const cellStarts = {\n default: {\n order: '',\n },\n selection: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n expand: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n index: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n}\n\nexport const getDefaultClassName = (type) => {\n return defaultClassNames[type] || ''\n}\n\n// 这些选项不应该被覆盖\nexport const cellForced = {\n selection: {\n renderHeader<T>({ store }: { store: Store<T> }) {\n function isDisabled() {\n return store.states.data.value && store.states.data.value.length === 0\n }\n return h(ElCheckbox, {\n disabled: isDisabled(),\n size: store.states.tableSize.value,\n indeterminate:\n store.states.selection.value.length > 0 &&\n !store.states.isAllSelected.value,\n 'onUpdate:modelValue': store.toggleAllSelection,\n modelValue: store.states.isAllSelected.value,\n })\n },\n renderCell<T>({\n row,\n column,\n store,\n $index,\n }: {\n row: T\n column: TableColumnCtx<T>\n store: Store<T>\n $index: string\n }) {\n return h(ElCheckbox, {\n disabled: column.selectable\n ? !column.selectable.call(null, row, $index)\n : false,\n size: store.states.tableSize.value,\n onChange: () => {\n store.commit('rowSelectedChanged', row)\n },\n onClick: (event: Event) => event.stopPropagation(),\n modelValue: store.isSelected(row),\n })\n },\n sortable: false,\n resizable: false,\n },\n index: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || '#'\n },\n renderCell<T>({\n column,\n $index,\n }: {\n column: TableColumnCtx<T>\n $index: number\n }) {\n let i = $index + 1\n const index = column.index\n\n if (typeof index === 'number') {\n i = $index + index\n } else if (typeof index === 'function') {\n i = index($index)\n }\n return h('div', {}, [i])\n },\n sortable: false,\n },\n expand: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || ''\n },\n renderCell<T>({\n row,\n store,\n expanded,\n }: {\n row: T\n store: Store<T>\n expanded: boolean\n }) {\n const { ns } = store\n const classes = [ns.e('expand-icon')]\n if (expanded) {\n classes.push(ns.em('expand-icon', 'expanded'))\n }\n const callback = function (e: Event) {\n e.stopPropagation()\n store.toggleRowExpansion(row)\n }\n return h(\n 'div',\n {\n class: classes,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(ElIcon, null, {\n default: () => {\n return [h(ArrowRight)]\n },\n }),\n ]\n },\n }\n )\n },\n sortable: false,\n resizable: false,\n },\n}\n\nexport function defaultRenderCell<T>({\n row,\n column,\n $index,\n}: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n}) {\n const property = column.property\n const value = property && getProp(row, property).value\n if (column && column.formatter) {\n return column.formatter(row, column, value, $index)\n }\n return value?.toString?.() || ''\n}\n\nexport function treeCellPrefix<T>(\n {\n row,\n treeNode,\n store,\n }: {\n row: T\n treeNode: TreeNode\n store: Store<T>\n },\n createPlaceholder = false\n) {\n const { ns } = store\n if (!treeNode) {\n if (createPlaceholder) {\n return [\n h('span', {\n class: ns.e('placeholder'),\n }),\n ]\n }\n return null\n }\n const ele: VNode[] = []\n const callback = function (e) {\n e.stopPropagation()\n if (treeNode.loading) {\n return\n }\n store.loadOrToggle(row)\n }\n if (treeNode.indent) {\n ele.push(\n h('span', {\n class: ns.e('indent'),\n style: { 'padding-left': `${treeNode.indent}px` },\n })\n )\n }\n if (typeof treeNode.expanded === 'boolean' && !treeNode.noLazyChildren) {\n const expandClasses = [\n ns.e('expand-icon'),\n treeNode.expanded ? ns.em('expand-icon', 'expanded') : '',\n ]\n let icon = ArrowRight\n if (treeNode.loading) {\n icon = Loading\n }\n\n ele.push(\n h(\n 'div',\n {\n class: expandClasses,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(\n ElIcon,\n { class: { [ns.is('loading')]: treeNode.loading } },\n {\n default: () => [h(icon)],\n }\n ),\n ]\n },\n }\n )\n )\n } else {\n ele.push(\n h('span', {\n class: ns.e('placeholder'),\n })\n )\n }\n return ele\n}\n"],"names":["h","ElCheckbox","ElIcon","ArrowRight","getProp","Loading"],"mappings":";;;;;;;;;;;AAKA,MAAM,iBAAiB,GAAG;AAC1B,EAAE,SAAS,EAAE,yBAAyB;AACtC,EAAE,MAAM,EAAE,sBAAsB;AAChC,CAAC,CAAC;AACU,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO,EAAE;AACX,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;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AAC,CAAC,aAAa,CAAC;AAChC,KAAK,CAAC,CAAC,CAAC;AACR,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;;;;;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../../../../packages/components/table/src/config.ts"],"sourcesContent":["// @ts-nocheck\nimport { h } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowRight, Loading } from '@element-plus/icons-vue'\nimport { getProp } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { Store } from './store'\nimport type { TreeNode } from './table/defaults'\n\nconst defaultClassNames = {\n selection: 'table-column--selection',\n expand: 'table__expand-column',\n}\n\nexport const cellStarts = {\n default: {\n order: '',\n },\n selection: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n expand: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n index: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n}\n\nexport const getDefaultClassName = (type) => {\n return defaultClassNames[type] || ''\n}\n\n// 这些选项不应该被覆盖\nexport const cellForced = {\n selection: {\n renderHeader<T>({ store, column }: { store: Store<T> }) {\n function isDisabled() {\n return store.states.data.value && store.states.data.value.length === 0\n }\n return h(ElCheckbox, {\n disabled: isDisabled(),\n size: store.states.tableSize.value,\n indeterminate:\n store.states.selection.value.length > 0 &&\n !store.states.isAllSelected.value,\n 'onUpdate:modelValue': store.toggleAllSelection,\n modelValue: store.states.isAllSelected.value,\n ariaLabel: column.label,\n })\n },\n renderCell<T>({\n row,\n column,\n store,\n $index,\n }: {\n row: T\n column: TableColumnCtx<T>\n store: Store<T>\n $index: string\n }) {\n return h(ElCheckbox, {\n disabled: column.selectable\n ? !column.selectable.call(null, row, $index)\n : false,\n size: store.states.tableSize.value,\n onChange: () => {\n store.commit('rowSelectedChanged', row)\n },\n onClick: (event: Event) => event.stopPropagation(),\n modelValue: store.isSelected(row),\n ariaLabel: column.label,\n })\n },\n sortable: false,\n resizable: false,\n },\n index: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || '#'\n },\n renderCell<T>({\n column,\n $index,\n }: {\n column: TableColumnCtx<T>\n $index: number\n }) {\n let i = $index + 1\n const index = column.index\n\n if (typeof index === 'number') {\n i = $index + index\n } else if (typeof index === 'function') {\n i = index($index)\n }\n return h('div', {}, [i])\n },\n sortable: false,\n },\n expand: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || ''\n },\n renderCell<T>({\n row,\n store,\n expanded,\n }: {\n row: T\n store: Store<T>\n expanded: boolean\n }) {\n const { ns } = store\n const classes = [ns.e('expand-icon')]\n if (expanded) {\n classes.push(ns.em('expand-icon', 'expanded'))\n }\n const callback = function (e: Event) {\n e.stopPropagation()\n store.toggleRowExpansion(row)\n }\n return h(\n 'div',\n {\n class: classes,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(ElIcon, null, {\n default: () => {\n return [h(ArrowRight)]\n },\n }),\n ]\n },\n }\n )\n },\n sortable: false,\n resizable: false,\n },\n}\n\nexport function defaultRenderCell<T>({\n row,\n column,\n $index,\n}: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n}) {\n const property = column.property\n const value = property && getProp(row, property).value\n if (column && column.formatter) {\n return column.formatter(row, column, value, $index)\n }\n return value?.toString?.() || ''\n}\n\nexport function treeCellPrefix<T>(\n {\n row,\n treeNode,\n store,\n }: {\n row: T\n treeNode: TreeNode\n store: Store<T>\n },\n createPlaceholder = false\n) {\n const { ns } = store\n if (!treeNode) {\n if (createPlaceholder) {\n return [\n h('span', {\n class: ns.e('placeholder'),\n }),\n ]\n }\n return null\n }\n const ele: VNode[] = []\n const callback = function (e) {\n e.stopPropagation()\n if (treeNode.loading) {\n return\n }\n store.loadOrToggle(row)\n }\n if (treeNode.indent) {\n ele.push(\n h('span', {\n class: ns.e('indent'),\n style: { 'padding-left': `${treeNode.indent}px` },\n })\n )\n }\n if (typeof treeNode.expanded === 'boolean' && !treeNode.noLazyChildren) {\n const expandClasses = [\n ns.e('expand-icon'),\n treeNode.expanded ? ns.em('expand-icon', 'expanded') : '',\n ]\n let icon = ArrowRight\n if (treeNode.loading) {\n icon = Loading\n }\n\n ele.push(\n h(\n 'div',\n {\n class: expandClasses,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(\n ElIcon,\n { class: { [ns.is('loading')]: treeNode.loading } },\n {\n default: () => [h(icon)],\n }\n ),\n ]\n },\n }\n )\n )\n } else {\n ele.push(\n h('span', {\n class: ns.e('placeholder'),\n })\n )\n }\n return ele\n}\n"],"names":["h","ElCheckbox","ElIcon","ArrowRight","getProp","Loading"],"mappings":";;;;;;;;;;;AAKA,MAAM,iBAAiB,GAAG;AAC1B,EAAE,SAAS,EAAE,yBAAyB;AACtC,EAAE,MAAM,EAAE,sBAAsB;AAChC,CAAC,CAAC;AACU,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO,EAAE;AACX,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE;AACU,MAAC,mBAAmB,GAAG,CAAC,IAAI,KAAK;AAC7C,EAAE,OAAO,iBAAiB,CAAC,IAAI,CAAC,IA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AC,CAAC;AACR,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;;;;;;;;"}
@@ -14,6 +14,7 @@ var defaults = require('./defaults.js');
14
14
  var index = require('../../../../hooks/use-namespace/index.js');
15
15
  var forEditor = require('../../../config-provider/src/for-editor.js');
16
16
  var core = require('@vueuse/core');
17
+ var raf = require('../../../../utils/raf.js');
17
18
  var style = require('../../../../utils/dom/style.js');
18
19
 
19
20
  var TableBody = vue.defineComponent({
@@ -28,11 +29,7 @@ var TableBody = vue.defineComponent({
28
29
  forEditor.watch(props.store.states.hoverRow, (newVal, oldVal) => {
29
30
  if (!props.store.states.isComplex.value || !core.isClient)
30
31
  return;
31
- let raf = window.requestAnimationFrame;
32
- if (!raf) {
33
- raf = (fn) => window.setTimeout(fn, 16);
34
- }
35
- raf(() => {
32
+ raf.rAF(() => {
36
33
  const el = instance == null ? void 0 : instance.vnode.el;
37
34
  const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`));
38
35
  const oldRow = rows[oldVal];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n} from 'vue'\nimport { watch } from '../../../config-provider'\nimport { addClass, isClient, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n if (!props.store.states.isComplex.value || !isClient) return\n let raf = window.requestAnimationFrame\n if (!raf) {\n raf = (fn) => window.setTimeout(fn, 16)\n }\n raf(() => {\n // just get first level children; fix #9723\n const el = instance?.vnode.el as HTMLElement\n const rows = Array.from(el?.children || []).filter((e) =>\n e?.classList.contains(`${ns.e('row')}`)\n )\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n if (oldRow) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n\n return {\n ns,\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n return h('tbody', {}, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ])\n },\n})\n"],"names":["defineComponent","defaultProps","getCurrentInstance","inject","TABLE_INJECTION_KEY","useNamespace","useRender","useLayoutObserver","watch","isClient","removeClass","addClass","onUnmounted","removePopper","h"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,gBAAeA,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAEC,mBAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAGC,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC/C,IAAI,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAGC,uBAAS,CAAC,KAAK,CAAC,CAAC;AAClF,IAAI,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,GAAGC,yBAAi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C,CAAC;AACxC,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK,CAAC,CAAC;AACP,IAAIC,eAAW,CAAC,MAAM;AACtB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,CAAC,EAAE,GAAGC,iBAAY,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,MAAM,EAAE;AACR,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,OAAOC,KAAC,CAAC,OAAO,EAAE,EAAE,EAAE;AAC1B,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAChC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,OAAO,EAAE,EAAE,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../packages/components/table/src/table-body/index.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onUnmounted,\n} from 'vue'\nimport { watch } from '../../../config-provider'\nimport { addClass, isClient, rAF, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useLayoutObserver from '../layout-observer'\nimport { removePopper } from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useRender from './render-helper'\nimport defaultProps from './defaults'\n\nimport type { VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElTableBody',\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance()\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const { wrappedRowRender, tooltipContent, tooltipTrigger } =\n useRender(props)\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n watch(props.store.states.hoverRow, (newVal: any, oldVal: any) => {\n if (!props.store.states.isComplex.value || !isClient) return\n\n rAF(() => {\n // just get first level children; fix #9723\n const el = instance?.vnode.el as HTMLElement\n const rows = Array.from(el?.children || []).filter((e) =>\n e?.classList.contains(`${ns.e('row')}`)\n )\n const oldRow = rows[oldVal]\n const newRow = rows[newVal]\n if (oldRow) {\n removeClass(oldRow, 'hover-row')\n }\n if (newRow) {\n addClass(newRow, 'hover-row')\n }\n })\n })\n\n onUnmounted(() => {\n removePopper?.()\n })\n\n return {\n ns,\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n },\n render() {\n const { wrappedRowRender, store } = this\n const data = store.states.data.value || []\n return h('tbody', {}, [\n data.reduce((acc: VNode[], row) => {\n return acc.concat(wrappedRowRender(row, acc.length))\n }, []),\n ])\n },\n})\n"],"names":["defineComponent","defaultProps","getCurrentInstance","inject","TABLE_INJECTION_KEY","useNamespace","useRender","useLayoutObserver","watch","isClient","rAF","removeClass","addClass","onUnmounted","removePopper","h"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,gBAAeA,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAEC,mBAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE;AACf,IAAI,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AAC1C,IAAI,MAAM,MAAM,GAAGC,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC/C,IAAI,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CA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AAO,CAAC,CAAC;AACT,KAAK,CAAC,CAAC;AACP,IAAIC,eAAW,CAAC,MAAM;AACtB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,CAAC,EAAE,GAAGC,iBAAY,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,MAAM,EAAE;AACR,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AAC7C,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC/C,IAAI,OAAOC,KAAC,CAAC,OAAO,EAAE,EAAE,EAAE;AAC1B,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAChC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,OAAO,EAAE,EAAE,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC,CAAC;;;;"}
@@ -69,7 +69,7 @@ function useRender(props) {
69
69
  if (!rowspan || !colspan) {
70
70
  return null;
71
71
  }
72
- const columnData = { ...column };
72
+ const columnData = Object.assign({}, column);
73
73
  columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);
74
74
  const data = {
75
75
  store: props.store,