@sdata/web-vue 3.30.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (768) hide show
  1. package/dist/sd.css +319 -23
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/auto-tooltip/auto-tooltip.js +3 -62
  4. package/es/_components/auto-tooltip/auto-tooltip.vue.d.ts +17 -0
  5. package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +66 -0
  6. package/es/_components/client-only.js +3 -16
  7. package/es/_components/client-only.vue.d.ts +13 -0
  8. package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +17 -0
  9. package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
  11. package/es/_components/input-label/input-label.js +3 -168
  12. package/es/_components/input-label/input-label.vue.d.ts +59 -0
  13. package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +192 -0
  14. package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/es/_components/resize-observer.js +3 -44
  17. package/es/_components/resize-observer.vue.d.ts +17 -0
  18. package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +48 -0
  19. package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +2 -2
  20. package/es/_components/select-view/select-view.js +3 -231
  21. package/es/_components/select-view/select-view.vue.d.ts +76 -0
  22. package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +269 -0
  23. package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
  24. package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
  25. package/es/_hooks/use-scrollbar.js +1 -1
  26. package/es/_utils/array.js +1 -6
  27. package/es/_utils/color.js +4 -6
  28. package/es/_utils/date.js +2 -2
  29. package/es/_utils/global-config.js +1 -1
  30. package/es/_utils/omit.js +1 -1
  31. package/es/_utils/responsive-observe.js +1 -1
  32. package/es/_utils/virtual-dropdown.js +1 -1
  33. package/es/_utils/vue-utils.js +2 -1
  34. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/asyncToGenerator.js +1 -1
  35. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/defineProperty.js +1 -1
  36. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/extends.js +1 -1
  37. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
  38. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectSpread2.js +1 -1
  39. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutProperties.js +1 -1
  40. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
  41. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPrimitive.js +1 -1
  42. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/toPropertyKey.js +1 -1
  43. package/es/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/typeof.js +1 -1
  44. package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -3
  45. package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
  46. package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +1 -1
  47. package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +3 -2
  48. package/es/auto-complete/auto-complete.js +3 -389
  49. package/es/auto-complete/auto-complete.vue.d.ts +693 -0
  50. package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +293 -0
  51. package/es/auto-complete/index.d.ts +1667 -79
  52. package/es/avatar/avatar-group.js +4 -96
  53. package/es/avatar/avatar-group.vue.d.ts +29 -0
  54. package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +84 -0
  55. package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
  56. package/es/avatar/index.d.ts +53 -51
  57. package/es/avatar/index.js +4 -4
  58. package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +1 -1
  59. package/es/badge/badge.js +4 -149
  60. package/es/badge/badge.vue.d.ts +36 -0
  61. package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +112 -0
  62. package/es/badge/index.d.ts +39 -100
  63. package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +2 -2
  64. package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +2 -2
  65. package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +1 -1
  66. package/es/border-beam/styles.js +1 -1
  67. package/es/breadcrumb/breadcrumb-item.js +3 -106
  68. package/es/breadcrumb/breadcrumb-item.vue.d.ts +25 -0
  69. package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +89 -0
  70. package/es/breadcrumb/breadcrumb.js +3 -115
  71. package/es/breadcrumb/breadcrumb.vue.d.ts +29 -0
  72. package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +98 -0
  73. package/es/breadcrumb/index.d.ts +72 -79
  74. package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
  75. package/es/button/button.vue_vue_type_script_setup_true_lang.js +8 -6
  76. package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +4 -3
  77. package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +2 -2
  78. package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +3 -3
  79. package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
  80. package/es/card/card-actions.js +5 -0
  81. package/es/card/card-actions.vue.d.ts +7 -0
  82. package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +23 -0
  83. package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +1 -1
  84. package/es/card/card-meta.js +3 -47
  85. package/es/card/card-meta.vue.d.ts +21 -0
  86. package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +54 -0
  87. package/es/card/card.js +3 -180
  88. package/es/card/card.vue.d.ts +40 -0
  89. package/es/card/card.vue_vue_type_script_setup_true_lang.js +116 -0
  90. package/es/card/context.d.ts +1 -2
  91. package/es/card/index.d.ts +67 -871
  92. package/es/card/index.js +1 -1
  93. package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
  94. package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
  95. package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
  96. package/es/carousel/carousel.js +3 -289
  97. package/es/carousel/{carousel.d.ts → carousel.vue.d.ts} +8 -11
  98. package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +229 -0
  99. package/es/carousel/index.d.ts +11 -17
  100. package/es/carousel/index.js +1 -1
  101. package/es/cascader/base-cascader-panel.js +3 -70
  102. package/es/cascader/{base-cascader-panel.d.ts → base-cascader-panel.vue.d.ts} +20 -11
  103. package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +85 -0
  104. package/es/cascader/cascader-column.js +3 -75
  105. package/es/cascader/{cascader-column.d.ts → cascader-column.vue.d.ts} +18 -11
  106. package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +103 -0
  107. package/es/cascader/cascader-option.js +3 -141
  108. package/es/cascader/{cascader-option.d.ts → cascader-option.vue.d.ts} +4 -3
  109. package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +171 -0
  110. package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +4 -3
  111. package/es/cascader/cascader-search-panel.js +3 -58
  112. package/es/cascader/{cascader-search-panel.d.ts → cascader-search-panel.vue.d.ts} +15 -4
  113. package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +71 -0
  114. package/es/cascader/cascader.vue.d.ts +3 -1
  115. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +17 -13
  116. package/es/checkbox/checkbox-group.js +3 -139
  117. package/es/checkbox/checkbox-group.vue.d.ts +41 -0
  118. package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +100 -0
  119. package/es/checkbox/checkbox.js +3 -195
  120. package/es/checkbox/checkbox.vue.d.ts +39 -0
  121. package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +165 -0
  122. package/es/checkbox/icon-check.js +3 -18
  123. package/es/checkbox/icon-check.vue.d.ts +3 -0
  124. package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +24 -0
  125. package/es/checkbox/index.d.ts +102 -294
  126. package/es/collapse/collapse-item.js +3 -177
  127. package/es/collapse/collapse-item.vue.d.ts +30 -0
  128. package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +168 -0
  129. package/es/collapse/collapse.vue.d.ts +1 -1
  130. package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
  131. package/es/collapse/index.d.ts +50 -155
  132. package/es/collapse/style/index.css +1 -0
  133. package/es/collapse/style/index.scss +1 -0
  134. package/es/color-picker/color-picker.js +3 -293
  135. package/es/color-picker/{color-picker.d.ts → color-picker.vue.d.ts} +25 -14
  136. package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +256 -0
  137. package/es/color-picker/control-bar.js +3 -54
  138. package/es/color-picker/{control-bar.d.ts → control-bar.vue.d.ts} +5 -4
  139. package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +68 -0
  140. package/es/color-picker/gradient-thumb.js +5 -0
  141. package/es/color-picker/gradient-thumb.vue.d.ts +13 -0
  142. package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +69 -0
  143. package/es/color-picker/index.d.ts +37 -32
  144. package/es/color-picker/palette.js +3 -43
  145. package/es/color-picker/palette.vue.d.ts +17 -0
  146. package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +51 -0
  147. package/es/color-picker/panel.js +3 -475
  148. package/es/color-picker/{panel.d.ts → panel.vue.d.ts} +5 -4
  149. package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +453 -0
  150. package/es/color-picker/utils.js +12 -10
  151. package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +1 -1
  152. package/es/components.d.ts +2 -0
  153. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
  154. package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
  155. package/es/config-provider/theme.js +1 -1
  156. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +2 -2
  157. package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +2 -2
  158. package/es/date-picker/hooks/use-range-header-value.js +2 -2
  159. package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
  160. package/es/date-picker/hooks/use-time-picker-value.js +10 -8
  161. package/es/date-picker/index.d.ts +238 -122
  162. package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
  163. package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
  164. package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
  165. package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
  166. package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +1 -1
  167. package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
  168. package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
  169. package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
  170. package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
  171. package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +2 -2
  172. package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
  173. package/es/date-picker/picker.vue.d.ts +1 -1
  174. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +3 -3
  175. package/es/date-picker/pickers/date-picker.js +3 -93
  176. package/es/date-picker/pickers/{date-picker.d.ts → date-picker.vue.d.ts} +26 -35
  177. package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +107 -0
  178. package/es/date-picker/pickers/month-picker.js +3 -37
  179. package/es/date-picker/pickers/month-picker.vue.d.ts +38 -0
  180. package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +51 -0
  181. package/es/date-picker/pickers/quarter-picker.js +3 -46
  182. package/es/date-picker/pickers/{quarter-picker.d.ts → quarter-picker.vue.d.ts} +14 -3
  183. package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +60 -0
  184. package/es/date-picker/pickers/week-picker.js +3 -56
  185. package/es/date-picker/pickers/{week-picker.d.ts → week-picker.vue.d.ts} +15 -4
  186. package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +70 -0
  187. package/es/date-picker/pickers/year-picker.js +3 -37
  188. package/es/date-picker/pickers/year-picker.vue.d.ts +38 -0
  189. package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +51 -0
  190. package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
  191. package/es/date-picker/range-picker.vue.d.ts +1 -1
  192. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +3 -3
  193. package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
  194. package/es/descriptions/descriptions.js +3 -232
  195. package/es/descriptions/{descriptions.d.ts → descriptions.vue.d.ts} +22 -23
  196. package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +209 -0
  197. package/es/descriptions/index.d.ts +18 -32
  198. package/es/descriptions/index.js +1 -1
  199. package/es/divider/divider.js +3 -71
  200. package/es/divider/divider.vue.d.ts +21 -0
  201. package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +47 -0
  202. package/es/divider/index.d.ts +25 -66
  203. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +3 -3
  204. package/es/drawer/index.js +2 -2
  205. package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
  206. package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
  207. package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +1 -1
  208. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -2
  209. package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
  210. package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  211. package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +3 -3
  212. package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +2 -2
  213. package/es/empty/empty.js +3 -49
  214. package/es/empty/empty.vue.d.ts +18 -0
  215. package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +44 -0
  216. package/es/empty/index.d.ts +20 -36
  217. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +2 -2
  218. package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
  219. package/es/file-previewer/use-pdf-js.js +2 -2
  220. package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
  221. package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
  222. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +31 -30
  223. package/es/form/form.vue_vue_type_script_setup_true_lang.js +1 -1
  224. package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +4 -3
  225. package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
  226. package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +3 -2
  227. package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
  228. package/es/grid/style/col.scss +29 -41
  229. package/es/grid/style/index.css +237 -0
  230. package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +1 -1
  231. package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +1 -1
  232. package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +1 -1
  233. package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +1 -1
  234. package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +1 -1
  235. package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +1 -1
  236. package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
  237. package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  238. package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +1 -1
  239. package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +1 -1
  240. package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  241. package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +1 -1
  242. package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +1 -1
  243. package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +1 -1
  244. package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +1 -1
  245. package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +1 -1
  246. package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +1 -1
  247. package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +1 -1
  248. package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +1 -1
  249. package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +1 -1
  250. package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +1 -1
  251. package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  252. package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +1 -1
  253. package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +1 -1
  254. package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  255. package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  256. package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  257. package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +1 -1
  258. package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +1 -1
  259. package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +1 -1
  260. package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +1 -1
  261. package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +1 -1
  262. package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +1 -1
  263. package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +1 -1
  264. package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +1 -1
  265. package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +1 -1
  266. package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  267. package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +1 -1
  268. package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +1 -1
  269. package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +1 -1
  270. package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +1 -1
  271. package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +1 -1
  272. package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +1 -1
  273. package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +1 -1
  274. package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +1 -1
  275. package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +1 -1
  276. package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +1 -1
  277. package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +1 -1
  278. package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +1 -1
  279. package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +1 -1
  280. package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  281. package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +1 -1
  282. package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +1 -1
  283. package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +1 -1
  284. package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +1 -1
  285. package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +1 -1
  286. package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +1 -1
  287. package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +1 -1
  288. package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +1 -1
  289. package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +1 -1
  290. package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +1 -1
  291. package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +1 -1
  292. package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +1 -1
  293. package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +1 -1
  294. package/es/icon-component/add-from-icon-font-cn.d.ts +8 -13
  295. package/es/icon-component/add-from-icon-font-cn.js +13 -22
  296. package/es/icon-component/icon-font.js +5 -0
  297. package/es/icon-component/icon-font.vue.d.ts +35 -0
  298. package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +38 -0
  299. package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +1 -1
  300. package/es/icon-component/index.d.ts +1 -13
  301. package/es/icon.js +5 -5
  302. package/es/image/hooks/use-image-drag.js +3 -1
  303. package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
  304. package/es/image/image.vue_vue_type_script_setup_true_lang.js +2 -2
  305. package/es/image/index.d.ts +1 -1
  306. package/es/image/preview-action.js +3 -47
  307. package/es/image/preview-action.vue.d.ts +29 -0
  308. package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +55 -0
  309. package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
  310. package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +1 -1
  311. package/es/image/preview-toolbar.vue.d.ts +2 -2
  312. package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +3 -3
  313. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +33 -23
  314. package/es/index.css +319 -23
  315. package/es/index.d.ts +2 -2
  316. package/es/index.js +16 -14
  317. package/es/index.scss +1 -1
  318. package/es/input/index.d.ts +1770 -136
  319. package/es/input/index.js +1 -1
  320. package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
  321. package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +3 -3
  322. package/es/input/input-search.js +3 -140
  323. package/es/input/input-search.vue.d.ts +620 -0
  324. package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +168 -0
  325. package/es/input/input.js +3 -487
  326. package/es/input/{input.d.ts → input.vue.d.ts} +42 -43
  327. package/es/input/input.vue_vue_type_script_setup_true_lang.js +377 -0
  328. package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +1 -1
  329. package/es/input-mask/mask-engine.js +4 -4
  330. package/es/input-mask/presets.js +1 -1
  331. package/es/input-number/index.d.ts +1670 -106
  332. package/es/input-number/input-number.js +3 -529
  333. package/es/input-number/input-number.vue.d.ts +708 -0
  334. package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +384 -0
  335. package/es/input-tag/index.d.ts +76 -92
  336. package/es/input-tag/input-tag.js +3 -672
  337. package/es/input-tag/{input-tag.d.ts → input-tag.vue.d.ts} +52 -49
  338. package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +585 -0
  339. package/es/input-tag/utils.js +1 -1
  340. package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +1 -1
  341. package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +1 -1
  342. package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
  343. package/es/json-form/utils.js +4 -4
  344. package/es/kv-list/index.d.ts +34 -34
  345. package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
  346. package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +1 -1
  347. package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
  348. package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
  349. package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
  350. package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +4 -3
  351. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +1 -1
  352. package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
  353. package/es/list/index.d.ts +2619 -93
  354. package/es/list/index.js +2 -2
  355. package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
  356. package/es/list/list-item.js +3 -54
  357. package/es/list/list-item.vue.d.ts +22 -0
  358. package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +58 -0
  359. package/es/list/list.js +3 -383
  360. package/es/list/list.vue.d.ts +980 -0
  361. package/es/list/list.vue_vue_type_script_setup_true_lang.js +326 -0
  362. package/es/mention/index.d.ts +3234 -58
  363. package/es/mention/mention.js +3 -437
  364. package/es/mention/mention.vue.d.ts +1210 -0
  365. package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +376 -0
  366. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +5 -4
  367. package/es/menu/hooks/use-level.js +2 -1
  368. package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +3 -2
  369. package/es/menu/index.d.ts +3 -3
  370. package/es/menu/index.js +1 -1
  371. package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +3 -2
  372. package/es/menu/item.js +3 -127
  373. package/es/menu/{item.d.ts → item.vue.d.ts} +25 -4
  374. package/es/menu/item.vue_vue_type_script_setup_true_lang.js +147 -0
  375. package/es/menu/menu.js +3 -57
  376. package/es/menu/menu.vue.d.ts +66 -0
  377. package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +78 -0
  378. package/es/menu/overflow-wrap.js +3 -97
  379. package/es/menu/overflow-wrap.vue.d.ts +3 -0
  380. package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +114 -0
  381. package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +2 -2
  382. package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +2 -2
  383. package/es/menu/sub-menu.js +3 -115
  384. package/es/menu/{sub-menu.d.ts → sub-menu.vue.d.ts} +27 -30
  385. package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +110 -0
  386. package/es/message/index.js +1 -1
  387. package/es/message/message-list.js +3 -45
  388. package/es/message/{message-list.d.ts → message-list.vue.d.ts} +9 -7
  389. package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +64 -0
  390. package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
  391. package/es/modal/index.js +3 -3
  392. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +3 -3
  393. package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
  394. package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
  395. package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
  396. package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
  397. package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
  398. package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
  399. package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
  400. package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
  401. package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
  402. package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
  403. package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
  404. package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
  405. package/es/model-selector/model-selector-trigger-element.js +5 -0
  406. package/es/model-selector/model-selector-trigger-element.vue.d.ts +7 -0
  407. package/es/model-selector/model-selector-trigger-element.vue_vue_type_script_lang.js +18 -0
  408. package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +4 -17
  409. package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
  410. package/es/notification/index.js +1 -1
  411. package/es/notification/notification-list.js +3 -58
  412. package/es/notification/notification-list.vue.d.ts +34 -0
  413. package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +96 -0
  414. package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
  415. package/es/number-flow/continuous.d.ts +2 -0
  416. package/es/number-flow/continuous.js +7 -0
  417. package/es/number-flow/formatter.d.ts +15 -0
  418. package/es/number-flow/formatter.js +54 -0
  419. package/es/number-flow/group-key.d.ts +11 -0
  420. package/es/number-flow/group-key.js +4 -0
  421. package/es/number-flow/index.d.ts +63 -0
  422. package/es/number-flow/index.js +15 -0
  423. package/es/number-flow/number-flow-group.js +5 -0
  424. package/es/number-flow/number-flow-group.vue.d.ts +12 -0
  425. package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +58 -0
  426. package/es/number-flow/number-flow.js +5 -0
  427. package/es/number-flow/number-flow.vue.d.ts +20 -0
  428. package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +284 -0
  429. package/es/number-flow/style/index.css +85 -0
  430. package/es/number-flow/style/index.scss +93 -0
  431. package/es/number-flow/style/token.scss +5 -0
  432. package/es/number-flow/types.d.ts +46 -0
  433. package/es/number-flow/use-can-animate.d.ts +4 -0
  434. package/es/number-flow/use-can-animate.js +30 -0
  435. package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +1 -1
  436. package/es/pagination/index.d.ts +45 -49
  437. package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
  438. package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
  439. package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
  440. package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
  441. package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
  442. package/es/pagination/pagination.js +3 -463
  443. package/es/pagination/{pagination.d.ts → pagination.vue.d.ts} +42 -31
  444. package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +454 -0
  445. package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
  446. package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
  447. package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +1 -1
  448. package/es/progress/line.vue_vue_type_script_setup_true_lang.js +1 -1
  449. package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
  450. package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +1 -1
  451. package/es/qr-code/index.d.ts +18 -33
  452. package/es/qr-code/qr-code.vue.d.ts +6 -11
  453. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +4 -3
  454. package/es/radio/index.d.ts +111 -289
  455. package/es/radio/radio-group.js +3 -168
  456. package/es/radio/radio-group.vue.d.ts +45 -0
  457. package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +129 -0
  458. package/es/radio/radio.js +3 -172
  459. package/es/radio/radio.vue.d.ts +40 -0
  460. package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +152 -0
  461. package/es/rate/index.d.ts +17 -11
  462. package/es/rate/rate.js +3 -269
  463. package/es/rate/{rate.d.ts → rate.vue.d.ts} +18 -6
  464. package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +220 -0
  465. package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +1 -3
  466. package/es/result/403.js +3 -481
  467. package/es/result/403.vue.d.ts +3 -0
  468. package/es/result/403.vue_vue_type_script_setup_true_lang.js +24 -0
  469. package/es/result/404.js +3 -335
  470. package/es/result/404.vue.d.ts +3 -0
  471. package/es/result/404.vue_vue_type_script_setup_true_lang.js +24 -0
  472. package/es/result/500.js +3 -344
  473. package/es/result/500.vue.d.ts +3 -0
  474. package/es/result/500.vue_vue_type_script_setup_true_lang.js +19 -0
  475. package/es/result/result.vue_vue_type_script_setup_true_lang.js +2 -2
  476. package/es/rich-text-editor/index.d.ts +3 -3
  477. package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
  478. package/es/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
  479. package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
  480. package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +4 -4
  481. package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +2 -2
  482. package/es/sd-vue.js +17 -16
  483. package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +2 -2
  484. package/es/select/hooks/use-options.js +1 -1
  485. package/es/select/index.d.ts +93 -2299
  486. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  487. package/es/select/select.js +3 -684
  488. package/es/select/select.vue.d.ts +450 -0
  489. package/es/select/select.vue_vue_type_script_setup_true_lang.js +774 -0
  490. package/es/select/utils.js +1 -1
  491. package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
  492. package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
  493. package/es/sender/sender-recording-icon.js +5 -0
  494. package/es/sender/sender-recording-icon.vue.d.ts +3 -0
  495. package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +38 -0
  496. package/es/sender/sender-skill-tag.js +5 -0
  497. package/es/sender/sender-skill-tag.vue.d.ts +28 -0
  498. package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +59 -0
  499. package/es/sender/sender-stop-loading-icon.js +5 -0
  500. package/es/sender/sender-stop-loading-icon.vue.d.ts +3 -0
  501. package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +54 -0
  502. package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
  503. package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +8 -109
  504. package/es/sender/use-recorder.js +2 -1
  505. package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +1 -1
  506. package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
  507. package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
  508. package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +5 -2
  509. package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
  510. package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
  511. package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
  512. package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
  513. package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +1 -1
  514. package/es/slider/utils.js +1 -2
  515. package/es/space/index.d.ts +26 -72
  516. package/es/space/space.js +3 -101
  517. package/es/space/space.vue.d.ts +22 -0
  518. package/es/space/space.vue_vue_type_script_setup_true_lang.js +84 -0
  519. package/es/spin/dot-loading.js +3 -28
  520. package/es/spin/dot-loading.vue.d.ts +6 -0
  521. package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +33 -0
  522. package/es/spin/index.d.ts +37 -60
  523. package/es/spin/spin.js +3 -153
  524. package/es/spin/spin.vue.d.ts +27 -0
  525. package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +139 -0
  526. package/es/split/split.vue_vue_type_script_setup_true_lang.js +2 -2
  527. package/es/statistic/countdown.vue.d.ts +9 -0
  528. package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +30 -3
  529. package/es/statistic/index.d.ts +15 -0
  530. package/es/statistic/statistic.vue.d.ts +3 -3
  531. package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +32 -63
  532. package/es/statistic/style/index.css +3 -0
  533. package/es/statistic/style/index.scss +5 -0
  534. package/es/statistic/utils.js +5 -5
  535. package/es/steps/step.vue_vue_type_script_setup_true_lang.js +1 -1
  536. package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
  537. package/es/style/theme/z-index.js +3 -3
  538. package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +2 -2
  539. package/es/table/hooks/use-row-selection.js +1 -1
  540. package/es/table/index.d.ts +449 -362
  541. package/es/table/index.js +1 -1
  542. package/es/table/table-column.js +3 -254
  543. package/es/table/table-column.vue.d.ts +75 -0
  544. package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +194 -0
  545. package/es/table/table-operation-td.js +3 -130
  546. package/es/table/table-operation-td.vue.d.ts +87 -0
  547. package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +114 -0
  548. package/es/table/table-operation-th.js +3 -73
  549. package/es/table/{table-operation-th.d.ts → table-operation-th.vue.d.ts} +5 -4
  550. package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +86 -0
  551. package/es/table/table-tbody.js +3 -16
  552. package/es/table/table-tbody.vue.d.ts +14 -0
  553. package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +23 -0
  554. package/es/table/table-td.js +3 -192
  555. package/es/table/{table-td.d.ts → table-td.vue.d.ts} +26 -12
  556. package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +218 -0
  557. package/es/table/table-th.js +3 -225
  558. package/es/table/{table-th.d.ts → table-th.vue.d.ts} +17 -6
  559. package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +268 -0
  560. package/es/table/table-thead.js +3 -16
  561. package/es/table/table-thead.vue.d.ts +14 -0
  562. package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +23 -0
  563. package/es/table/table-tr.js +3 -34
  564. package/es/table/table-tr.vue.d.ts +30 -0
  565. package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +48 -0
  566. package/es/table/table.js +3 -1637
  567. package/es/table/{table.d.ts → table.vue.d.ts} +41 -56
  568. package/es/table/table.vue_vue_type_script_setup_true_lang.js +1568 -0
  569. package/es/table/utils.js +1 -1
  570. package/es/tabs/index.d.ts +32 -33
  571. package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +1 -1
  572. package/es/tabs/tabs-button.js +3 -58
  573. package/es/tabs/{tabs-button.d.ts → tabs-button.vue.d.ts} +6 -3
  574. package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +54 -0
  575. package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
  576. package/es/tabs/tabs-nav.js +3 -297
  577. package/es/tabs/{tabs-nav.d.ts → tabs-nav.vue.d.ts} +23 -13
  578. package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +332 -0
  579. package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +1 -1
  580. package/es/tabs/tabs.js +3 -325
  581. package/es/tabs/{tabs.d.ts → tabs.vue.d.ts} +25 -18
  582. package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +237 -0
  583. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -1
  584. package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
  585. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -3
  586. package/es/thinking-orb/engine/lattice.js +1 -1
  587. package/es/thinking-orb/engine/morph.js +1 -1
  588. package/es/thinking-orb/engine/profiles.js +1 -1
  589. package/es/thinking-orb/presets.js +1 -1
  590. package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
  591. package/es/time-picker/hooks/use-time-state.js +4 -2
  592. package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +2 -2
  593. package/es/time-picker/range-panel.js +3 -56
  594. package/es/time-picker/range-panel.vue.d.ts +44 -0
  595. package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +65 -0
  596. package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
  597. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  598. package/es/timeline/context.d.ts +1 -0
  599. package/es/timeline/index.d.ts +36 -426
  600. package/es/timeline/item.vue.d.ts +3 -0
  601. package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +7 -5
  602. package/es/timeline/timeline.js +3 -109
  603. package/es/timeline/timeline.vue.d.ts +26 -0
  604. package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +68 -0
  605. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
  606. package/es/tooltip/index.d.ts +3 -0
  607. package/es/tooltip/interface.d.ts +1 -0
  608. package/es/tooltip/style/index.css +3 -0
  609. package/es/tooltip/style/index.scss +4 -0
  610. package/es/tooltip/tooltip.vue.d.ts +1 -0
  611. package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +6 -2
  612. package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +17 -15
  613. package/es/transfer/transfer-list-item.js +3 -74
  614. package/es/transfer/transfer-list-item.vue.d.ts +30 -0
  615. package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +101 -0
  616. package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +3 -3
  617. package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +1 -1
  618. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
  619. package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
  620. package/es/tree/hooks/use-draggable.js +0 -2
  621. package/es/tree/node-switcher.js +2 -2
  622. package/es/tree/node-switcher.vue.d.ts +7 -43
  623. package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +85 -0
  624. package/es/tree/node.js +3 -20
  625. package/es/tree/node.vue.d.ts +15 -0
  626. package/es/tree/node.vue_vue_type_script_setup_true_lang.js +30 -0
  627. package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
  628. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +28 -30
  629. package/es/tree/utils/tree-data.js +1 -1
  630. package/es/tree-select/hooks/use-selected-state.js +1 -1
  631. package/es/tree-select/panel.js +3 -71
  632. package/es/tree-select/panel.vue.d.ts +56 -0
  633. package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +75 -0
  634. package/es/tree-select/tree-select.vue.d.ts +5 -2
  635. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +4 -4
  636. package/es/trigger/index.d.ts +168 -506
  637. package/es/trigger/trigger.js +3 -833
  638. package/es/trigger/trigger.vue.d.ts +108 -0
  639. package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +642 -0
  640. package/es/typography/base.js +3 -427
  641. package/es/typography/base.vue.d.ts +116 -0
  642. package/es/typography/base.vue_vue_type_script_setup_true_lang.js +314 -0
  643. package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +1 -1
  644. package/es/typography/index.d.ts +108 -37
  645. package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +1 -1
  646. package/es/typography/paragraph.js +3 -35
  647. package/es/typography/paragraph.vue.d.ts +33 -0
  648. package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +42 -0
  649. package/es/typography/text.js +3 -22
  650. package/es/typography/text.vue.d.ts +27 -0
  651. package/es/typography/text.vue_vue_type_script_setup_true_lang.js +31 -0
  652. package/es/typography/title.js +3 -24
  653. package/es/typography/title.vue.d.ts +26 -0
  654. package/es/typography/title.vue_vue_type_script_setup_true_lang.js +33 -0
  655. package/es/typography/typography-content.js +5 -0
  656. package/es/typography/typography-content.vue.d.ts +9 -0
  657. package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +47 -0
  658. package/es/typography/typography-operations.js +5 -0
  659. package/es/typography/typography-operations.vue.d.ts +22 -0
  660. package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +73 -0
  661. package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
  662. package/es/typography/utils/getInnerText.d.ts +1 -1
  663. package/es/typography/utils/getInnerText.js +4 -5
  664. package/es/typography/utils/inner-text-renderer.js +5 -0
  665. package/es/typography/utils/inner-text-renderer.vue.d.ts +7 -0
  666. package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +22 -0
  667. package/es/typography/utils/measure.d.ts +2 -3
  668. package/es/typography/utils/measure.js +8 -10
  669. package/es/upload/index.d.ts +74 -148
  670. package/es/upload/style/index.css +7 -9
  671. package/es/upload/style/index.scss +6 -6
  672. package/es/upload/upload-button.js +3 -137
  673. package/es/upload/{upload-button.d.ts → upload-button.vue.d.ts} +18 -11
  674. package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +161 -0
  675. package/es/upload/upload-list-item.js +3 -120
  676. package/es/upload/{upload-list-item.d.ts → upload-list-item.vue.d.ts} +5 -4
  677. package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +195 -0
  678. package/es/upload/upload-list.js +3 -46
  679. package/es/upload/upload-list.vue.d.ts +38 -0
  680. package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +47 -0
  681. package/es/upload/upload-picture-item.js +3 -86
  682. package/es/upload/upload-picture-item.vue.d.ts +35 -0
  683. package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +147 -0
  684. package/es/upload/upload-progress.js +3 -73
  685. package/es/upload/{upload-progress.d.ts → upload-progress.vue.d.ts} +5 -4
  686. package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +75 -0
  687. package/es/upload/upload.js +3 -671
  688. package/es/upload/{upload.d.ts → upload.vue.d.ts} +50 -83
  689. package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +392 -0
  690. package/es/verification-code/index.d.ts +18 -24
  691. package/es/verification-code/verification-code.js +3 -216
  692. package/es/verification-code/{verification-code.d.ts → verification-code.vue.d.ts} +12 -15
  693. package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +192 -0
  694. package/es/watermark/hooks/use-mutation-observer.js +1 -1
  695. package/es/watermark/index.d.ts +12 -8
  696. package/es/watermark/watermark.js +3 -292
  697. package/es/watermark/{watermark.d.ts → watermark.vue.d.ts} +13 -2
  698. package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +303 -0
  699. package/json/vetur-attributes.json +74 -1352
  700. package/json/vetur-tags.json +94 -473
  701. package/json/web-types.json +2615 -5690
  702. package/package.json +14 -14
  703. package/es/_components/auto-tooltip/auto-tooltip.d.ts +0 -10
  704. package/es/_components/client-only.d.ts +0 -4
  705. package/es/_components/input-label/input-label.d.ts +0 -70
  706. package/es/_components/resize-observer.d.ts +0 -6
  707. package/es/_components/select-view/select-view.d.ts +0 -171
  708. package/es/auto-complete/auto-complete.d.ts +0 -146
  709. package/es/avatar/avatar-group.d.ts +0 -58
  710. package/es/badge/badge.d.ts +0 -67
  711. package/es/breadcrumb/breadcrumb-item.d.ts +0 -35
  712. package/es/breadcrumb/breadcrumb.d.ts +0 -34
  713. package/es/card/card-meta.d.ts +0 -18
  714. package/es/card/card.d.ts +0 -464
  715. package/es/checkbox/checkbox-group.d.ts +0 -62
  716. package/es/checkbox/checkbox.d.ts +0 -146
  717. package/es/checkbox/icon-check.d.ts +0 -2
  718. package/es/collapse/collapse-item.d.ts +0 -157
  719. package/es/color-picker/palette.d.ts +0 -16
  720. package/es/date-picker/pickers/month-picker.d.ts +0 -27
  721. package/es/date-picker/pickers/year-picker.d.ts +0 -27
  722. package/es/divider/divider.d.ts +0 -43
  723. package/es/empty/empty.d.ts +0 -20
  724. package/es/image/preview-action.d.ts +0 -73
  725. package/es/input/input-search.d.ts +0 -81
  726. package/es/input-number/input-number.d.ts +0 -178
  727. package/es/list/list-item.d.ts +0 -16
  728. package/es/list/list.d.ts +0 -127
  729. package/es/mention/mention.d.ts +0 -128
  730. package/es/menu/menu.d.ts +0 -455
  731. package/es/menu/overflow-wrap.d.ts +0 -2
  732. package/es/notification/notification-list.d.ts +0 -32
  733. package/es/overflow-list/index.d.ts +0 -81
  734. package/es/overflow-list/index.js +0 -10
  735. package/es/overflow-list/overflow-list.d.ts +0 -37
  736. package/es/overflow-list/overflow-list.js +0 -140
  737. package/es/overflow-list/style/index.css +0 -30
  738. package/es/overflow-list/style/index.scss +0 -20
  739. package/es/radio/radio-group.d.ts +0 -72
  740. package/es/radio/radio.d.ts +0 -140
  741. package/es/result/403.d.ts +0 -2
  742. package/es/result/404.d.ts +0 -2
  743. package/es/result/500.d.ts +0 -2
  744. package/es/select/select.d.ts +0 -1533
  745. package/es/space/space.d.ts +0 -45
  746. package/es/spin/dot-loading.d.ts +0 -10
  747. package/es/spin/spin.d.ts +0 -37
  748. package/es/table/table-column.d.ts +0 -120
  749. package/es/table/table-operation-td.d.ts +0 -813
  750. package/es/table/table-tbody.d.ts +0 -4
  751. package/es/table/table-thead.d.ts +0 -4
  752. package/es/table/table-tr.d.ts +0 -41
  753. package/es/time-picker/range-panel.d.ts +0 -203
  754. package/es/timeline/timeline.d.ts +0 -226
  755. package/es/transfer/transfer-list-item.d.ts +0 -45
  756. package/es/tree/node-switcher.vue_vue_type_script_lang.js +0 -69
  757. package/es/tree/node.d.ts +0 -4
  758. package/es/tree-select/panel.d.ts +0 -14
  759. package/es/trigger/trigger.d.ts +0 -366
  760. package/es/typography/base.d.ts +0 -171
  761. package/es/typography/paragraph.d.ts +0 -27
  762. package/es/typography/text.d.ts +0 -18
  763. package/es/typography/title.d.ts +0 -17
  764. package/es/upload/upload-list.d.ts +0 -63
  765. package/es/upload/upload-picture-item.d.ts +0 -24
  766. /package/es/{overflow-list → number-flow}/style/css.js +0 -0
  767. /package/es/{overflow-list → number-flow}/style/index.d.ts +0 -0
  768. /package/es/{overflow-list → number-flow}/style/index.js +0 -0
package/es/table/table.js CHANGED
@@ -1,1639 +1,5 @@
1
- import { configProviderInjectionKey } from "../config-provider/context.js";
2
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
3
- import { getPrefixCls } from "../_utils/global-config.js";
4
- import { isArray, isFunction, isNull, isNumber, isObject, isString, isUndefined } from "../_utils/is.js";
5
- import resize_observer_default from "../_components/resize-observer.js";
6
- import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectWithoutProperties.js";
7
- import virtual_list_default from "../_components/virtual-list/index.js";
8
- import { omit } from "../_utils/omit.js";
9
- import { useComponentRef } from "../_hooks/use-component-ref.js";
10
- import { useScrollbar } from "../_hooks/use-scrollbar.js";
11
- import Empty from "../empty/index.js";
12
- import Scrollbar from "../scrollbar/index.js";
13
- import Spin from "../spin/index.js";
14
- import { useChildrenComponents } from "../_hooks/use-children-components.js";
15
- import { debounce } from "../_utils/debounce.js";
16
- import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
17
- import IconMinus from "../icon/icon-minus/index.js";
18
- import IconPlus from "../icon/icon-plus/index.js";
19
- import Pagination from "../pagination/index.js";
20
- import { tableInjectionKey } from "./context.js";
21
- import { useColumnResize } from "./hooks/use-column-resize.js";
22
- import { useDrag } from "./hooks/use-drag.js";
23
- import { useExpand } from "./hooks/use-expand.js";
24
- import { useFilter } from "./hooks/use-filter.js";
25
- import { usePagination } from "./hooks/use-pagination.js";
26
- import { getGroupColumns, getTableGridTemplate, mapArrayWithChildren, mapRawTableData } from "./utils.js";
27
- import { useRowSelection } from "./hooks/use-row-selection.js";
28
- import { useSorter } from "./hooks/use-sorter.js";
29
- import { useSpan } from "./hooks/use-span.js";
30
- import table_operation_td_default from "./table-operation-td.js";
31
- import table_operation_th_default from "./table-operation-th.js";
32
- import table_tbody_default from "./table-tbody.js";
33
- import table_td_default from "./table-td.js";
34
- import table_th_default from "./table-th.js";
35
- import table_thead_default from "./table-thead.js";
36
- import table_tr_default from "./table-tr.js";
37
- import { Fragment, computed, createVNode, defineComponent, inject, isVNode, mergeProps, onMounted, provide, reactive, ref, toRefs, watch, watchEffect } from "vue";
38
- //#region components/table/table.tsx
39
- var _excluded = [
40
- "items",
41
- "data",
42
- "keyField",
43
- "itemKey",
44
- "listTag",
45
- "itemTag",
46
- "listClass",
47
- "itemClass",
48
- "listAttrs",
49
- "listStyle",
50
- "contentWrapperAttrs",
51
- "contentAttrs",
52
- "component",
53
- "paddingPosition",
54
- "isStaticItemHeight",
55
- "fixedSize"
56
- ];
57
- var _excluded2 = ["outerStyle"];
58
- var _excluded3 = ["outerStyle"];
59
- function _isSlot(s) {
60
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
61
- }
62
- var getRecordKey = (record, rowKey) => isFunction(rowKey) ? rowKey(record) : record[rowKey];
63
- var DEFAULT_BORDERED = {
64
- wrapper: true,
65
- cell: false,
66
- headerCell: false,
67
- bodyCell: false
68
- };
69
- var table_default = /* @__PURE__ */ defineComponent({
70
- name: "Table",
71
- props: {
72
- /**
73
- * @zh 表格的列描述信息
74
- * @en Column info of the table
75
- */
76
- columns: {
77
- type: Array,
78
- default: () => []
79
- },
80
- /**
81
- * @zh 表格的数据
82
- * @en Table data
83
- */
84
- data: {
85
- type: Array,
86
- default: () => []
87
- },
88
- /**
89
- * @zh 是否显示边框
90
- * @en Whether to show the border
91
- */
92
- bordered: {
93
- type: [Boolean, Object],
94
- default: true
95
- },
96
- /**
97
- * @zh 是否显示选中效果
98
- * @en Whether to show the hover effect
99
- */
100
- hoverable: {
101
- type: Boolean,
102
- default: true
103
- },
104
- /**
105
- * @zh 是否开启斑马纹效果
106
- * @en Whether to enable the stripe effect
107
- */
108
- stripe: {
109
- type: Boolean,
110
- default: false
111
- },
112
- /**
113
- * @zh 表格的大小
114
- * @en The size of the table
115
- * @values 'mini','small','medium','large'
116
- * @defaultValue 'large'
117
- */
118
- size: {
119
- type: String,
120
- default: () => {
121
- var _inject$size, _inject;
122
- return (_inject$size = (_inject = inject(configProviderInjectionKey, void 0)) === null || _inject === void 0 ? void 0 : _inject.size) !== null && _inject$size !== void 0 ? _inject$size : "large";
123
- }
124
- },
125
- /**
126
- * @zh 表格的 table-layout 属性设置为 fixed,设置为 fixed 后,表格的宽度不会被内容撑开超出 100%。
127
- * @en The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.
128
- */
129
- tableLayoutFixed: {
130
- type: Boolean,
131
- default: false
132
- },
133
- /**
134
- * @zh 是否为加载中状态
135
- * @en Whether it is loading state
136
- */
137
- loading: {
138
- type: [Boolean, Object],
139
- default: false
140
- },
141
- /**
142
- * @zh 传递给加载中 Spin 的属性
143
- * @en Props passed to the loading Spin
144
- */
145
- spinProps: { type: Object },
146
- /**
147
- * @zh 表格的行选择器配置
148
- * @en Table row selector configuration
149
- */
150
- rowSelection: { type: Object },
151
- /**
152
- * @zh 表格的展开行配置
153
- * @en Expand row configuration of the table
154
- */
155
- expandable: { type: Object },
156
- /**
157
- * @zh 表格的滚动属性配置。`2.13.0` 版本增加字符型值的支持。`2.20.0` 版本增加 `minWidth`,`maxHeight` 的支持。
158
- * @en Scrolling attribute configuration of the table. The `2.13.0` version adds support for character values. `2.20.0` version adds support for `minWidth`, `maxHeight`.
159
- */
160
- scroll: { type: Object },
161
- /**
162
- * @zh 分页的属性配置
163
- * @en Pagination properties configuration
164
- */
165
- pagination: {
166
- type: [Boolean, Object],
167
- default: true
168
- },
169
- /**
170
- * @zh 分页选择器的位置
171
- * @en The position of the page selector
172
- * @values 'tl','top',tr','bl','bottom','br'
173
- */
174
- pagePosition: {
175
- type: String,
176
- default: "br"
177
- },
178
- /**
179
- * @zh 树形表格的缩进距离
180
- * @en The indentation distance of the tree table
181
- */
182
- indentSize: {
183
- type: Number,
184
- default: 16
185
- },
186
- /**
187
- * @zh 表格行 `key` 的取值字段
188
- * @en Value field of table row `key`
189
- */
190
- rowKey: {
191
- type: [String, Function],
192
- default: "key"
193
- },
194
- /**
195
- * @zh 是否显示表头
196
- * @en Whether to show the header
197
- */
198
- showHeader: {
199
- type: Boolean,
200
- default: true
201
- },
202
- /**
203
- * @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动 [VirtualListProps](#VirtualListProps)
204
- * @en Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)
205
- * @type VirtualListProps
206
- */
207
- virtualListProps: { type: Object },
208
- /**
209
- * @zh 单元格合并方法(索引从数据项开始计数)
210
- * @en Cell merge method (The index starts counting from the data item)
211
- * @version 2.10.0
212
- */
213
- spanMethod: { type: Function },
214
- /**
215
- * @zh 是否让合并方法的索引包含所有
216
- * @en Whether to make the index of the span method contain all
217
- * @version 2.18.0
218
- */
219
- spanAll: {
220
- type: Boolean,
221
- default: false
222
- },
223
- components: { type: Object },
224
- /**
225
- * @zh 数据懒加载函数,传入时开启懒加载功能
226
- * @en Data lazy loading function, open the lazy loading function when it is passed in
227
- * @version 2.13.0
228
- */
229
- loadMore: { type: Function },
230
- /**
231
- * @zh 筛选图标是否左对齐
232
- * @en Whether the filter icon is aligned to the left
233
- * @version 2.13.0
234
- */
235
- filterIconAlignLeft: {
236
- type: Boolean,
237
- default: false
238
- },
239
- /**
240
- * @zh 是否在子树为空时隐藏展开按钮
241
- * @en Whether to hide expand button when subtree is empty
242
- * @version 2.14.0
243
- */
244
- hideExpandButtonOnEmpty: {
245
- type: Boolean,
246
- default: false
247
- },
248
- /**
249
- * @zh 表格行元素的类名。`2.34.0` 版本增加函数值支持
250
- * @en The class name of the table row element. The `2.34.0` version adds support for function values.
251
- * @version 2.16.0
252
- */
253
- rowClass: { type: [
254
- String,
255
- Array,
256
- Object,
257
- Function
258
- ] },
259
- /**
260
- * @zh 表格拖拽排序的配置
261
- * @en Table drag and drop sorting configuration
262
- * @version 2.16.0
263
- */
264
- draggable: { type: Object },
265
- rowNumber: { type: [Boolean, Object] },
266
- /**
267
- * @zh 是否允许调整列宽
268
- * @en Whether to allow the column width to be adjusted
269
- * @version 2.16.0
270
- */
271
- columnResizable: { type: Boolean },
272
- /**
273
- * @zh 显示表尾总结行
274
- * @en Show footer summary row
275
- * @version 2.21.0
276
- */
277
- summary: { type: [Boolean, Function] },
278
- /**
279
- * @zh 总结行的首列文字
280
- * @en The first column of text in the summary line
281
- * @version 2.21.0
282
- */
283
- summaryText: {
284
- type: String,
285
- default: "Summary"
286
- },
287
- /**
288
- * @zh 总结行的单元格合并方法
289
- * @en Cell Merge Method for Summarizing Rows
290
- * @version 2.21.0
291
- */
292
- summarySpanMethod: { type: Function },
293
- /**
294
- * @zh 已选择的行(受控模式)优先于 `rowSelection`
295
- * @en Selected row (controlled mode) takes precedence over `rowSelection`
296
- * @version 2.25.0
297
- */
298
- selectedKeys: { type: Array },
299
- /**
300
- * @zh 默认已选择的行(非受控模式)优先于 `rowSelection`
301
- * @en The selected row by default (uncontrolled mode) takes precedence over `rowSelection`
302
- * @version 2.25.0
303
- */
304
- defaultSelectedKeys: { type: Array },
305
- /**
306
- * @zh 显示的展开行、子树(受控模式)优先于 `expandable`
307
- * @en Displayed Expanded Row, Subtree (Controlled Mode) takes precedence over `expandable`
308
- * @version 2.25.0
309
- */
310
- expandedKeys: { type: Array },
311
- /**
312
- * @zh 默认显示的展开行、子树(非受控模式)优先于 `expandable`
313
- * @en Expand row, Subtree displayed by default (Uncontrolled mode) takes precedence over `expandable`
314
- * @version 2.25.0
315
- */
316
- defaultExpandedKeys: { type: Array },
317
- /**
318
- * @zh 是否默认展开所有的行
319
- * @en Whether to expand all rows by default
320
- * @version 2.25.0
321
- */
322
- defaultExpandAllRows: {
323
- type: Boolean,
324
- default: false
325
- },
326
- /**
327
- * @zh 是否开启表头吸顶
328
- * @en Whether to open the sticky header
329
- * @version 2.30.0
330
- */
331
- stickyHeader: {
332
- type: [Boolean, Number],
333
- default: false
334
- },
335
- /**
336
- * @zh 是否开启虚拟滚动条
337
- * @en Whether to enable virtual scroll bar
338
- * @version 2.38.0
339
- */
340
- scrollbar: {
341
- type: [Object, Boolean],
342
- default: true
343
- },
344
- /**
345
- * @zh 是否展示空子树
346
- * @en Whether to display empty subtrees
347
- * @version 2.51.0
348
- */
349
- showEmptyTree: {
350
- type: Boolean,
351
- default: false
352
- }
353
- },
354
- emits: {
355
- "update:selectedKeys": (_rowKeys) => true,
356
- "update:expandedKeys": (_rowKeys) => true,
357
- /**
358
- * @zh 点击展开行时触发
359
- * @en Triggered when a row is clicked to expand
360
- * @param {string | number} rowKey
361
- * @param {TableData} record
362
- */
363
- "expand": (_rowKey, _record) => true,
364
- /**
365
- * @zh 已展开的数据行发生改变时触发
366
- * @en Triggered when the expanded data row changes
367
- * @param {(string | number)[]} rowKeys
368
- */
369
- "expandedChange": (_rowKeys) => true,
370
- /**
371
- * @zh 点击行选择器时触发
372
- * @en Triggered when the row selector is clicked
373
- * @param {string | number[]} rowKeys
374
- * @param {string | number} rowKey
375
- * @param {TableData} record
376
- */
377
- "select": (_rowKeys, _rowKey, _record) => true,
378
- /**
379
- * @zh 点击全选选择器时触发
380
- * @en Triggered when the select all selector is clicked
381
- * @param {boolean} checked
382
- */
383
- "selectAll": (_checked) => true,
384
- /**
385
- * @zh 已选择的数据行发生改变时触发
386
- * @en Triggered when the selected data row changes
387
- * @param {(string | number)[]} rowKeys
388
- */
389
- "selectionChange": (_rowKeys) => true,
390
- /**
391
- * @zh 排序规则发生改变时触发
392
- * @en Triggered when the collation changes
393
- * @param {string} dataIndex
394
- * @param {string} direction
395
- */
396
- "sorterChange": (_dataIndex, _direction) => true,
397
- /**
398
- * @zh 过滤选项发生改变时触发
399
- * @en Triggered when the filter options are changed
400
- * @param {string} dataIndex
401
- * @param {string[]} filteredValues
402
- */
403
- "filterChange": (_dataIndex, _filteredValues) => true,
404
- /**
405
- * @zh 表格分页发生改变时触发
406
- * @en Triggered when the table pagination changes
407
- * @param {number} page
408
- */
409
- "pageChange": (_page) => true,
410
- /**
411
- * @zh 表格每页数据数量发生改变时触发
412
- * @en Triggered when the number of data per page of the table changes
413
- * @param {number} pageSize
414
- */
415
- "pageSizeChange": (_pageSize) => true,
416
- /**
417
- * @zh 表格数据发生变化时触发
418
- * @en Triggered when table data changes
419
- * @param {TableData[]} data
420
- * @param {TableChangeExtra} extra
421
- * @param {TableData[]} currentData
422
- * @version 2.40.0 增加 currentData
423
- */
424
- "change": (_data, _extra, _currentData) => true,
425
- /**
426
- * @zh 单元格 hover 进入时触发
427
- * @en Triggered when hovering into a cell
428
- * @param {TableData} record
429
- * @param {TableColumnData} column
430
- * @param {Event} ev
431
- */
432
- "cellMouseEnter": (_record, _column, _ev) => true,
433
- /**
434
- * @zh 单元格 hover 退出时触发
435
- * @en Triggered when hovering out of a cell
436
- * @param {TableData} record
437
- * @param {TableColumnData} column
438
- * @param {Event} ev
439
- */
440
- "cellMouseLeave": (_record, _column, _ev) => true,
441
- /**
442
- * @zh 点击单元格时触发
443
- * @en Triggered when a cell is clicked
444
- * @param {TableData} record
445
- * @param {TableColumnData} column
446
- * @param {Event} ev
447
- */
448
- "cellClick": (_record, _column, _ev) => true,
449
- /**
450
- * @zh 点击行数据时触发
451
- * @en Triggered when row data is clicked
452
- * @param {TableData} record
453
- * @param {Event} ev
454
- */
455
- "rowClick": (_record, _ev) => true,
456
- /**
457
- * @zh 点击表头数据时触发
458
- * @en Triggered when the header data is clicked
459
- * @param {TableColumnData} column
460
- * @param {Event} ev
461
- */
462
- "headerClick": (_column, _ev) => true,
463
- /**
464
- * @zh 调整列宽时触发
465
- * @en Triggered when column width is adjusted
466
- * @param {string} dataIndex
467
- * @param {number} width
468
- * @version 2.28.0
469
- */
470
- "columnResize": (_dataIndex, _width) => true,
471
- /**
472
- * @zh 双击行数据时触发
473
- * @en Triggered when row data is double clicked
474
- * @param {TableData} record
475
- * @param {Event} ev
476
- */
477
- "rowDblclick": (_record, _ev) => true,
478
- /**
479
- * @zh 双击单元格时触发
480
- * @en Triggered when a cell is double clicked
481
- * @param {TableData} record
482
- * @param {TableColumnData} column
483
- * @param {Event} ev
484
- */
485
- "cellDblclick": (_record, _column, _ev) => true,
486
- /**
487
- * @zh 右击行数据时触发
488
- * @en Triggered when row data is right clicked
489
- * @param {TableData} record
490
- * @param {Event} ev
491
- */
492
- "rowContextmenu": (_record, _ev) => true,
493
- /**
494
- * @zh 右击单元格时触发
495
- * @en Triggered when a cell is right clicked
496
- * @param {TableData} record
497
- * @param {TableColumnData} column
498
- * @param {Event} ev
499
- */
500
- "cellContextmenu": (_record, _column, _ev) => true
501
- },
502
- /**
503
- * @zh 表格列定义。启用时会屏蔽 columns 属性
504
- * @en Table column definitions. When enabled, the columns attribute is masked
505
- * @slot columns
506
- */
507
- /**
508
- * @zh 展开行图标
509
- * @en Expand row icon
510
- * @slot expand-icon
511
- * @binding {boolean} expanded
512
- * @binding {TableData} record
513
- */
514
- /**
515
- * @zh 展开行内容
516
- * @en Expand row content
517
- * @slot expand-row
518
- * @binding {TableData} record
519
- */
520
- /**
521
- * @zh 表格底部
522
- * @en Table Footer
523
- * @slot footer
524
- */
525
- /**
526
- * @zh 拖拽锚点图标
527
- * @en Drag handle icon
528
- * @slot drag-handle-icon
529
- * @version 2.16.0
530
- */
531
- /**
532
- * @zh 自定义 tbody 元素
533
- * @en Custom tbody element
534
- * @slot tbody
535
- * @version 2.16.0
536
- */
537
- /**
538
- * @zh 自定义 tr 元素
539
- * @en Custom tr element
540
- * @slot tr
541
- * @binding {TableData} record
542
- * @binding {number} rowIndex
543
- * @version 2.16.0
544
- */
545
- /**
546
- * @zh 自定义 td 元素
547
- * @en Custom td element
548
- * @slot td
549
- * @binding {TableColumnData} column
550
- * @binding {TableData} record
551
- * @binding {number} rowIndex
552
- * @version 2.16.0
553
- */
554
- /**
555
- * @zh 分页器左侧内容
556
- * @en Content on the left side of the pagination
557
- * @slot pagination-left
558
- * @version 2.18.0
559
- */
560
- /**
561
- * @zh 分页器右侧内容
562
- * @en Content on the right side of the pagination
563
- * @slot pagination-right
564
- * @version 2.18.0
565
- */
566
- /**
567
- * @zh 总结行
568
- * @en Content on the right side of the pagination
569
- * @slot summary-cell
570
- * @binding {TableColumnData} column
571
- * @binding {TableData} record
572
- * @binding {number} rowIndex
573
- * @version 2.23.0
574
- */
575
- /**
576
- * @zh 空白展示
577
- * @en Empty
578
- * @slot empty
579
- */
580
- /**
581
- * @zh 自定义 thead 元素
582
- * @en Custom thead element
583
- * @slot thead
584
- * @version 2.26.0
585
- */
586
- /**
587
- * @zh 自定义 th 元素
588
- * @en Custom th element
589
- * @slot th
590
- * @binding {TableColumnData} column
591
- * @version 2.26.0
592
- */
593
- setup(props, { emit, slots }) {
594
- const { columns, rowKey, rowSelection, expandable, loadMore, filterIconAlignLeft, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAllRows, spanMethod, draggable, summarySpanMethod, scrollbar, showEmptyTree } = toRefs(props);
595
- const prefixCls = getPrefixCls("table");
596
- const virtualListPrefixCls = getPrefixCls("virtual-list");
597
- const configCtx = inject(configProviderInjectionKey, void 0);
598
- const bordered = computed(() => {
599
- if (isObject(props.bordered)) return _objectSpread2(_objectSpread2({}, DEFAULT_BORDERED), props.bordered);
600
- return _objectSpread2(_objectSpread2({}, DEFAULT_BORDERED), {}, { wrapper: props.bordered });
601
- });
602
- const { children, components } = useChildrenComponents("TableColumn");
603
- const checkStrictly = computed(() => {
604
- var _rowSelection$value$c, _rowSelection$value;
605
- return (_rowSelection$value$c = (_rowSelection$value = rowSelection.value) === null || _rowSelection$value === void 0 ? void 0 : _rowSelection$value.checkStrictly) !== null && _rowSelection$value$c !== void 0 ? _rowSelection$value$c : true;
606
- });
607
- const { scrollbarProps } = useScrollbar(scrollbar);
608
- const displayScrollbar = computed(() => scrollbar.value !== false);
609
- const isScroll = computed(() => {
610
- var _props$scroll, _props$scroll2, _props$scroll3, _props$scroll4;
611
- return {
612
- x: Boolean(((_props$scroll = props.scroll) === null || _props$scroll === void 0 ? void 0 : _props$scroll.x) || ((_props$scroll2 = props.scroll) === null || _props$scroll2 === void 0 ? void 0 : _props$scroll2.minWidth)),
613
- y: Boolean(((_props$scroll3 = props.scroll) === null || _props$scroll3 === void 0 ? void 0 : _props$scroll3.y) || ((_props$scroll4 = props.scroll) === null || _props$scroll4 === void 0 ? void 0 : _props$scroll4.maxHeight))
614
- };
615
- });
616
- const summaryRef = ref();
617
- const thRefs = ref({});
618
- const virtualListRef = ref(null);
619
- const { componentRef: contentComRef, elementRef: contentRef } = useComponentRef("containerRef");
620
- const { componentRef: tbodyComRef, elementRef: tbodyRef } = useComponentRef("containerRef");
621
- const { elementRef: virtualRef } = useComponentRef("viewportRef");
622
- const { componentRef: theadComRef, elementRef: theadRef } = useComponentRef("containerRef");
623
- const containerElement = computed(() => {
624
- if (splitTable.value) {
625
- if (isVirtualList.value) return virtualRef.value;
626
- return tbodyRef.value;
627
- }
628
- return contentRef.value;
629
- });
630
- const splitTable = computed(() => isScroll.value.y || props.stickyHeader !== false || isVirtualList.value || isScroll.value.x && flattenData.value.length === 0);
631
- const slotColumnMap = reactive(/* @__PURE__ */ new Map());
632
- const slotColumns = ref();
633
- watch([components, slotColumnMap], ([components, slotColumnMap]) => {
634
- if (components.length > 0) {
635
- const columns = [];
636
- components.forEach((id) => {
637
- const column = slotColumnMap.get(id);
638
- if (column) columns.push(column);
639
- });
640
- slotColumns.value = columns;
641
- } else slotColumns.value = void 0;
642
- });
643
- const dataColumnMap = /* @__PURE__ */ new Map();
644
- const dataColumns = ref([]);
645
- const groupColumns = ref([]);
646
- const { resizingColumn, columnWidth, handleThMouseDown } = useColumnResize(thRefs, emit);
647
- watch([
648
- columns,
649
- slotColumns,
650
- columnWidth
651
- ], ([columns, slotColumns]) => {
652
- var _ref;
653
- const result = getGroupColumns((_ref = slotColumns !== null && slotColumns !== void 0 ? slotColumns : columns) !== null && _ref !== void 0 ? _ref : [], dataColumnMap, columnWidth);
654
- dataColumns.value = result.dataColumns;
655
- groupColumns.value = result.groupColumns;
656
- }, {
657
- immediate: true,
658
- deep: true
659
- });
660
- const isPaginationTop = computed(() => [
661
- "tl",
662
- "top",
663
- "tr"
664
- ].includes(props.pagePosition));
665
- const hasLeftFixedColumn = ref(false);
666
- const hasRightFixedColumn = ref(false);
667
- const hasLeftFixedDataColumns = ref(false);
668
- watchEffect(() => {
669
- var _props$rowSelection, _props$expandable, _props$draggable;
670
- let _hasLeftFixedColumn = false;
671
- let _hasRightFixedColumn = false;
672
- let _hasLeftFixedDataColumns = false;
673
- if (((_props$rowSelection = props.rowSelection) === null || _props$rowSelection === void 0 ? void 0 : _props$rowSelection.fixed) || ((_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.fixed) || ((_props$draggable = props.draggable) === null || _props$draggable === void 0 ? void 0 : _props$draggable.fixed)) _hasLeftFixedColumn = true;
674
- for (const column of dataColumns.value) if (column.fixed === "left") {
675
- _hasLeftFixedColumn = true;
676
- _hasLeftFixedDataColumns = true;
677
- } else if (column.fixed === "right") _hasRightFixedColumn = true;
678
- if (_hasLeftFixedColumn !== hasLeftFixedColumn.value) hasLeftFixedColumn.value = _hasLeftFixedColumn;
679
- if (_hasRightFixedColumn !== hasRightFixedColumn.value) hasRightFixedColumn.value = _hasRightFixedColumn;
680
- if (_hasLeftFixedDataColumns !== hasLeftFixedDataColumns.value) hasLeftFixedDataColumns.value = _hasLeftFixedDataColumns;
681
- });
682
- const hasEllipsis = computed(() => {
683
- for (const col of dataColumns.value) if (col.ellipsis) return true;
684
- return false;
685
- });
686
- const handleChange = (type) => {
687
- const extra = {
688
- type,
689
- page: page.value,
690
- pageSize: pageSize.value,
691
- sorter: computedSorter.value,
692
- filters: computedFilters.value,
693
- dragTarget: type === "drag" ? dragState.data : void 0
694
- };
695
- emit("change", flattenRawData.value, extra, sortedData.value);
696
- };
697
- const handleFilterChange = (dataIndex, filteredValues) => {
698
- _filters.value = _objectSpread2(_objectSpread2({}, computedFilters.value), {}, { [dataIndex]: filteredValues });
699
- emit("filterChange", dataIndex, filteredValues);
700
- handleChange("filter");
701
- };
702
- const handleSorterChange = (dataIndex, direction) => {
703
- _sorter.value = direction ? {
704
- field: dataIndex,
705
- direction
706
- } : void 0;
707
- emit("sorterChange", dataIndex, direction);
708
- handleChange("sorter");
709
- };
710
- const { _filters, computedFilters, resetFilters, clearFilters } = useFilter({
711
- columns: dataColumns,
712
- onFilterChange: handleFilterChange
713
- });
714
- const { _sorter, computedSorter, resetSorters, clearSorters } = useSorter({
715
- columns: dataColumns,
716
- onSorterChange: handleSorterChange
717
- });
718
- const disabledKeys = /* @__PURE__ */ new Set();
719
- const allRowKeys = computed(() => {
720
- const allRowKeys = [];
721
- disabledKeys.clear();
722
- const travelData = (data) => {
723
- if (isArray(data) && data.length > 0) for (const record of data) {
724
- allRowKeys.push(getRecordKey(record, rowKey.value));
725
- if (record.disabled) disabledKeys.add(getRecordKey(record, rowKey.value));
726
- if (record.children) travelData(record.children);
727
- }
728
- };
729
- travelData(props.data);
730
- return allRowKeys;
731
- });
732
- const currentAllRowKeys = computed(() => {
733
- const keys = [];
734
- const travel = (data) => {
735
- for (const record of data) {
736
- keys.push(record.key);
737
- if (record.children) travel(record.children);
738
- }
739
- };
740
- travel(flattenData.value);
741
- return keys;
742
- });
743
- const currentAllEnabledRowKeys = computed(() => {
744
- const keys = [];
745
- const travel = (data) => {
746
- for (const record of data) {
747
- if (!record.disabled) keys.push(record.key);
748
- if (record.children) travel(record.children);
749
- }
750
- };
751
- travel(flattenData.value);
752
- return keys;
753
- });
754
- const { selectedRowKeys, currentSelectedRowKeys, handleSelect, handleSelectAllLeafs, handleSelectAll, select, selectAll, clearSelected } = useRowSelection({
755
- selectedKeys,
756
- defaultSelectedKeys,
757
- rowSelection,
758
- currentAllRowKeys,
759
- currentAllEnabledRowKeys,
760
- emit
761
- });
762
- const { expandedRowKeys, handleExpand, expand, expandAll } = useExpand({
763
- expandedKeys,
764
- defaultExpandedKeys,
765
- defaultExpandAllRows,
766
- expandable,
767
- allRowKeys,
768
- emit
769
- });
770
- const lazyLoadData = reactive({});
771
- const addLazyLoadData = (children, record) => {
772
- if (children) lazyLoadData[record.key] = children;
773
- };
774
- const isValidRecord = (record) => {
775
- for (const field of Object.keys(computedFilters.value)) {
776
- var _column$filterable;
777
- const filteredValues = computedFilters.value[field];
778
- const column = dataColumnMap.get(field);
779
- if (column && ((_column$filterable = column.filterable) === null || _column$filterable === void 0 ? void 0 : _column$filterable.filter) && filteredValues.length > 0) {
780
- var _column$filterable2;
781
- const result = (_column$filterable2 = column.filterable) === null || _column$filterable2 === void 0 ? void 0 : _column$filterable2.filter(filteredValues, record.raw);
782
- if (!result) return result;
783
- }
784
- }
785
- return true;
786
- };
787
- const { dragType, dragState, handleDragStart, handleDragEnter, handleDragover, handleDragEnd, handleDrop } = useDrag(draggable);
788
- const processedData = computed(() => {
789
- var _props$data;
790
- const travel = (data) => {
791
- const result = [];
792
- for (const _record of data) {
793
- const record = {
794
- raw: _record,
795
- key: getRecordKey(_record, props.rowKey),
796
- disabled: _record.disabled,
797
- expand: _record.expand,
798
- isLeaf: _record.isLeaf
799
- };
800
- if (_record.children) {
801
- record.isLeaf = false;
802
- record.children = travel(_record.children);
803
- } else if (props.loadMore && !_record.isLeaf) {
804
- record.isLeaf = false;
805
- if (lazyLoadData[record.key]) record.children = travel(lazyLoadData[record.key]);
806
- } else record.isLeaf = true;
807
- record.hasSubtree = Boolean(record.children ? props.hideExpandButtonOnEmpty ? record.children.length > 0 : true : props.loadMore && !record.isLeaf);
808
- result.push(record);
809
- }
810
- return result;
811
- };
812
- return travel((_props$data = props.data) !== null && _props$data !== void 0 ? _props$data : []);
813
- });
814
- const validData = computed(() => {
815
- const travel = (data) => data.filter((record) => {
816
- if (isValidRecord(record)) {
817
- if (record.children) record.children = travel(record.children);
818
- return true;
819
- }
820
- return false;
821
- });
822
- return Object.keys(computedFilters.value).length > 0 ? travel(processedData.value) : processedData.value;
823
- });
824
- const sortedData = computed(() => {
825
- const data = mapArrayWithChildren(validData.value);
826
- if (data.length > 0) {
827
- var _computedSorter$value;
828
- if ((_computedSorter$value = computedSorter.value) === null || _computedSorter$value === void 0 ? void 0 : _computedSorter$value.field) {
829
- var _column$sortable;
830
- const column = dataColumnMap.get(computedSorter.value.field);
831
- if (column && ((_column$sortable = column.sortable) === null || _column$sortable === void 0 ? void 0 : _column$sortable.sorter) !== true) {
832
- const { field, direction } = computedSorter.value;
833
- data.sort((a, b) => {
834
- var _column$sortable2;
835
- const valueA = getValueByPath(a.raw, field);
836
- const valueB = getValueByPath(b.raw, field);
837
- if (((_column$sortable2 = column.sortable) === null || _column$sortable2 === void 0 ? void 0 : _column$sortable2.sorter) && isFunction(column.sortable.sorter)) return column.sortable.sorter(a.raw, b.raw, {
838
- dataIndex: field,
839
- direction
840
- });
841
- if (valueA === void 0 || valueB === void 0) return 0;
842
- const result = valueA > valueB ? 1 : -1;
843
- return direction === "descend" ? -result : result;
844
- });
845
- }
846
- }
847
- const { sourcePath, targetPath } = dragState;
848
- if (dragState.dragging && targetPath.length && targetPath.toString() !== sourcePath.toString()) {
849
- if (sourcePath.length === targetPath.length && sourcePath.slice(0, -1).toString() === targetPath.slice(0, -1).toString()) {
850
- let children = data;
851
- for (let i = 0; i < sourcePath.length; i++) {
852
- const sourceIndex = sourcePath[i];
853
- if (i >= sourcePath.length - 1) {
854
- const sourceChild = children[sourceIndex];
855
- const targetIndex = targetPath[i];
856
- if (targetIndex > sourceIndex) {
857
- children.splice(targetIndex + 1, 0, sourceChild);
858
- children.splice(sourceIndex, 1);
859
- } else {
860
- children.splice(targetIndex, 0, sourceChild);
861
- children.splice(sourceIndex + 1, 1);
862
- }
863
- } else {
864
- var _children$sourceIndex;
865
- children = (_children$sourceIndex = children[sourceIndex].children) !== null && _children$sourceIndex !== void 0 ? _children$sourceIndex : [];
866
- }
867
- }
868
- }
869
- }
870
- }
871
- return data;
872
- });
873
- const { page, pageSize, handlePageChange, handlePageSizeChange } = usePagination(props, emit);
874
- const onlyCurrent = computed(() => {
875
- var _rowSelection$value$o, _rowSelection$value2;
876
- return (_rowSelection$value$o = (_rowSelection$value2 = rowSelection.value) === null || _rowSelection$value2 === void 0 ? void 0 : _rowSelection$value2.onlyCurrent) !== null && _rowSelection$value$o !== void 0 ? _rowSelection$value$o : false;
877
- });
878
- watch(page, (cur, pre) => {
879
- if (cur !== pre && onlyCurrent.value) clearSelected();
880
- });
881
- const flattenData = computed(() => {
882
- if (props.pagination && sortedData.value.length > pageSize.value) return sortedData.value.slice((page.value - 1) * pageSize.value, page.value * pageSize.value);
883
- return sortedData.value;
884
- });
885
- const flattenRawData = computed(() => mapRawTableData(flattenData.value));
886
- const getSummaryData = () => {
887
- return dataColumns.value.reduce((per, column, index) => {
888
- if (column.dataIndex) if (index === 0) setValueByPath(per, column.dataIndex, props.summaryText, { addPath: true });
889
- else {
890
- let count = 0;
891
- let isNotNumber = false;
892
- flattenData.value.forEach((data) => {
893
- if (column.dataIndex) {
894
- const _number = getValueByPath(data.raw, column.dataIndex);
895
- if (isNumber(_number)) count += _number;
896
- else if (!isUndefined(_number) && !isNull(_number)) isNotNumber = true;
897
- }
898
- });
899
- setValueByPath(per, column.dataIndex, isNotNumber ? "" : count, { addPath: true });
900
- }
901
- return per;
902
- }, {});
903
- };
904
- const getTableDataWithRaw = (data) => {
905
- if (data && data.length > 0) return data.map((raw) => {
906
- return {
907
- raw,
908
- key: getRecordKey(raw, props.rowKey)
909
- };
910
- });
911
- return [];
912
- };
913
- const summaryData = computed(() => {
914
- if (props.summary) {
915
- if (isFunction(props.summary)) return getTableDataWithRaw(props.summary({
916
- columns: dataColumns.value,
917
- data: flattenRawData.value
918
- }));
919
- return getTableDataWithRaw([getSummaryData()]);
920
- }
921
- return [];
922
- });
923
- const containerScrollLeft = ref(0);
924
- const alignLeft = ref(true);
925
- const alignRight = ref(true);
926
- const setAlignPosition = () => {
927
- let _alignLeft = true;
928
- let _alignRight = true;
929
- const scrollContainer = containerElement.value;
930
- if (scrollContainer) {
931
- _alignLeft = containerScrollLeft.value === 0;
932
- _alignRight = Math.ceil(containerScrollLeft.value + scrollContainer.offsetWidth) >= scrollContainer.scrollWidth;
933
- }
934
- if (_alignLeft !== alignLeft.value) alignLeft.value = _alignLeft;
935
- if (_alignRight !== alignRight.value) alignRight.value = _alignRight;
936
- };
937
- const getTableScrollCls = () => {
938
- if (alignLeft.value && alignRight.value) return `${prefixCls}-scroll-position-both`;
939
- if (alignLeft.value) return `${prefixCls}-scroll-position-left`;
940
- if (alignRight.value) return `${prefixCls}-scroll-position-right`;
941
- return `${prefixCls}-scroll-position-middle`;
942
- };
943
- const getTableFixedCls = () => {
944
- const cls = [];
945
- if (hasLeftFixedColumn.value) cls.push(`${prefixCls}-has-fixed-col-left`);
946
- if (hasRightFixedColumn.value) cls.push(`${prefixCls}-has-fixed-col-right`);
947
- return cls;
948
- };
949
- const handleScroll = (e) => {
950
- if (e.target.scrollLeft !== containerScrollLeft.value) containerScrollLeft.value = e.target.scrollLeft;
951
- setAlignPosition();
952
- };
953
- const onTbodyScroll = (e) => {
954
- handleScroll(e);
955
- const { scrollLeft } = e.target;
956
- if (theadRef.value) theadRef.value.scrollLeft = scrollLeft;
957
- if (summaryRef.value) summaryRef.value.scrollLeft = scrollLeft;
958
- };
959
- const handleRowClick = (record, ev) => {
960
- emit("rowClick", record.raw, ev);
961
- };
962
- const handleRowDblclick = (record, ev) => {
963
- emit("rowDblclick", record.raw, ev);
964
- };
965
- const handleRowContextMenu = (record, ev) => {
966
- emit("rowContextmenu", record.raw, ev);
967
- };
968
- const handleCellClick = (record, column, ev) => {
969
- emit("cellClick", record.raw, column, ev);
970
- };
971
- const handleCellMouseEnter = debounce((record, column, ev) => {
972
- emit("cellMouseEnter", record.raw, column, ev);
973
- }, 30);
974
- const handleCellMouseLeave = debounce((record, column, ev) => {
975
- emit("cellMouseLeave", record.raw, column, ev);
976
- }, 30);
977
- const handleCellDblclick = (record, column, ev) => {
978
- emit("cellDblclick", record.raw, column, ev);
979
- };
980
- const handleCellContextmenu = (record, column, ev) => {
981
- emit("cellContextmenu", record.raw, column, ev);
982
- };
983
- const handleHeaderClick = (column, ev) => {
984
- emit("headerClick", column, ev);
985
- };
986
- const operations = computed(() => {
987
- var _props$draggable2, _props$components;
988
- const operations = [];
989
- const hasFixedColumn = hasLeftFixedColumn.value || hasRightFixedColumn.value;
990
- let dragHandle;
991
- let expand;
992
- let selection;
993
- if (((_props$draggable2 = props.draggable) === null || _props$draggable2 === void 0 ? void 0 : _props$draggable2.type) === "handle") {
994
- dragHandle = {
995
- name: "drag-handle",
996
- title: props.draggable.title,
997
- width: props.draggable.width,
998
- fixed: props.draggable.fixed || hasFixedColumn
999
- };
1000
- operations.push(dragHandle);
1001
- }
1002
- if (props.expandable) {
1003
- expand = {
1004
- name: "expand",
1005
- title: props.expandable.title,
1006
- width: props.expandable.width,
1007
- fixed: props.expandable.fixed || hasFixedColumn
1008
- };
1009
- operations.push(expand);
1010
- }
1011
- if (props.rowSelection) {
1012
- selection = {
1013
- name: props.rowSelection.type === "radio" ? "selection-radio" : "selection-checkbox",
1014
- title: props.rowSelection.title,
1015
- width: props.rowSelection.width,
1016
- fixed: props.rowSelection.fixed || hasFixedColumn
1017
- };
1018
- operations.push(selection);
1019
- }
1020
- if (!hasLeftFixedDataColumns.value && operations.length > 0 && operations[operations.length - 1].fixed) operations[operations.length - 1].isLastLeftFixed = true;
1021
- const operationsFn = (_props$components = props.components) === null || _props$components === void 0 ? void 0 : _props$components.operations;
1022
- return isFunction(operationsFn) ? operationsFn({
1023
- dragHandle,
1024
- expand,
1025
- selection
1026
- }) : operations;
1027
- });
1028
- const tableGridTemplate = computed(() => getTableGridTemplate(dataColumns.value, operations.value, columnWidth));
1029
- const getTableElementStyle = (base) => _objectSpread2(_objectSpread2({}, base), {}, { "--sd-table-grid-template": tableGridTemplate.value });
1030
- const headerStyle = computed(() => {
1031
- if (isScroll.value.x) {
1032
- var _props$scroll5, _props$scroll6, _props$scroll7, _props$scroll8;
1033
- const style = { width: isNumber((_props$scroll5 = props.scroll) === null || _props$scroll5 === void 0 ? void 0 : _props$scroll5.x) ? `${(_props$scroll6 = props.scroll) === null || _props$scroll6 === void 0 ? void 0 : _props$scroll6.x}px` : (_props$scroll7 = props.scroll) === null || _props$scroll7 === void 0 ? void 0 : _props$scroll7.x };
1034
- if ((_props$scroll8 = props.scroll) === null || _props$scroll8 === void 0 ? void 0 : _props$scroll8.minWidth) style.minWidth = isNumber(props.scroll.minWidth) ? `${props.scroll.minWidth}px` : props.scroll.minWidth;
1035
- return getTableElementStyle(style);
1036
- }
1037
- return getTableElementStyle();
1038
- });
1039
- const contentStyle = computed(() => {
1040
- if (isScroll.value.x && flattenData.value.length > 0) {
1041
- var _props$scroll9, _props$scroll10, _props$scroll11, _props$scroll12;
1042
- const style = { width: isNumber((_props$scroll9 = props.scroll) === null || _props$scroll9 === void 0 ? void 0 : _props$scroll9.x) ? `${(_props$scroll10 = props.scroll) === null || _props$scroll10 === void 0 ? void 0 : _props$scroll10.x}px` : (_props$scroll11 = props.scroll) === null || _props$scroll11 === void 0 ? void 0 : _props$scroll11.x };
1043
- if ((_props$scroll12 = props.scroll) === null || _props$scroll12 === void 0 ? void 0 : _props$scroll12.minWidth) style.minWidth = isNumber(props.scroll.minWidth) ? `${props.scroll.minWidth}px` : props.scroll.minWidth;
1044
- return getTableElementStyle(style);
1045
- }
1046
- return getTableElementStyle();
1047
- });
1048
- const addColumn = (id, column) => {
1049
- slotColumnMap.set(id, column);
1050
- };
1051
- const removeColumn = (id) => {
1052
- slotColumnMap.delete(id);
1053
- };
1054
- provide(tableInjectionKey, reactive({
1055
- loadMore,
1056
- addLazyLoadData,
1057
- slots,
1058
- sorter: computedSorter,
1059
- filters: computedFilters,
1060
- filterIconAlignLeft,
1061
- resizingColumn,
1062
- checkStrictly,
1063
- currentAllEnabledRowKeys,
1064
- currentSelectedRowKeys,
1065
- addColumn,
1066
- removeColumn,
1067
- onSelectAll: handleSelectAll,
1068
- onSelect: handleSelect,
1069
- onSelectAllLeafs: handleSelectAllLeafs,
1070
- onSorterChange: handleSorterChange,
1071
- onFilterChange: handleFilterChange,
1072
- onThMouseDown: handleThMouseDown
1073
- }));
1074
- const cls = computed(() => [
1075
- prefixCls,
1076
- `${prefixCls}-size-${props.size}`,
1077
- {
1078
- [`${prefixCls}-border`]: bordered.value.wrapper,
1079
- [`${prefixCls}-border-cell`]: bordered.value.cell,
1080
- [`${prefixCls}-border-header-cell`]: !bordered.value.cell && bordered.value.headerCell,
1081
- [`${prefixCls}-border-body-cell`]: !bordered.value.cell && bordered.value.bodyCell,
1082
- [`${prefixCls}-stripe`]: props.stripe,
1083
- [`${prefixCls}-hover`]: props.hoverable,
1084
- [`${prefixCls}-dragging`]: dragState.dragging,
1085
- [`${prefixCls}-type-selection`]: Boolean(props.rowSelection),
1086
- [`${prefixCls}-empty`]: props.data && flattenData.value.length === 0,
1087
- [`${prefixCls}-layout-fixed`]: props.tableLayoutFixed || isScroll.value.x || splitTable.value || hasEllipsis.value
1088
- }
1089
- ]);
1090
- const paginationCls = computed(() => [`${prefixCls}-pagination`, {
1091
- [`${prefixCls}-pagination-left`]: props.pagePosition === "tl" || props.pagePosition === "bl",
1092
- [`${prefixCls}-pagination-center`]: props.pagePosition === "top" || props.pagePosition === "bottom",
1093
- [`${prefixCls}-pagination-right`]: props.pagePosition === "tr" || props.pagePosition === "br",
1094
- [`${prefixCls}-pagination-top`]: isPaginationTop.value
1095
- }]);
1096
- const tableCls = computed(() => {
1097
- const cls = getTableFixedCls();
1098
- if (isScroll.value.x) cls.push(getTableScrollCls());
1099
- if (splitTable.value) cls.push(`${prefixCls}-scroll-y`);
1100
- return cls;
1101
- });
1102
- const tableVirtualListProps = computed(() => {
1103
- if (!props.virtualListProps) return {};
1104
- const _props$virtualListPro = props.virtualListProps, { items: _items, data: _data, keyField: _keyField, itemKey: _itemKey, listTag: _listTag, itemTag: _itemTag, listClass: _listClass, itemClass: _itemClass, listAttrs: _listAttrs, listStyle: _listStyle, contentWrapperAttrs: _contentWrapperAttrs, contentAttrs: _contentAttrs, component: _component, paddingPosition: _paddingPosition, isStaticItemHeight, fixedSize } = _props$virtualListPro;
1105
- return _objectSpread2(_objectSpread2({ prerender: 20 }, _objectWithoutProperties(_props$virtualListPro, _excluded)), {}, { fixedSize: fixedSize !== null && fixedSize !== void 0 ? fixedSize : isStaticItemHeight });
1106
- });
1107
- const isVirtualList = computed(() => Boolean(props.virtualListProps));
1108
- const thWidth = ref({});
1109
- const getThWidth = () => {
1110
- const width = {};
1111
- for (const key of Object.keys(thRefs.value)) width[key] = thRefs.value[key].offsetWidth;
1112
- thWidth.value = width;
1113
- };
1114
- const hasScrollBar = ref(false);
1115
- const isTbodyHasScrollBar = () => {
1116
- if (tbodyRef.value) return tbodyRef.value.offsetWidth > tbodyRef.value.clientWidth;
1117
- return false;
1118
- };
1119
- const handleTbodyResize = () => {
1120
- const _hasScrollBar = isTbodyHasScrollBar();
1121
- if (hasScrollBar.value !== _hasScrollBar) hasScrollBar.value = _hasScrollBar;
1122
- setAlignPosition();
1123
- getThWidth();
1124
- };
1125
- onMounted(() => {
1126
- hasScrollBar.value = isTbodyHasScrollBar();
1127
- getThWidth();
1128
- });
1129
- const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.tableSpinProps), props.spinProps), isObject(props.loading) ? props.loading : { loading: props.loading }));
1130
- const renderEmpty = () => {
1131
- return createVNode(table_tr_default, { "empty": true }, { default: () => [createVNode(table_td_default, { "colSpan": dataColumns.value.length + operations.value.length }, { default: () => {
1132
- var _ref2, _slots$empty, _slots$empty2, _configCtx$slots, _configCtx$slots$empt;
1133
- return [(_ref2 = (_slots$empty = (_slots$empty2 = slots.empty) === null || _slots$empty2 === void 0 ? void 0 : _slots$empty2.call(slots)) !== null && _slots$empty !== void 0 ? _slots$empty : configCtx === null || configCtx === void 0 || (_configCtx$slots$empt = (_configCtx$slots = configCtx.slots).empty) === null || _configCtx$slots$empt === void 0 ? void 0 : _configCtx$slots$empt.call(_configCtx$slots, { component: "table" })) !== null && _ref2 !== void 0 ? _ref2 : createVNode(Empty, null, null)];
1134
- } })] });
1135
- };
1136
- const renderExpandContent = (record) => {
1137
- var _props$expandable2;
1138
- if (record.expand) return isFunction(record.expand) ? record.expand() : record.expand;
1139
- if (slots["expand-row"]) return slots["expand-row"]({ record: record.raw });
1140
- if ((_props$expandable2 = props.expandable) === null || _props$expandable2 === void 0 ? void 0 : _props$expandable2.expandedRowRender) return props.expandable.expandedRowRender(record.raw);
1141
- };
1142
- const allColumns = computed(() => [].concat(operations.value, dataColumns.value));
1143
- const { tableSpan, removedCells } = useSpan({
1144
- spanMethod,
1145
- data: flattenData,
1146
- columns: computed(() => props.spanAll ? allColumns.value : dataColumns.value)
1147
- });
1148
- const { tableSpan: tableSummarySpan, removedCells: removedSummaryCells } = useSpan({
1149
- spanMethod: summarySpanMethod,
1150
- data: summaryData,
1151
- columns: allColumns
1152
- });
1153
- const getVirtualColumnStyle = (name) => {
1154
- if (!isVirtualList.value || !name || !thWidth.value[name]) return;
1155
- return { width: `${thWidth.value[name]}px` };
1156
- };
1157
- const renderSummaryRow = (record, rowIndex) => {
1158
- return createVNode(table_tr_default, {
1159
- "key": `table-summary-${rowIndex}`,
1160
- "class": [`${prefixCls}-tr-summary`, isFunction(props.rowClass) ? props.rowClass(record.raw, rowIndex) : props.rowClass],
1161
- "onClick": (ev) => handleRowClick(record, ev)
1162
- }, {
1163
- default: () => [operations.value.map((operation, index) => {
1164
- var _tableSummarySpan$val;
1165
- const cellId = `${rowIndex}-${index}-${record.key}`;
1166
- const [rowspan, colspan] = (_tableSummarySpan$val = tableSummarySpan.value[cellId]) !== null && _tableSummarySpan$val !== void 0 ? _tableSummarySpan$val : [1, 1];
1167
- if (removedSummaryCells.value.includes(cellId)) return null;
1168
- return createVNode(table_operation_td_default, {
1169
- "style": getVirtualColumnStyle(operation.name),
1170
- "operationColumn": operation,
1171
- "operations": operations.value,
1172
- "record": record,
1173
- "rowSpan": rowspan,
1174
- "colSpan": colspan,
1175
- "summary": true
1176
- }, null);
1177
- }), dataColumns.value.map((column, index) => {
1178
- var _tableSummarySpan$val2;
1179
- const cellId = `${rowIndex}-${operations.value.length + index}-${record.key}`;
1180
- const [rowspan, colspan] = (_tableSummarySpan$val2 = tableSummarySpan.value[cellId]) !== null && _tableSummarySpan$val2 !== void 0 ? _tableSummarySpan$val2 : [1, 1];
1181
- if (removedSummaryCells.value.includes(cellId)) return null;
1182
- const style = getVirtualColumnStyle(column.dataIndex);
1183
- return createVNode(table_td_default, {
1184
- "key": `td-${cellId}`,
1185
- "style": style,
1186
- "rowIndex": rowIndex,
1187
- "record": record,
1188
- "column": column,
1189
- "operations": operations.value,
1190
- "dataColumns": dataColumns.value,
1191
- "rowSpan": rowspan,
1192
- "colSpan": colspan,
1193
- "summary": true,
1194
- "onClick": (ev) => handleCellClick(record, column, ev),
1195
- "onDblclick": (ev) => handleCellDblclick(record, column, ev),
1196
- "onMouseenter": (ev) => handleCellMouseEnter(record, column, ev),
1197
- "onMouseleave": (ev) => handleCellMouseLeave(record, column, ev),
1198
- "onContextmenu": (ev) => handleCellContextmenu(record, column, ev)
1199
- }, {
1200
- td: slots.td,
1201
- cell: slots["summary-cell"]
1202
- });
1203
- })],
1204
- tr: slots.tr
1205
- });
1206
- };
1207
- const renderSummary = () => {
1208
- if (summaryData.value && summaryData.value.length > 0) return createVNode("div", { "class": `${prefixCls}-tfoot-content` }, [summaryData.value.map((data, index) => renderSummaryRow(data, index))]);
1209
- return null;
1210
- };
1211
- const renderExpandBtn = (record, stopPropagation = true) => {
1212
- var _ref3, _slots$expandIcon, _slots$expandIcon2, _props$expandable3, _props$expandable3$ic;
1213
- const currentKey = record.key;
1214
- const expanded = expandedRowKeys.value.includes(currentKey);
1215
- return createVNode("button", {
1216
- "type": "button",
1217
- "class": `${prefixCls}-expand-btn`,
1218
- "onClick": (ev) => {
1219
- handleExpand(currentKey, record.raw);
1220
- if (stopPropagation) ev.stopPropagation();
1221
- }
1222
- }, [(_ref3 = (_slots$expandIcon = (_slots$expandIcon2 = slots["expand-icon"]) === null || _slots$expandIcon2 === void 0 ? void 0 : _slots$expandIcon2.call(slots, {
1223
- expanded,
1224
- record: record.raw
1225
- })) !== null && _slots$expandIcon !== void 0 ? _slots$expandIcon : (_props$expandable3 = props.expandable) === null || _props$expandable3 === void 0 || (_props$expandable3$ic = _props$expandable3.icon) === null || _props$expandable3$ic === void 0 ? void 0 : _props$expandable3$ic.call(_props$expandable3, expanded, record.raw)) !== null && _ref3 !== void 0 ? _ref3 : expanded ? createVNode(IconMinus, null, null) : createVNode(IconPlus, null, null)]);
1226
- };
1227
- const renderExpand = (record, { indentSize, indexPath, allowDrag, expandContent }) => {
1228
- if (record.hasSubtree) {
1229
- var _record$children, _record$children2;
1230
- if (((_record$children = record.children) === null || _record$children === void 0 ? void 0 : _record$children.length) === 0 && showEmptyTree.value) return renderEmpty();
1231
- return (_record$children2 = record.children) === null || _record$children2 === void 0 ? void 0 : _record$children2.map((item, index) => renderRecord(item, index, {
1232
- indentSize,
1233
- indexPath,
1234
- allowDrag
1235
- }));
1236
- }
1237
- if (expandContent) {
1238
- const scrollContainer = containerElement.value;
1239
- return createVNode(table_tr_default, {
1240
- "key": `${record.key}-expand`,
1241
- "expand": true
1242
- }, { default: () => [createVNode(table_td_default, {
1243
- "isFixedExpand": hasLeftFixedColumn.value || hasRightFixedColumn.value,
1244
- "containerWidth": scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientWidth,
1245
- "colSpan": dataColumns.value.length + operations.value.length
1246
- }, _isSlot(expandContent) ? expandContent : { default: () => [expandContent] })] });
1247
- }
1248
- return null;
1249
- };
1250
- const renderRecord = (record, rowIndex, { indentSize = 0, indexPath, allowDrag = true } = {}) => {
1251
- var _selectedRowKeys$valu;
1252
- const currentKey = record.key;
1253
- const currentPath = (indexPath !== null && indexPath !== void 0 ? indexPath : []).concat(rowIndex);
1254
- const expandContent = renderExpandContent(record);
1255
- const showExpand = expandedRowKeys.value.includes(currentKey);
1256
- const isDragTarget = dragState.sourceKey === record.key;
1257
- const dragSourceEvent = dragType.value ? {
1258
- draggable: allowDrag,
1259
- onDragstart: (ev) => {
1260
- if (!allowDrag) return;
1261
- handleDragStart(ev, record.key, currentPath, record.raw);
1262
- },
1263
- onDragend: (ev) => {
1264
- if (!allowDrag) return;
1265
- handleDragEnd(ev);
1266
- }
1267
- } : {};
1268
- const dragTargetEvent = dragType.value ? {
1269
- onDragenter: (ev) => {
1270
- if (!allowDrag) return;
1271
- handleDragEnter(ev, currentPath);
1272
- },
1273
- onDragover: (ev) => {
1274
- if (!allowDrag) return;
1275
- handleDragover(ev);
1276
- },
1277
- onDrop: (ev) => {
1278
- if (!allowDrag) return;
1279
- handleChange("drag");
1280
- handleDrop(ev);
1281
- }
1282
- } : {};
1283
- return createVNode(Fragment, null, [createVNode(table_tr_default, mergeProps({
1284
- "key": currentKey,
1285
- "class": [{
1286
- [`${prefixCls}-tr-draggable`]: dragType.value === "row",
1287
- [`${prefixCls}-tr-drag`]: isDragTarget
1288
- }, isFunction(props.rowClass) ? props.rowClass(record.raw, rowIndex) : props.rowClass],
1289
- "rowIndex": rowIndex,
1290
- "record": record,
1291
- "checked": props.rowSelection && ((_selectedRowKeys$valu = selectedRowKeys.value) === null || _selectedRowKeys$valu === void 0 ? void 0 : _selectedRowKeys$valu.includes(currentKey)),
1292
- "onClick": (ev) => handleRowClick(record, ev),
1293
- "onDblclick": (ev) => handleRowDblclick(record, ev),
1294
- "onContextmenu": (ev) => handleRowContextMenu(record, ev)
1295
- }, dragType.value === "row" ? dragSourceEvent : {}, dragTargetEvent), {
1296
- default: () => [operations.value.map((operation, index) => {
1297
- var _tableSpan$value$cell;
1298
- const cellId = `${rowIndex}-${index}-${record.key}`;
1299
- const [rowspan, colspan] = props.spanAll ? (_tableSpan$value$cell = tableSpan.value[cellId]) !== null && _tableSpan$value$cell !== void 0 ? _tableSpan$value$cell : [1, 1] : [1, 1];
1300
- if (props.spanAll && removedCells.value.includes(cellId)) return null;
1301
- const style = getVirtualColumnStyle(operation.name);
1302
- return createVNode(table_operation_td_default, mergeProps({
1303
- "key": `operation-td-${index}`,
1304
- "style": style,
1305
- "operationColumn": operation,
1306
- "operations": operations.value,
1307
- "record": record,
1308
- "hasExpand": Boolean(expandContent),
1309
- "selectedRowKeys": currentSelectedRowKeys.value,
1310
- "rowSpan": rowspan,
1311
- "colSpan": colspan,
1312
- "renderExpandBtn": renderExpandBtn
1313
- }, dragType.value === "handle" ? dragSourceEvent : {}), { "drag-handle-icon": slots["drag-handle-icon"] });
1314
- }), dataColumns.value.map((column, index) => {
1315
- var _tableSpan$value$cell2;
1316
- const cellId = `${rowIndex}-${props.spanAll ? operations.value.length + index : index}-${record.key}`;
1317
- const [rowspan, colspan] = (_tableSpan$value$cell2 = tableSpan.value[cellId]) !== null && _tableSpan$value$cell2 !== void 0 ? _tableSpan$value$cell2 : [1, 1];
1318
- if (removedCells.value.includes(cellId)) return null;
1319
- const extraProps = index === 0 ? {
1320
- showExpandBtn: record.hasSubtree,
1321
- indentSize: record.hasSubtree ? indentSize - 20 : indentSize
1322
- } : {};
1323
- const style = getVirtualColumnStyle(column.dataIndex);
1324
- return createVNode(table_td_default, mergeProps({
1325
- "key": `td-${index}`,
1326
- "style": style,
1327
- "rowIndex": rowIndex,
1328
- "record": record,
1329
- "column": column,
1330
- "operations": operations.value,
1331
- "dataColumns": dataColumns.value,
1332
- "rowSpan": rowspan,
1333
- "renderExpandBtn": renderExpandBtn,
1334
- "colSpan": colspan
1335
- }, extraProps, {
1336
- "onClick": (ev) => handleCellClick(record, column, ev),
1337
- "onDblclick": (ev) => handleCellDblclick(record, column, ev),
1338
- "onMouseenter": (ev) => handleCellMouseEnter(record, column, ev),
1339
- "onMouseleave": (ev) => handleCellMouseLeave(record, column, ev),
1340
- "onContextmenu": (ev) => handleCellContextmenu(record, column, ev)
1341
- }), { td: slots.td });
1342
- })],
1343
- tr: slots.tr
1344
- }), showExpand && renderExpand(record, {
1345
- indentSize: indentSize + props.indentSize,
1346
- indexPath: currentPath,
1347
- allowDrag: allowDrag && !isDragTarget,
1348
- expandContent
1349
- })]);
1350
- };
1351
- const renderBody = () => {
1352
- const hasSubData = flattenData.value.some((record) => Boolean(record.hasSubtree));
1353
- return createVNode(table_tbody_default, null, {
1354
- default: () => [flattenData.value.length > 0 ? flattenData.value.map((record, index) => renderRecord(record, index, { indentSize: hasSubData ? 20 : 0 })) : renderEmpty()],
1355
- tbody: slots.tbody
1356
- });
1357
- };
1358
- const renderHeader = () => createVNode(table_thead_default, null, {
1359
- default: () => [groupColumns.value.map((row, index) => createVNode(table_tr_default, { "key": `header-row-${index}` }, { default: () => [index === 0 && operations.value.map((operation, index) => {
1360
- var _props$rowSelection2;
1361
- return createVNode(table_operation_th_default, {
1362
- "key": `operation-th-${index}`,
1363
- "ref": (ins) => {
1364
- if ((ins === null || ins === void 0 ? void 0 : ins.$el) && operation.name) thRefs.value[operation.name] = ins.$el;
1365
- },
1366
- "operationColumn": operation,
1367
- "operations": operations.value,
1368
- "selectAll": Boolean(operation.name === "selection-checkbox" && ((_props$rowSelection2 = props.rowSelection) === null || _props$rowSelection2 === void 0 ? void 0 : _props$rowSelection2.showCheckedAll)),
1369
- "rowSpan": groupColumns.value.length
1370
- }, null);
1371
- }), row.map((column, index) => {
1372
- const resizable = props.columnResizable && Boolean(column.dataIndex) && index < row.length - 1;
1373
- return createVNode(table_th_default, {
1374
- "key": `th-${index}`,
1375
- "ref": (ins) => {
1376
- if ((ins === null || ins === void 0 ? void 0 : ins.$el) && column.dataIndex) thRefs.value[column.dataIndex] = ins.$el;
1377
- },
1378
- "column": column,
1379
- "operations": operations.value,
1380
- "dataColumns": dataColumns.value,
1381
- "resizable": resizable,
1382
- "onClick": (ev) => handleHeaderClick(column, ev)
1383
- }, { th: slots.th });
1384
- })] }))],
1385
- thead: slots.thead
1386
- });
1387
- const renderContent = () => {
1388
- if (splitTable.value) {
1389
- var _props$scroll13, _props$scroll14, _props$scroll15;
1390
- const top = isNumber(props.stickyHeader) ? `${props.stickyHeader}px` : void 0;
1391
- const isStringScrollY = isString((_props$scroll13 = props.scroll) === null || _props$scroll13 === void 0 ? void 0 : _props$scroll13.y);
1392
- const bodyMaxHeight = isNumber((_props$scroll14 = props.scroll) === null || _props$scroll14 === void 0 ? void 0 : _props$scroll14.y) ? `${(_props$scroll15 = props.scroll) === null || _props$scroll15 === void 0 ? void 0 : _props$scroll15.y}px` : "100%";
1393
- const _scrollbarProps$value = scrollbarProps.value, { outerStyle: bodyOuterStyle } = _scrollbarProps$value, bodyScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value, _excluded2);
1394
- const bodyBaseStyle = isStringScrollY ? {
1395
- height: bodyMaxHeight,
1396
- minHeight: 0
1397
- } : {
1398
- maxHeight: bodyMaxHeight,
1399
- minHeight: 0
1400
- };
1401
- const bodyScrollbarOuterStyle = Array.isArray(bodyOuterStyle) ? [bodyBaseStyle, ...bodyOuterStyle] : bodyOuterStyle ? [bodyBaseStyle, bodyOuterStyle] : bodyBaseStyle;
1402
- const bodyComponentStyle = isStringScrollY ? { height: bodyMaxHeight } : { maxHeight: bodyMaxHeight };
1403
- const BodyComponent = displayScrollbar.value ? Scrollbar : "div";
1404
- return createVNode(Fragment, null, [
1405
- props.showHeader && createVNode("div", {
1406
- "ref": theadComRef,
1407
- "class": [`${prefixCls}-header`, { [`${prefixCls}-header-sticky`]: props.stickyHeader !== false }],
1408
- "style": { top }
1409
- }, [createVNode("div", {
1410
- "class": `${prefixCls}-element`,
1411
- "style": headerStyle.value
1412
- }, [renderHeader()])]),
1413
- createVNode(resize_observer_default, { "onResize": handleTbodyResize }, { default: () => [isVirtualList.value && flattenData.value.length ? createVNode(virtual_list_default, mergeProps({
1414
- "ref": (ins) => {
1415
- if (ins === null || ins === void 0 ? void 0 : ins.$el) {
1416
- var _ins$$el$querySelecto, _ins$$el;
1417
- virtualListRef.value = ins;
1418
- tbodyRef.value = ins.$el;
1419
- virtualRef.value = (_ins$$el$querySelecto = (_ins$$el = ins.$el).querySelector) === null || _ins$$el$querySelecto === void 0 ? void 0 : _ins$$el$querySelecto.call(_ins$$el, `.${virtualListPrefixCls}-scroller`);
1420
- } else {
1421
- virtualListRef.value = null;
1422
- tbodyRef.value = void 0;
1423
- virtualRef.value = void 0;
1424
- }
1425
- },
1426
- "class": `${prefixCls}-body`,
1427
- "items": flattenData.value,
1428
- "keyField": "_key",
1429
- "listTag": "div",
1430
- "itemTag": "div",
1431
- "listClass": `${prefixCls}-element`,
1432
- "listStyle": contentStyle.value,
1433
- "itemClass": `${prefixCls}-virtual-item`,
1434
- "height": bodyMaxHeight
1435
- }, tableVirtualListProps.value, {
1436
- "scrollbar": displayScrollbar.value ? scrollbarProps.value : false,
1437
- "onScroll": onTbodyScroll
1438
- }), { item: ({ item, index }) => item ? renderRecord(item, index) : null }) : createVNode(BodyComponent, mergeProps({
1439
- "ref": tbodyComRef,
1440
- "class": `${prefixCls}-body`,
1441
- "style": bodyComponentStyle
1442
- }, displayScrollbar.value ? _objectSpread2({ outerStyle: bodyScrollbarOuterStyle }, bodyScrollbarRestProps) : void 0, { "onScroll": onTbodyScroll }), { default: () => [createVNode("div", {
1443
- "class": `${prefixCls}-element`,
1444
- "style": contentStyle.value
1445
- }, [renderBody()])] })] }),
1446
- summaryData.value && summaryData.value.length > 0 && createVNode("div", {
1447
- "ref": summaryRef,
1448
- "class": `${prefixCls}-tfoot`,
1449
- "style": { overflow: "hidden" }
1450
- }, [createVNode("div", {
1451
- "class": `${prefixCls}-element`,
1452
- "style": contentStyle.value
1453
- }, [renderSummary()])])
1454
- ]);
1455
- }
1456
- return createVNode(resize_observer_default, { "onResize": () => setAlignPosition() }, { default: () => [createVNode("div", {
1457
- "class": `${prefixCls}-element`,
1458
- "style": contentStyle.value
1459
- }, [
1460
- props.showHeader && renderHeader(),
1461
- renderBody(),
1462
- summaryData.value && summaryData.value.length > 0 && renderSummary()
1463
- ])] });
1464
- };
1465
- const renderTable = (content) => {
1466
- var _props$scroll16;
1467
- const style = ((_props$scroll16 = props.scroll) === null || _props$scroll16 === void 0 ? void 0 : _props$scroll16.maxHeight) ? { maxHeight: props.scroll.maxHeight } : void 0;
1468
- const Component = displayScrollbar.value && !splitTable.value ? Scrollbar : "div";
1469
- const _scrollbarProps$value2 = scrollbarProps.value, { outerStyle: contentOuterStyle } = _scrollbarProps$value2, contentScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value2, _excluded3);
1470
- const contentScrollbarOuterStyle = Array.isArray(contentOuterStyle) ? [{ height: "100%" }, ...contentOuterStyle] : contentOuterStyle ? [{ height: "100%" }, contentOuterStyle] : { height: "100%" };
1471
- return createVNode(Fragment, null, [createVNode("div", { "class": [`${prefixCls}-container`, tableCls.value] }, [createVNode(Component, mergeProps({
1472
- "ref": contentComRef,
1473
- "class": [`${prefixCls}-content`, { [`${prefixCls}-content-scroll-x`]: !splitTable.value }],
1474
- "style": style
1475
- }, scrollbar.value && !splitTable.value ? _objectSpread2({ outerStyle: contentScrollbarOuterStyle }, contentScrollbarRestProps) : void 0, { "onScroll": handleScroll }), { default: () => [content ? createVNode("div", { "class": `${prefixCls}-element` }, [content()]) : renderContent()] })]), slots.footer && createVNode("div", { "class": `${prefixCls}-footer` }, [slots.footer()])]);
1476
- };
1477
- const renderPagination = () => {
1478
- var _slots$paginationLef, _slots$paginationRig;
1479
- const paginationProps = isObject(props.pagination) ? omit(props.pagination, [
1480
- "current",
1481
- "pageSize",
1482
- "defaultCurrent",
1483
- "defaultPageSize"
1484
- ]) : {};
1485
- return createVNode("div", { "class": paginationCls.value }, [
1486
- (_slots$paginationLef = slots["pagination-left"]) === null || _slots$paginationLef === void 0 ? void 0 : _slots$paginationLef.call(slots),
1487
- createVNode(Pagination, mergeProps({
1488
- "total": validData.value.length,
1489
- "current": page.value,
1490
- "pageSize": pageSize.value,
1491
- "onChange": (page) => {
1492
- handlePageChange(page);
1493
- handleChange("pagination");
1494
- },
1495
- "onPageSizeChange": (pageSize) => {
1496
- handlePageSizeChange(pageSize);
1497
- handleChange("pagination");
1498
- }
1499
- }, paginationProps), null),
1500
- (_slots$paginationRig = slots["pagination-right"]) === null || _slots$paginationRig === void 0 ? void 0 : _slots$paginationRig.call(slots)
1501
- ]);
1502
- };
1503
- const style = computed(() => {
1504
- var _props$scroll17;
1505
- if (isString((_props$scroll17 = props.scroll) === null || _props$scroll17 === void 0 ? void 0 : _props$scroll17.y)) {
1506
- var _props$scroll18;
1507
- return { height: (_props$scroll18 = props.scroll) === null || _props$scroll18 === void 0 ? void 0 : _props$scroll18.y };
1508
- }
1509
- });
1510
- const render = () => {
1511
- var _slots$columns;
1512
- if (slots.default) return createVNode("div", {
1513
- "class": cls.value,
1514
- "role": "table"
1515
- }, [renderTable(slots.default)]);
1516
- children.value = (_slots$columns = slots.columns) === null || _slots$columns === void 0 ? void 0 : _slots$columns.call(slots);
1517
- return createVNode("div", {
1518
- "class": cls.value,
1519
- "style": style.value,
1520
- "role": "table"
1521
- }, [children.value, createVNode(Spin, mergedSpinProps.value, { default: () => [
1522
- props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && isPaginationTop.value && renderPagination(),
1523
- renderTable(),
1524
- props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && !isPaginationTop.value && renderPagination()
1525
- ] })]);
1526
- };
1527
- return {
1528
- render,
1529
- selfExpand: expand,
1530
- selfExpandAll: expandAll,
1531
- selfSelect: select,
1532
- selfSelectAll: selectAll,
1533
- selfResetFilters: resetFilters,
1534
- selfClearFilters: clearFilters,
1535
- selfResetSorters: resetSorters,
1536
- selfClearSorters: clearSorters,
1537
- selfScrollIntoView: (options) => {
1538
- var _virtualListRef$value;
1539
- return (_virtualListRef$value = virtualListRef.value) === null || _virtualListRef$value === void 0 ? void 0 : _virtualListRef$value.scrollTo(options);
1540
- }
1541
- };
1542
- },
1543
- methods: {
1544
- /**
1545
- * @zh 设置全选状态
1546
- * @en Set select all state
1547
- * @param { boolean } checked
1548
- * @public
1549
- * @version 2.22.0
1550
- */
1551
- selectAll(checked) {
1552
- return this.selfSelectAll(checked);
1553
- },
1554
- /**
1555
- * @zh 设置行选择器状态
1556
- * @en Set row selector state
1557
- * @param { string | number | (string | number)[] } rowKey
1558
- * @param { boolean } checked
1559
- * @public
1560
- * @version 2.31.0
1561
- */
1562
- select(rowKey, checked) {
1563
- return this.selfSelect(rowKey, checked);
1564
- },
1565
- /**
1566
- * @zh 设置全部展开状态
1567
- * @en Set all expanded state
1568
- * @param { boolean } checked
1569
- * @public
1570
- * @version 2.31.0
1571
- */
1572
- expandAll(checked) {
1573
- return this.selfExpandAll(checked);
1574
- },
1575
- /**
1576
- * @zh 设置展开状态
1577
- * @en Set select all state
1578
- * @param { string | number | (string | number)[] } rowKey
1579
- * @param { boolean } checked
1580
- * @public
1581
- * @version 2.31.0
1582
- */
1583
- expand(rowKey, checked) {
1584
- return this.selfExpand(rowKey, checked);
1585
- },
1586
- /**
1587
- * @zh 重置列的筛选器
1588
- * @en Reset the filter for columns
1589
- * @param { string | string[] } dataIndex
1590
- * @public
1591
- * @version 2.31.0
1592
- */
1593
- resetFilters(dataIndex) {
1594
- return this.selfResetFilters(dataIndex);
1595
- },
1596
- /**
1597
- * @zh 清空列的筛选器
1598
- * @en Clear the filter for columns
1599
- * @param { string | string[] } dataIndex
1600
- * @public
1601
- * @version 2.31.0
1602
- */
1603
- clearFilters(dataIndex) {
1604
- return this.selfClearFilters(dataIndex);
1605
- },
1606
- /**
1607
- * @zh 重置列的排序
1608
- * @en Reset the order of columns
1609
- * @public
1610
- * @version 2.31.0
1611
- */
1612
- resetSorters() {
1613
- return this.selfResetSorters();
1614
- },
1615
- /**
1616
- * @zh 清空列的排序
1617
- * @en Clear the order of columns
1618
- * @public
1619
- * @version 2.31.0
1620
- */
1621
- clearSorters() {
1622
- return this.selfClearSorters();
1623
- },
1624
- /**
1625
- * @zh 虚拟滚动到指定行
1626
- * @en Virtual scroll to the specified row
1627
- * @param {{ index?: number; key?: number | string; align?: 'auto' | 'top' | 'bottom' | 'start' | 'center' | 'end' | 'nearest' }} options
1628
- * @public
1629
- */
1630
- scrollIntoView(options) {
1631
- return this.selfScrollIntoView(options);
1632
- }
1633
- },
1634
- render() {
1635
- return this.render();
1636
- }
1637
- });
1
+ import table_vue_vue_type_script_setup_true_lang_default from "./table.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/table/table.vue
3
+ var table_default = table_vue_vue_type_script_setup_true_lang_default;
1638
4
  //#endregion
1639
5
  export { table_default as default };