ele-admin-plus 1.2.1-beta.1 → 1.2.1-beta.3

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 (477) hide show
  1. package/es/ele-admin-layout/index.d.ts +29 -24
  2. package/es/ele-admin-layout/props.d.ts +15 -11
  3. package/es/ele-admin-layout/props.js +4 -1
  4. package/es/ele-admin-layout/style/index.scss +7 -2
  5. package/es/ele-admin-layout/style/sidebar.scss +2 -0
  6. package/es/ele-alert/index.d.ts +15 -15
  7. package/es/ele-alert/index.js +3 -3
  8. package/es/ele-alert/props.d.ts +9 -8
  9. package/es/ele-app/components/message-body.d.ts +6 -5
  10. package/es/ele-app/components/message-body.js +2 -2
  11. package/es/ele-app/components/message-box-icon.d.ts +7 -6
  12. package/es/ele-app/plus.d.ts +3 -0
  13. package/es/ele-app/style/overwrite/input/index.scss +2 -0
  14. package/es/ele-avatar-group/index.d.ts +19 -18
  15. package/es/ele-avatar-group/index.js +15 -15
  16. package/es/ele-avatar-group/props.d.ts +10 -7
  17. package/es/ele-basic-select/index.d.ts +22 -19
  18. package/es/ele-basic-select/index.js +30 -23
  19. package/es/ele-basic-select/props.d.ts +11 -6
  20. package/es/ele-basic-select/props.js +3 -1
  21. package/es/ele-basic-select/util.d.ts +6 -0
  22. package/es/ele-basic-select/util.js +13 -0
  23. package/es/ele-bottom-bar/index.d.ts +4 -4
  24. package/es/ele-bottom-bar/props.d.ts +3 -2
  25. package/es/ele-breadcrumb/index.d.ts +3 -3
  26. package/es/ele-breadcrumb/props.d.ts +1 -1
  27. package/es/ele-card/index.d.ts +14 -14
  28. package/es/ele-card/props.d.ts +8 -6
  29. package/es/ele-check-card/components/card-item.d.ts +3 -2
  30. package/es/ele-check-card/index.d.ts +5 -5
  31. package/es/ele-check-card/index.js +12 -7
  32. package/es/ele-check-card/props.d.ts +3 -2
  33. package/es/ele-config-provider/index.d.ts +4 -4
  34. package/es/ele-config-provider/props.d.ts +3 -3
  35. package/es/ele-config-provider/types.d.ts +1 -0
  36. package/es/ele-copyable/index.d.ts +12 -12
  37. package/es/ele-copyable/index.js +6 -6
  38. package/es/ele-copyable/props.d.ts +7 -5
  39. package/es/ele-count-up/index.d.ts +1 -1
  40. package/es/ele-cropper/components/cropper-tools.d.ts +6 -5
  41. package/es/ele-cropper/components/cropper-tools.js +10 -10
  42. package/es/ele-cropper/index.d.ts +16 -16
  43. package/es/ele-cropper/index.js +39 -39
  44. package/es/ele-cropper/props.d.ts +2 -1
  45. package/es/ele-cropper-modal/index.d.ts +5 -5
  46. package/es/ele-cropper-modal/index.js +3 -3
  47. package/es/ele-cropper-modal/props.d.ts +1 -4
  48. package/es/ele-data-table/index.d.ts +22 -22
  49. package/es/ele-data-table/props.d.ts +16 -16
  50. package/es/ele-data-table/style/index.scss +1 -1
  51. package/es/ele-data-table/types.d.ts +2 -0
  52. package/es/ele-data-table/util.js +6 -2
  53. package/es/ele-drawer/index.d.ts +18 -18
  54. package/es/ele-drawer/index.js +18 -18
  55. package/es/ele-drawer/props.d.ts +11 -10
  56. package/es/ele-dropdown/index.d.ts +24 -24
  57. package/es/ele-dropdown/index.js +54 -48
  58. package/es/ele-dropdown/props.d.ts +13 -12
  59. package/es/ele-dropdown/types.d.ts +2 -0
  60. package/es/ele-edit-tag/index.d.ts +21 -19
  61. package/es/ele-edit-tag/index.js +10 -2
  62. package/es/ele-edit-tag/props.d.ts +13 -8
  63. package/es/ele-edit-tag/props.js +3 -1
  64. package/es/ele-ellipsis/index.d.ts +6 -5
  65. package/es/ele-ellipsis/index.js +3 -3
  66. package/es/ele-ellipsis/props.d.ts +1 -1
  67. package/es/ele-file-list/components/file-grid-item.d.ts +5 -5
  68. package/es/ele-file-list/components/file-grid-item.js +15 -15
  69. package/es/ele-file-list/components/file-grid.d.ts +6 -6
  70. package/es/ele-file-list/components/file-grid.js +15 -15
  71. package/es/ele-file-list/components/file-table-item.d.ts +5 -5
  72. package/es/ele-file-list/components/file-table-item.js +15 -15
  73. package/es/ele-file-list/components/file-table.d.ts +7 -7
  74. package/es/ele-file-list/components/file-table.js +19 -19
  75. package/es/ele-file-list/index.d.ts +10 -10
  76. package/es/ele-file-list/index.js +22 -22
  77. package/es/ele-file-list-tool/index.d.ts +1 -1
  78. package/es/ele-file-list-tool/index.js +2 -2
  79. package/es/ele-icon-select/components/icon-grid.d.ts +10 -8
  80. package/es/ele-icon-select/components/icon-grid.js +6 -6
  81. package/es/ele-icon-select/index.d.ts +44 -43
  82. package/es/ele-icon-select/index.js +29 -25
  83. package/es/ele-icon-select/props.d.ts +18 -14
  84. package/es/ele-icon-select/props.js +2 -0
  85. package/es/ele-loading/index.d.ts +4 -4
  86. package/es/ele-loading/props.d.ts +3 -2
  87. package/es/ele-map-picker/components/map-view.d.ts +26 -28
  88. package/es/ele-map-picker/components/map-view.js +1 -0
  89. package/es/ele-map-picker/index.d.ts +10 -10
  90. package/es/ele-map-picker/props.d.ts +6 -5
  91. package/es/ele-map-picker/style/index.scss +1 -1
  92. package/es/ele-menus/index.d.ts +2 -2
  93. package/es/ele-menus/index.js +15 -15
  94. package/es/ele-menus/props.d.ts +1 -1
  95. package/es/ele-menus/style/index.scss +5 -0
  96. package/es/ele-menus/util.d.ts +7 -0
  97. package/es/ele-menus/util.js +49 -26
  98. package/es/ele-modal/index.d.ts +30 -29
  99. package/es/ele-modal/index.js +48 -82
  100. package/es/ele-modal/props.d.ts +14 -13
  101. package/es/ele-modal/util.d.ts +31 -24
  102. package/es/ele-modal/util.js +235 -132
  103. package/es/ele-pagination/index.d.ts +20 -8
  104. package/es/ele-pagination/index.js +9 -8
  105. package/es/ele-pagination/props.d.ts +8 -2
  106. package/es/ele-pagination/style/index.scss +70 -0
  107. package/es/ele-popconfirm/index.d.ts +37 -47
  108. package/es/ele-popconfirm/index.js +15 -15
  109. package/es/ele-popconfirm/props.d.ts +18 -21
  110. package/es/ele-popover/index.d.ts +27 -37
  111. package/es/ele-popover/index.js +15 -15
  112. package/es/ele-popover/props.d.ts +11 -15
  113. package/es/ele-popover/props.js +1 -0
  114. package/es/ele-printer/index.d.ts +9 -9
  115. package/es/ele-printer/index.js +19 -22
  116. package/es/ele-printer/props.d.ts +6 -5
  117. package/es/ele-printer/style/index.scss +2 -2
  118. package/es/ele-printer/types.d.ts +0 -2
  119. package/es/ele-printer/util.d.ts +7 -28
  120. package/es/ele-printer/util.js +111 -77
  121. package/es/ele-pro-layout/index.d.ts +44 -48
  122. package/es/ele-pro-layout/index.js +2 -2
  123. package/es/ele-pro-layout/props.d.ts +17 -15
  124. package/es/ele-pro-layout/props.js +1 -1
  125. package/es/ele-pro-table/components/table-tools.d.ts +405 -35
  126. package/es/ele-pro-table/components/table-tools.js +227 -151
  127. package/es/ele-pro-table/components/tool-column-list.d.ts +21 -9
  128. package/es/ele-pro-table/components/tool-column-list.js +64 -37
  129. package/es/ele-pro-table/components/tool-column.d.ts +31 -44
  130. package/es/ele-pro-table/components/tool-column.js +87 -103
  131. package/es/ele-pro-table/components/tool-export.d.ts +37 -34
  132. package/es/ele-pro-table/components/tool-export.js +223 -215
  133. package/es/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
  134. package/es/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
  135. package/es/ele-pro-table/components/tool-print.d.ts +47 -43
  136. package/es/ele-pro-table/components/tool-print.js +380 -369
  137. package/es/ele-pro-table/index.d.ts +1020 -81
  138. package/es/ele-pro-table/index.js +103 -76
  139. package/es/ele-pro-table/props.d.ts +18 -19
  140. package/es/ele-pro-table/props.js +4 -2
  141. package/es/ele-pro-table/style/index.scss +44 -12
  142. package/es/ele-pro-table/types.d.ts +54 -0
  143. package/es/ele-pro-table/util.d.ts +84 -34
  144. package/es/ele-pro-table/util.js +186 -94
  145. package/es/ele-qr-code/components/canvas-render.d.ts +67 -0
  146. package/es/ele-qr-code/components/canvas-render.js +147 -0
  147. package/es/ele-qr-code/index.d.ts +5 -9
  148. package/es/ele-qr-code/index.js +33 -136
  149. package/es/ele-qr-code/props.d.ts +5 -2
  150. package/es/ele-qr-code/props.js +3 -1
  151. package/es/ele-qr-code/types.d.ts +5 -0
  152. package/es/ele-qr-code-svg/index.d.ts +6 -5
  153. package/es/ele-qr-code-svg/index.js +11 -14
  154. package/es/ele-segmented/index.d.ts +1 -1
  155. package/es/ele-segmented/index.js +6 -3
  156. package/es/ele-split-panel/index.d.ts +8 -8
  157. package/es/ele-split-panel/index.js +3 -3
  158. package/es/ele-split-panel/props.d.ts +4 -3
  159. package/es/ele-steps/index.d.ts +2 -2
  160. package/es/ele-steps/props.d.ts +2 -2
  161. package/es/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
  162. package/es/ele-tab-wrap/components/tab-dropdown.js +3 -3
  163. package/es/ele-table/index.d.ts +2 -2
  164. package/es/ele-table/props.d.ts +2 -1
  165. package/es/ele-table-select/index.d.ts +29 -27
  166. package/es/ele-table-select/index.js +47 -39
  167. package/es/ele-table-select/props.d.ts +11 -7
  168. package/es/ele-table-select/props.js +2 -0
  169. package/es/ele-tabs/index.d.ts +19 -34
  170. package/es/ele-tabs/index.js +133 -86
  171. package/es/ele-tabs/props.d.ts +10 -24
  172. package/es/ele-tabs/props.js +3 -1
  173. package/es/ele-tabs/style/index.scss +42 -2
  174. package/es/ele-tabs/types.d.ts +2 -11
  175. package/es/ele-text/index.d.ts +2 -2
  176. package/es/ele-text/props.d.ts +2 -1
  177. package/es/ele-tool/index.d.ts +11 -5
  178. package/es/ele-tool/index.js +32 -32
  179. package/es/ele-tool/props.d.ts +4 -1
  180. package/es/ele-tool/props.js +3 -1
  181. package/es/ele-tool/style/index.js +0 -1
  182. package/es/ele-toolbar/index.d.ts +3253 -7
  183. package/es/ele-toolbar/index.js +44 -5
  184. package/es/ele-toolbar/props.d.ts +10 -5
  185. package/es/ele-toolbar/props.js +2 -0
  186. package/es/ele-toolbar/style/index.js +1 -0
  187. package/es/ele-toolbar/types.d.ts +15 -0
  188. package/es/ele-tooltip/index.d.ts +22 -21
  189. package/es/ele-tooltip/index.js +25 -25
  190. package/es/ele-tooltip/props.d.ts +7 -6
  191. package/es/ele-tour/index.d.ts +4 -4
  192. package/es/ele-tour/index.js +10 -10
  193. package/es/ele-tree-select/index.d.ts +27 -27
  194. package/es/ele-tree-select/index.js +33 -30
  195. package/es/ele-tree-select/props.d.ts +12 -8
  196. package/es/ele-tree-select/props.js +3 -1
  197. package/es/ele-upload-list/components/list-item.d.ts +3 -3
  198. package/es/ele-upload-list/components/list-item.js +7 -7
  199. package/es/ele-upload-list/index.d.ts +11 -13
  200. package/es/ele-upload-list/index.js +13 -13
  201. package/es/ele-upload-list/props.d.ts +4 -3
  202. package/es/ele-upload-list/style/index.scss +4 -0
  203. package/es/ele-virtual-table/components/body-cell.d.ts +19 -35
  204. package/es/ele-virtual-table/components/body-cell.js +24 -24
  205. package/es/ele-virtual-table/components/body-row.d.ts +20 -36
  206. package/es/ele-virtual-table/components/body-row.js +21 -21
  207. package/es/ele-virtual-table/components/cell-checkbox.d.ts +4 -3
  208. package/es/ele-virtual-table/components/cell-checkbox.js +3 -3
  209. package/es/ele-virtual-table/components/cell-filter.d.ts +11 -11
  210. package/es/ele-virtual-table/components/cell-filter.js +18 -18
  211. package/es/ele-virtual-table/components/footer-row.d.ts +4 -4
  212. package/es/ele-virtual-table/components/footer-row.js +3 -3
  213. package/es/ele-virtual-table/components/header-cell.d.ts +12 -12
  214. package/es/ele-virtual-table/components/header-cell.js +15 -15
  215. package/es/ele-virtual-table/components/header-row.d.ts +12 -12
  216. package/es/ele-virtual-table/components/header-row.js +15 -15
  217. package/es/ele-virtual-table/index.d.ts +36 -35
  218. package/es/ele-virtual-table/index.js +50 -48
  219. package/es/ele-virtual-table/props.d.ts +11 -11
  220. package/es/ele-virtual-table/util.js +3 -3
  221. package/es/ele-watermark/index.d.ts +5 -4
  222. package/es/ele-watermark/index.js +1 -0
  223. package/es/ele-watermark/props.d.ts +2 -1
  224. package/es/ele-xg-player/index.d.ts +3 -3
  225. package/es/icons/SizeCompactOutlined.d.ts +2 -0
  226. package/es/icons/SizeCompactOutlined.js +34 -0
  227. package/es/icons/SizeSlackOutlined.d.ts +2 -0
  228. package/es/icons/SizeSlackOutlined.js +34 -0
  229. package/es/icons/index.d.ts +2 -0
  230. package/es/icons/index.js +46 -42
  231. package/es/lang/en_US.js +1 -0
  232. package/es/lang/zh_CN.js +1 -0
  233. package/es/lang/zh_TW.js +1 -0
  234. package/es/style/themes/default.scss +20 -13
  235. package/es/style/themes/rounded.scss +4 -9
  236. package/es/utils/core.d.ts +7 -1
  237. package/es/utils/hook.d.ts +75 -4
  238. package/es/utils/hook.js +155 -6
  239. package/lib/ele-admin-layout/index.d.ts +29 -24
  240. package/lib/ele-admin-layout/props.cjs +4 -1
  241. package/lib/ele-admin-layout/props.d.ts +15 -11
  242. package/lib/ele-admin-layout/style/index.scss +7 -2
  243. package/lib/ele-admin-layout/style/sidebar.scss +2 -0
  244. package/lib/ele-alert/index.cjs +3 -3
  245. package/lib/ele-alert/index.d.ts +15 -15
  246. package/lib/ele-alert/props.d.ts +9 -8
  247. package/lib/ele-app/components/message-body.cjs +2 -2
  248. package/lib/ele-app/components/message-body.d.ts +6 -5
  249. package/lib/ele-app/components/message-box-icon.d.ts +7 -6
  250. package/lib/ele-app/plus.d.ts +3 -0
  251. package/lib/ele-app/style/overwrite/input/index.scss +2 -0
  252. package/lib/ele-avatar-group/index.cjs +15 -15
  253. package/lib/ele-avatar-group/index.d.ts +19 -18
  254. package/lib/ele-avatar-group/props.d.ts +10 -7
  255. package/lib/ele-basic-select/index.cjs +30 -23
  256. package/lib/ele-basic-select/index.d.ts +22 -19
  257. package/lib/ele-basic-select/props.cjs +3 -1
  258. package/lib/ele-basic-select/props.d.ts +11 -6
  259. package/lib/ele-basic-select/util.cjs +13 -0
  260. package/lib/ele-basic-select/util.d.ts +6 -0
  261. package/lib/ele-bottom-bar/index.d.ts +4 -4
  262. package/lib/ele-bottom-bar/props.d.ts +3 -2
  263. package/lib/ele-breadcrumb/index.d.ts +3 -3
  264. package/lib/ele-breadcrumb/props.d.ts +1 -1
  265. package/lib/ele-card/index.d.ts +14 -14
  266. package/lib/ele-card/props.d.ts +8 -6
  267. package/lib/ele-check-card/components/card-item.d.ts +3 -2
  268. package/lib/ele-check-card/index.cjs +12 -7
  269. package/lib/ele-check-card/index.d.ts +5 -5
  270. package/lib/ele-check-card/props.d.ts +3 -2
  271. package/lib/ele-config-provider/index.d.ts +4 -4
  272. package/lib/ele-config-provider/props.d.ts +3 -3
  273. package/lib/ele-config-provider/types.d.ts +1 -0
  274. package/lib/ele-copyable/index.cjs +6 -6
  275. package/lib/ele-copyable/index.d.ts +12 -12
  276. package/lib/ele-copyable/props.d.ts +7 -5
  277. package/lib/ele-count-up/index.d.ts +1 -1
  278. package/lib/ele-cropper/components/cropper-tools.cjs +10 -10
  279. package/lib/ele-cropper/components/cropper-tools.d.ts +6 -5
  280. package/lib/ele-cropper/index.cjs +39 -39
  281. package/lib/ele-cropper/index.d.ts +16 -16
  282. package/lib/ele-cropper/props.d.ts +2 -1
  283. package/lib/ele-cropper-modal/index.cjs +3 -3
  284. package/lib/ele-cropper-modal/index.d.ts +5 -5
  285. package/lib/ele-cropper-modal/props.d.ts +1 -4
  286. package/lib/ele-data-table/index.d.ts +22 -22
  287. package/lib/ele-data-table/props.d.ts +16 -16
  288. package/lib/ele-data-table/style/index.scss +1 -1
  289. package/lib/ele-data-table/types.d.ts +2 -0
  290. package/lib/ele-data-table/util.cjs +6 -2
  291. package/lib/ele-drawer/index.cjs +18 -18
  292. package/lib/ele-drawer/index.d.ts +18 -18
  293. package/lib/ele-drawer/props.d.ts +11 -10
  294. package/lib/ele-dropdown/index.cjs +54 -48
  295. package/lib/ele-dropdown/index.d.ts +24 -24
  296. package/lib/ele-dropdown/props.d.ts +13 -12
  297. package/lib/ele-dropdown/types.d.ts +2 -0
  298. package/lib/ele-edit-tag/index.cjs +10 -2
  299. package/lib/ele-edit-tag/index.d.ts +21 -19
  300. package/lib/ele-edit-tag/props.cjs +3 -1
  301. package/lib/ele-edit-tag/props.d.ts +13 -8
  302. package/lib/ele-ellipsis/index.cjs +3 -3
  303. package/lib/ele-ellipsis/index.d.ts +6 -5
  304. package/lib/ele-ellipsis/props.d.ts +1 -1
  305. package/lib/ele-file-list/components/file-grid-item.cjs +15 -15
  306. package/lib/ele-file-list/components/file-grid-item.d.ts +5 -5
  307. package/lib/ele-file-list/components/file-grid.cjs +15 -15
  308. package/lib/ele-file-list/components/file-grid.d.ts +6 -6
  309. package/lib/ele-file-list/components/file-table-item.cjs +15 -15
  310. package/lib/ele-file-list/components/file-table-item.d.ts +5 -5
  311. package/lib/ele-file-list/components/file-table.cjs +19 -19
  312. package/lib/ele-file-list/components/file-table.d.ts +7 -7
  313. package/lib/ele-file-list/index.cjs +22 -22
  314. package/lib/ele-file-list/index.d.ts +10 -10
  315. package/lib/ele-file-list-tool/index.cjs +2 -2
  316. package/lib/ele-file-list-tool/index.d.ts +1 -1
  317. package/lib/ele-icon-select/components/icon-grid.cjs +6 -6
  318. package/lib/ele-icon-select/components/icon-grid.d.ts +10 -8
  319. package/lib/ele-icon-select/index.cjs +32 -28
  320. package/lib/ele-icon-select/index.d.ts +44 -43
  321. package/lib/ele-icon-select/props.cjs +2 -0
  322. package/lib/ele-icon-select/props.d.ts +18 -14
  323. package/lib/ele-loading/index.d.ts +4 -4
  324. package/lib/ele-loading/props.d.ts +3 -2
  325. package/lib/ele-map-picker/components/map-view.cjs +1 -0
  326. package/lib/ele-map-picker/components/map-view.d.ts +26 -28
  327. package/lib/ele-map-picker/index.d.ts +10 -10
  328. package/lib/ele-map-picker/props.d.ts +6 -5
  329. package/lib/ele-map-picker/style/index.scss +1 -1
  330. package/lib/ele-menus/index.cjs +15 -15
  331. package/lib/ele-menus/index.d.ts +2 -2
  332. package/lib/ele-menus/props.d.ts +1 -1
  333. package/lib/ele-menus/style/index.scss +5 -0
  334. package/lib/ele-menus/util.cjs +49 -26
  335. package/lib/ele-menus/util.d.ts +7 -0
  336. package/lib/ele-modal/index.cjs +46 -80
  337. package/lib/ele-modal/index.d.ts +30 -29
  338. package/lib/ele-modal/props.d.ts +14 -13
  339. package/lib/ele-modal/util.cjs +235 -132
  340. package/lib/ele-modal/util.d.ts +31 -24
  341. package/lib/ele-pagination/index.cjs +9 -8
  342. package/lib/ele-pagination/index.d.ts +20 -8
  343. package/lib/ele-pagination/props.d.ts +8 -2
  344. package/lib/ele-pagination/style/index.scss +70 -0
  345. package/lib/ele-popconfirm/index.cjs +15 -15
  346. package/lib/ele-popconfirm/index.d.ts +37 -47
  347. package/lib/ele-popconfirm/props.d.ts +18 -21
  348. package/lib/ele-popover/index.cjs +15 -15
  349. package/lib/ele-popover/index.d.ts +27 -37
  350. package/lib/ele-popover/props.cjs +1 -0
  351. package/lib/ele-popover/props.d.ts +11 -15
  352. package/lib/ele-printer/index.cjs +17 -20
  353. package/lib/ele-printer/index.d.ts +9 -9
  354. package/lib/ele-printer/props.d.ts +6 -5
  355. package/lib/ele-printer/style/index.scss +2 -2
  356. package/lib/ele-printer/types.d.ts +0 -2
  357. package/lib/ele-printer/util.cjs +111 -77
  358. package/lib/ele-printer/util.d.ts +7 -28
  359. package/lib/ele-pro-layout/index.cjs +2 -2
  360. package/lib/ele-pro-layout/index.d.ts +44 -48
  361. package/lib/ele-pro-layout/props.cjs +1 -1
  362. package/lib/ele-pro-layout/props.d.ts +17 -15
  363. package/lib/ele-pro-table/components/table-tools.cjs +225 -149
  364. package/lib/ele-pro-table/components/table-tools.d.ts +405 -35
  365. package/lib/ele-pro-table/components/tool-column-list.cjs +63 -36
  366. package/lib/ele-pro-table/components/tool-column-list.d.ts +21 -9
  367. package/lib/ele-pro-table/components/tool-column.cjs +86 -102
  368. package/lib/ele-pro-table/components/tool-column.d.ts +31 -44
  369. package/lib/ele-pro-table/components/tool-export.cjs +220 -212
  370. package/lib/ele-pro-table/components/tool-export.d.ts +37 -34
  371. package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
  372. package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
  373. package/lib/ele-pro-table/components/tool-print.cjs +377 -366
  374. package/lib/ele-pro-table/components/tool-print.d.ts +47 -43
  375. package/lib/ele-pro-table/index.cjs +100 -73
  376. package/lib/ele-pro-table/index.d.ts +1020 -81
  377. package/lib/ele-pro-table/props.cjs +4 -2
  378. package/lib/ele-pro-table/props.d.ts +18 -19
  379. package/lib/ele-pro-table/style/index.scss +44 -12
  380. package/lib/ele-pro-table/types.d.ts +54 -0
  381. package/lib/ele-pro-table/util.cjs +186 -94
  382. package/lib/ele-pro-table/util.d.ts +84 -34
  383. package/lib/ele-qr-code/components/canvas-render.cjs +146 -0
  384. package/lib/ele-qr-code/components/canvas-render.d.ts +67 -0
  385. package/lib/ele-qr-code/index.cjs +32 -135
  386. package/lib/ele-qr-code/index.d.ts +5 -9
  387. package/lib/ele-qr-code/props.cjs +3 -1
  388. package/lib/ele-qr-code/props.d.ts +5 -2
  389. package/lib/ele-qr-code/types.d.ts +5 -0
  390. package/lib/ele-qr-code-svg/index.cjs +10 -13
  391. package/lib/ele-qr-code-svg/index.d.ts +6 -5
  392. package/lib/ele-segmented/index.cjs +6 -3
  393. package/lib/ele-segmented/index.d.ts +1 -1
  394. package/lib/ele-split-panel/index.cjs +3 -3
  395. package/lib/ele-split-panel/index.d.ts +8 -8
  396. package/lib/ele-split-panel/props.d.ts +4 -3
  397. package/lib/ele-steps/index.d.ts +2 -2
  398. package/lib/ele-steps/props.d.ts +2 -2
  399. package/lib/ele-tab-wrap/components/tab-dropdown.cjs +3 -3
  400. package/lib/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
  401. package/lib/ele-table/index.d.ts +2 -2
  402. package/lib/ele-table/props.d.ts +2 -1
  403. package/lib/ele-table-select/index.cjs +62 -54
  404. package/lib/ele-table-select/index.d.ts +29 -27
  405. package/lib/ele-table-select/props.cjs +2 -0
  406. package/lib/ele-table-select/props.d.ts +11 -7
  407. package/lib/ele-tabs/index.cjs +132 -85
  408. package/lib/ele-tabs/index.d.ts +19 -34
  409. package/lib/ele-tabs/props.cjs +3 -1
  410. package/lib/ele-tabs/props.d.ts +10 -24
  411. package/lib/ele-tabs/style/index.scss +42 -2
  412. package/lib/ele-tabs/types.d.ts +2 -11
  413. package/lib/ele-text/index.d.ts +2 -2
  414. package/lib/ele-text/props.d.ts +2 -1
  415. package/lib/ele-tool/index.cjs +31 -31
  416. package/lib/ele-tool/index.d.ts +11 -5
  417. package/lib/ele-tool/props.cjs +3 -1
  418. package/lib/ele-tool/props.d.ts +4 -1
  419. package/lib/ele-tool/style/index.cjs +0 -1
  420. package/lib/ele-toolbar/index.cjs +42 -3
  421. package/lib/ele-toolbar/index.d.ts +3253 -7
  422. package/lib/ele-toolbar/props.cjs +2 -0
  423. package/lib/ele-toolbar/props.d.ts +10 -5
  424. package/lib/ele-toolbar/style/index.cjs +1 -0
  425. package/lib/ele-toolbar/types.d.ts +15 -0
  426. package/lib/ele-tooltip/index.cjs +25 -25
  427. package/lib/ele-tooltip/index.d.ts +22 -21
  428. package/lib/ele-tooltip/props.d.ts +7 -6
  429. package/lib/ele-tour/index.cjs +10 -10
  430. package/lib/ele-tour/index.d.ts +4 -4
  431. package/lib/ele-tree-select/index.cjs +32 -29
  432. package/lib/ele-tree-select/index.d.ts +27 -27
  433. package/lib/ele-tree-select/props.cjs +3 -1
  434. package/lib/ele-tree-select/props.d.ts +12 -8
  435. package/lib/ele-upload-list/components/list-item.cjs +7 -7
  436. package/lib/ele-upload-list/components/list-item.d.ts +3 -3
  437. package/lib/ele-upload-list/index.cjs +13 -13
  438. package/lib/ele-upload-list/index.d.ts +11 -13
  439. package/lib/ele-upload-list/props.d.ts +4 -3
  440. package/lib/ele-upload-list/style/index.scss +4 -0
  441. package/lib/ele-virtual-table/components/body-cell.cjs +24 -24
  442. package/lib/ele-virtual-table/components/body-cell.d.ts +19 -35
  443. package/lib/ele-virtual-table/components/body-row.cjs +21 -21
  444. package/lib/ele-virtual-table/components/body-row.d.ts +20 -36
  445. package/lib/ele-virtual-table/components/cell-checkbox.cjs +3 -3
  446. package/lib/ele-virtual-table/components/cell-checkbox.d.ts +4 -3
  447. package/lib/ele-virtual-table/components/cell-filter.cjs +18 -18
  448. package/lib/ele-virtual-table/components/cell-filter.d.ts +11 -11
  449. package/lib/ele-virtual-table/components/footer-row.cjs +3 -3
  450. package/lib/ele-virtual-table/components/footer-row.d.ts +4 -4
  451. package/lib/ele-virtual-table/components/header-cell.cjs +15 -15
  452. package/lib/ele-virtual-table/components/header-cell.d.ts +12 -12
  453. package/lib/ele-virtual-table/components/header-row.cjs +15 -15
  454. package/lib/ele-virtual-table/components/header-row.d.ts +12 -12
  455. package/lib/ele-virtual-table/index.cjs +50 -48
  456. package/lib/ele-virtual-table/index.d.ts +36 -35
  457. package/lib/ele-virtual-table/props.d.ts +11 -11
  458. package/lib/ele-virtual-table/util.cjs +3 -3
  459. package/lib/ele-watermark/index.cjs +1 -0
  460. package/lib/ele-watermark/index.d.ts +5 -4
  461. package/lib/ele-watermark/props.d.ts +2 -1
  462. package/lib/ele-xg-player/index.d.ts +3 -3
  463. package/lib/icons/SizeCompactOutlined.cjs +33 -0
  464. package/lib/icons/SizeCompactOutlined.d.ts +2 -0
  465. package/lib/icons/SizeSlackOutlined.cjs +33 -0
  466. package/lib/icons/SizeSlackOutlined.d.ts +2 -0
  467. package/lib/icons/index.cjs +4 -0
  468. package/lib/icons/index.d.ts +2 -0
  469. package/lib/lang/en_US.cjs +1 -0
  470. package/lib/lang/zh_CN.cjs +1 -0
  471. package/lib/lang/zh_TW.cjs +1 -0
  472. package/lib/style/themes/default.scss +20 -13
  473. package/lib/style/themes/rounded.scss +4 -9
  474. package/lib/utils/core.d.ts +7 -1
  475. package/lib/utils/hook.cjs +154 -5
  476. package/lib/utils/hook.d.ts +75 -4
  477. package/package.json +14 -13
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, createVNode, createCommentVNode, normalizeClass } from "vue";
2
2
  import VueDraggable from "vuedraggable";
3
- import { ElCheckbox, ElIcon } from "element-plus";
3
+ import { ElCheckbox, ElIcon, ElInput } from "element-plus";
4
4
  import { HolderOutlined, VerticalRightOutlined, VerticalLeftOutlined } from "../../icons";
5
5
  const _sfc_main = defineComponent({
6
6
  name: "ToolColumnList",
@@ -8,6 +8,7 @@ const _sfc_main = defineComponent({
8
8
  VueDraggable,
9
9
  ElCheckbox,
10
10
  ElIcon,
11
+ ElInput,
11
12
  HolderOutlined,
12
13
  VerticalRightOutlined,
13
14
  VerticalLeftOutlined
@@ -20,7 +21,11 @@ const _sfc_main = defineComponent({
20
21
  /** 是否开启列拖拽排序 */
21
22
  sortable: Boolean,
22
23
  /** 是否开启开关固定列 */
23
- allowFixed: Boolean
24
+ allowFixed: Boolean,
25
+ /** 是否开启列宽设置 */
26
+ allowWidth: Boolean,
27
+ /** 列宽输入框提示文本 */
28
+ columnWidthPlaceholder: String
24
29
  },
25
30
  emits: {
26
31
  sortChange: (_colItems, _parent) => true,
@@ -28,46 +33,51 @@ const _sfc_main = defineComponent({
28
33
  fixedLeft: (_item) => true,
29
34
  fixedRight: (_item) => true,
30
35
  fixedLeftTooltip: (_el) => true,
31
- fixedRightTooltip: (_el) => true
36
+ fixedRightTooltip: (_el) => true,
37
+ colWidthChange: (_item, _width) => true
32
38
  },
33
39
  setup(props, { emit }) {
34
- const onSortChange = (colItems) => {
35
- onChildSortChange(colItems, props.parent);
40
+ const handleSortChange = (colItems) => {
41
+ handleChildSortChange(colItems, props.parent);
36
42
  };
37
- const onCheckedChange = (colItem, checked) => {
43
+ const handleCheckedChange = (colItem, checked) => {
38
44
  emit("checkedChange", colItem, checked);
39
45
  };
40
- const onFixedLeft = (colItem) => {
46
+ const handleFixedLeft = (colItem) => {
41
47
  emit("fixedLeft", colItem);
42
48
  };
43
- const onFixedRight = (colItem) => {
49
+ const handleFixedRight = (colItem) => {
44
50
  emit("fixedRight", colItem);
45
51
  };
46
- const onFixedLeftTooltip = (e) => {
47
- onChildFixedLeftTooltip(e.currentTarget);
52
+ const handleFixedLeftTooltip = (e) => {
53
+ handleChildFixedLeftTooltip(e.currentTarget);
48
54
  };
49
- const onFixedRightTooltip = (e) => {
50
- onChildFixedRightTooltip(e.currentTarget);
55
+ const handleFixedRightTooltip = (e) => {
56
+ handleChildFixedRightTooltip(e.currentTarget);
51
57
  };
52
- const onChildSortChange = (colItems, parent) => {
58
+ const handleChildSortChange = (colItems, parent) => {
53
59
  emit("sortChange", colItems, parent);
54
60
  };
55
- const onChildFixedLeftTooltip = (el) => {
61
+ const handleChildFixedLeftTooltip = (el) => {
56
62
  emit("fixedLeftTooltip", el);
57
63
  };
58
- const onChildFixedRightTooltip = (el) => {
64
+ const handleChildFixedRightTooltip = (el) => {
59
65
  emit("fixedRightTooltip", el);
60
66
  };
67
+ const handleColWidthChange = (item, width) => {
68
+ emit("colWidthChange", item, width);
69
+ };
61
70
  return {
62
- onSortChange,
63
- onCheckedChange,
64
- onFixedLeft,
65
- onFixedRight,
66
- onFixedLeftTooltip,
67
- onFixedRightTooltip,
68
- onChildSortChange,
69
- onChildFixedLeftTooltip,
70
- onChildFixedRightTooltip
71
+ handleSortChange,
72
+ handleCheckedChange,
73
+ handleFixedLeft,
74
+ handleFixedRight,
75
+ handleFixedLeftTooltip,
76
+ handleFixedRightTooltip,
77
+ handleChildSortChange,
78
+ handleChildFixedLeftTooltip,
79
+ handleChildFixedRightTooltip,
80
+ handleColWidthChange
71
81
  };
72
82
  }
73
83
  });
@@ -91,12 +101,17 @@ const _hoisted_5 = {
91
101
  };
92
102
  const _hoisted_6 = ["onClick"];
93
103
  const _hoisted_7 = ["onClick"];
104
+ const _hoisted_8 = {
105
+ key: 2,
106
+ class: "ele-tool-column-input"
107
+ };
94
108
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
95
109
  const _component_HolderOutlined = resolveComponent("HolderOutlined");
96
110
  const _component_ElIcon = resolveComponent("ElIcon");
97
111
  const _component_ElCheckbox = resolveComponent("ElCheckbox");
98
112
  const _component_VerticalRightOutlined = resolveComponent("VerticalRightOutlined");
99
113
  const _component_VerticalLeftOutlined = resolveComponent("VerticalLeftOutlined");
114
+ const _component_ElInput = resolveComponent("ElInput");
100
115
  const _component_ToolColumnList = resolveComponent("ToolColumnList", true);
101
116
  const _component_VueDraggable = resolveComponent("VueDraggable");
102
117
  return openBlock(), createBlock(_component_VueDraggable, {
@@ -107,7 +122,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
122
  handle: ".ele-tool-column-handle",
108
123
  componentData: { class: "ele-tool-column-list" },
109
124
  forceFallback: true,
110
- "onUpdate:modelValue": _ctx.onSortChange
125
+ "onUpdate:modelValue": _ctx.handleSortChange
111
126
  }, {
112
127
  item: withCtx(({ element: d }) => [
113
128
  createElementVNode("div", _hoisted_1, [
@@ -124,7 +139,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
124
139
  createVNode(_component_ElCheckbox, {
125
140
  label: d.label,
126
141
  modelValue: d.checked,
127
- "onUpdate:modelValue": (v) => _ctx.onCheckedChange(d, v)
142
+ "onUpdate:modelValue": (v) => _ctx.handleCheckedChange(d, v)
128
143
  }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])
129
144
  ]),
130
145
  _ctx.allowFixed ? (openBlock(), createElementBlock("div", _hoisted_5, [
@@ -133,8 +148,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
148
  "ele-tool-column-fixed-item",
134
149
  { "is-active": d.fixed === true || d.fixed === "left" }
135
150
  ]),
136
- onClick: ($event) => _ctx.onFixedLeft(d),
137
- onMouseover: _cache[0] || (_cache[0] = (...args) => _ctx.onFixedLeftTooltip && _ctx.onFixedLeftTooltip(...args))
151
+ onClick: ($event) => _ctx.handleFixedLeft(d),
152
+ onMouseover: _cache[0] || (_cache[0] = (...args) => _ctx.handleFixedLeftTooltip && _ctx.handleFixedLeftTooltip(...args))
138
153
  }, [
139
154
  createVNode(_component_ElIcon, null, {
140
155
  default: withCtx(() => [
@@ -148,8 +163,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
148
163
  "ele-tool-column-fixed-item",
149
164
  { "is-active": d.fixed === "right" }
150
165
  ]),
151
- onClick: ($event) => _ctx.onFixedRight(d),
152
- onMouseover: _cache[1] || (_cache[1] = (...args) => _ctx.onFixedRightTooltip && _ctx.onFixedRightTooltip(...args))
166
+ onClick: ($event) => _ctx.handleFixedRight(d),
167
+ onMouseover: _cache[1] || (_cache[1] = (...args) => _ctx.handleFixedRightTooltip && _ctx.handleFixedRightTooltip(...args))
153
168
  }, [
154
169
  createVNode(_component_ElIcon, null, {
155
170
  default: withCtx(() => [
@@ -158,6 +173,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
173
  _: 1
159
174
  })
160
175
  ], 42, _hoisted_7)
176
+ ])) : createCommentVNode("", true),
177
+ _ctx.allowWidth ? (openBlock(), createElementBlock("div", _hoisted_8, [
178
+ createVNode(_component_ElInput, {
179
+ size: "small",
180
+ maxlength: 12,
181
+ modelValue: d.width,
182
+ placeholder: _ctx.columnWidthPlaceholder,
183
+ "onUpdate:modelValue": (v) => _ctx.handleColWidthChange(d, v)
184
+ }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
161
185
  ])) : createCommentVNode("", true)
162
186
  ]),
163
187
  d.children && d.children.length ? (openBlock(), createBlock(_component_ToolColumnList, {
@@ -165,13 +189,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
165
189
  data: d.children,
166
190
  parent: d,
167
191
  sortable: _ctx.sortable,
168
- onSortChange: _ctx.onChildSortChange,
169
- onCheckedChange: _ctx.onCheckedChange,
170
- onFixedLeft: _ctx.onFixedLeft,
171
- onFixedRight: _ctx.onFixedRight,
172
- onFixedLeftTooltip: _ctx.onChildFixedLeftTooltip,
173
- onFixedRightTooltip: _ctx.onChildFixedRightTooltip
174
- }, null, 8, ["data", "parent", "sortable", "onSortChange", "onCheckedChange", "onFixedLeft", "onFixedRight", "onFixedLeftTooltip", "onFixedRightTooltip"])) : createCommentVNode("", true)
192
+ allowWidth: _ctx.allowWidth,
193
+ columnWidthPlaceholder: _ctx.columnWidthPlaceholder,
194
+ onSortChange: _ctx.handleChildSortChange,
195
+ onCheckedChange: _ctx.handleCheckedChange,
196
+ onFixedLeft: _ctx.handleFixedLeft,
197
+ onFixedRight: _ctx.handleFixedRight,
198
+ onFixedLeftTooltip: _ctx.handleChildFixedLeftTooltip,
199
+ onFixedRightTooltip: _ctx.handleChildFixedRightTooltip,
200
+ onColWidthChange: _ctx.handleColWidthChange
201
+ }, null, 8, ["data", "parent", "sortable", "allowWidth", "columnWidthPlaceholder", "onSortChange", "onCheckedChange", "onFixedLeft", "onFixedRight", "onFixedLeftTooltip", "onFixedRightTooltip", "onColWidthChange"])) : createCommentVNode("", true)
175
202
  ])
176
203
  ]),
177
204
  _: 1
@@ -1,22 +1,16 @@
1
1
  import { PropType } from 'vue';
2
+ import { EleToolInstance, EleTooltipProps } from '../../ele-app/plus';
2
3
  import { Columns } from '../../ele-data-table/types';
3
- import { ColItem } from '../types';
4
+ import { ColItem, TableLocale } from '../types';
4
5
 
5
6
  declare const _default: import('vue').DefineComponent<{
6
- /** 提示文字 */
7
- title: StringConstructor;
8
7
  /** 提示位置 */
9
- placement: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, import('element-plus').Placement, unknown> | undefined>;
10
- /** 全选文字 */
11
- checkAllText: StringConstructor;
12
- /** 重置文字 */
13
- resetText: StringConstructor;
14
- /** 无标题列文字 */
15
- untitledText: StringConstructor;
16
- /** 固定在左侧文字 */
17
- fixedLeftText: StringConstructor;
18
- /** 固定在右侧文字 */
19
- fixedRightText: StringConstructor;
8
+ placement: PropType<EleTooltipProps["placement"]>;
9
+ /** 表格国际化 */
10
+ locale: {
11
+ type: PropType<TableLocale>;
12
+ required: true;
13
+ };
20
14
  /** 列数据 */
21
15
  columns: PropType<Columns>;
22
16
  /** 是否开启列拖拽排序 */
@@ -26,43 +20,36 @@ declare const _default: import('vue').DefineComponent<{
26
20
  /** 列配置缓存本地的名称 */
27
21
  cacheKey: StringConstructor;
28
22
  }, {
29
- data: import('vue').Ref<{
23
+ toolRef: import('vue').Ref<EleToolInstance>;
24
+ colItems: import('vue').Ref<{
30
25
  uid: string;
31
- label?: string | undefined;
32
- checked?: boolean | undefined;
33
- fixed?: string | boolean | undefined;
26
+ label?: string;
27
+ checked?: boolean;
28
+ fixed?: boolean | string;
34
29
  children?: any[] | undefined;
35
- type?: string | undefined;
30
+ type?: string;
31
+ width?: number | string;
36
32
  }[]>;
37
33
  isCheckAll: import('vue').Ref<boolean>;
38
34
  isIndeterminate: import('vue').Ref<boolean>;
39
- tooltipContent: import('vue').Ref<string>;
40
- virtualRef: import('vue').Ref<any>;
41
- onCheckedChange: (item: ColItem, checked: boolean) => void;
42
- onCheckAllChange: (checked: boolean) => void;
43
- onReset: () => void;
44
- onSortChange: (colItems: ColItem[], parent?: ColItem) => void;
45
- onFixedLeft: (colItem: ColItem) => void;
46
- onFixedRight: (colItem: ColItem) => void;
47
- onFixedLeftTooltip: (el: HTMLElement) => void;
48
- onFixedRightTooltip: (el: HTMLElement) => void;
35
+ handleCheckedChange: (item: ColItem, checked: boolean) => void;
36
+ handleCheckAllChange: (checked: boolean) => void;
37
+ handleReset: () => void;
38
+ handleSortChange: (items: ColItem[], parent?: ColItem) => void;
39
+ handleFixedLeft: (colItem: ColItem) => void;
40
+ handleFixedRight: (colItem: ColItem) => void;
41
+ handleFixedLeftTooltip: (el: HTMLElement) => void;
42
+ handleFixedRightTooltip: (el: HTMLElement) => void;
49
43
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
50
- 'update:columns': (_columns: Columns) => true;
44
+ 'update:columns': (_columns: Columns, _tableColumns: Columns) => true;
51
45
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
52
- /** 提示文字 */
53
- title: StringConstructor;
54
46
  /** 提示位置 */
55
- placement: PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, import('element-plus').Placement, unknown> | undefined>;
56
- /** 全选文字 */
57
- checkAllText: StringConstructor;
58
- /** 重置文字 */
59
- resetText: StringConstructor;
60
- /** 无标题列文字 */
61
- untitledText: StringConstructor;
62
- /** 固定在左侧文字 */
63
- fixedLeftText: StringConstructor;
64
- /** 固定在右侧文字 */
65
- fixedRightText: StringConstructor;
47
+ placement: PropType<EleTooltipProps["placement"]>;
48
+ /** 表格国际化 */
49
+ locale: {
50
+ type: PropType<TableLocale>;
51
+ required: true;
52
+ };
66
53
  /** 列数据 */
67
54
  columns: PropType<Columns>;
68
55
  /** 是否开启列拖拽排序 */
@@ -72,7 +59,7 @@ declare const _default: import('vue').DefineComponent<{
72
59
  /** 列配置缓存本地的名称 */
73
60
  cacheKey: StringConstructor;
74
61
  }>> & {
75
- "onUpdate:columns"?: ((_columns: Columns) => any) | undefined;
62
+ "onUpdate:columns"?: ((_columns: Columns, _tableColumns: Columns) => any) | undefined;
76
63
  }, {
77
64
  sortable: boolean;
78
65
  allowFixed: boolean;
@@ -4,33 +4,26 @@ import { SettingOutlined } from "../../icons";
4
4
  import { eachTree } from "../../utils/core";
5
5
  import EleTooltip from "../../ele-tooltip/index";
6
6
  import EleTool from "../../ele-tool/index";
7
- import { getSettingCols, getCheckedColumns, getColsCacheKey } from "../util";
7
+ import { getColItems, columnsSettingFilter, getCacheCols, getColsCacheKey, getCacheColsWidth, getCheckedColumns } from "../util";
8
8
  import ToolColumnList from "./tool-column-list";
9
9
  const _sfc_main = defineComponent({
10
10
  name: "ToolColumn",
11
11
  components: {
12
12
  ElCheckbox,
13
13
  ElIcon,
14
- EleTooltip,
15
14
  SettingOutlined,
15
+ EleTooltip,
16
16
  EleTool,
17
17
  ToolColumnList
18
18
  },
19
19
  props: {
20
- /** 提示文字 */
21
- title: String,
22
20
  /** 提示位置 */
23
21
  placement: String,
24
- /** 全选文字 */
25
- checkAllText: String,
26
- /** 重置文字 */
27
- resetText: String,
28
- /** 无标题列文字 */
29
- untitledText: String,
30
- /** 固定在左侧文字 */
31
- fixedLeftText: String,
32
- /** 固定在右侧文字 */
33
- fixedRightText: String,
22
+ /** 表格国际化 */
23
+ locale: {
24
+ type: Object,
25
+ required: true
26
+ },
34
27
  /** 列数据 */
35
28
  columns: Array,
36
29
  /** 是否开启列拖拽排序 */
@@ -41,50 +34,51 @@ const _sfc_main = defineComponent({
41
34
  cacheKey: String
42
35
  },
43
36
  emits: {
44
- "update:columns": (_columns) => true
37
+ "update:columns": (_columns, _tableColumns) => true
45
38
  },
46
39
  setup(props, { emit }) {
47
- const data = ref([]);
40
+ const toolRef = ref(null);
41
+ const colItems = ref([]);
48
42
  const isCheckAll = ref(false);
49
43
  const isIndeterminate = ref(false);
50
- const tooltipContent = ref("");
51
- const virtualRef = ref();
52
- const initData = () => {
53
- const cols = getSettingCols(
44
+ const initColItems = () => {
45
+ const { cols, checkAll, indeterminate } = getColItems(
54
46
  props.columns,
55
- props.untitledText,
56
- props.cacheKey
47
+ props.locale,
48
+ columnsSettingFilter,
49
+ getCacheCols(getColsCacheKey(props.cacheKey))
57
50
  );
58
- data.value = cols;
59
- let checkAll = true;
60
- let indeterminate = false;
61
- eachTree(data.value, (d) => {
62
- if (!d.checked && checkAll) {
63
- checkAll = false;
64
- }
65
- if (d.checked && !indeterminate) {
66
- indeterminate = true;
67
- }
68
- if (!checkAll && indeterminate) {
69
- return false;
70
- }
71
- });
72
- isCheckAll.value = data.value.length > 0 && checkAll;
73
- isIndeterminate.value = !checkAll && indeterminate;
51
+ colItems.value = cols;
52
+ isCheckAll.value = checkAll;
53
+ isIndeterminate.value = indeterminate;
74
54
  };
75
55
  const updateColumns = () => {
56
+ const colsWidth = getCacheColsWidth(props.cacheKey);
76
57
  const columns = getCheckedColumns(
77
58
  props.columns,
78
- data.value,
79
- props.sortable
59
+ colItems.value,
60
+ props.sortable,
61
+ (item) => item.hideInSetting,
62
+ void 0,
63
+ false,
64
+ colsWidth
80
65
  );
81
- emit("update:columns", columns);
66
+ const tableColumns = getCheckedColumns(
67
+ props.columns,
68
+ colItems.value,
69
+ props.sortable,
70
+ (item) => item.hideInSetting,
71
+ void 0,
72
+ true,
73
+ colsWidth
74
+ );
75
+ emit("update:columns", columns, tableColumns);
82
76
  };
83
77
  const cacheSettingCols = () => {
84
78
  if (props.cacheKey) {
85
79
  localStorage.setItem(
86
80
  getColsCacheKey(props.cacheKey),
87
- JSON.stringify(data.value)
81
+ JSON.stringify(colItems.value)
88
82
  );
89
83
  }
90
84
  };
@@ -93,10 +87,10 @@ const _sfc_main = defineComponent({
93
87
  localStorage.removeItem(getColsCacheKey(props.cacheKey));
94
88
  }
95
89
  };
96
- const onCheckedChange = (item, checked) => {
90
+ const handleCheckedChange = (item, checked) => {
97
91
  let checkAll = true;
98
92
  let indeterminate = false;
99
- eachTree(data.value, (d) => {
93
+ eachTree(colItems.value, (d) => {
100
94
  if (d.uid === item.uid) {
101
95
  d.checked = checked;
102
96
  }
@@ -110,15 +104,15 @@ const _sfc_main = defineComponent({
110
104
  return false;
111
105
  }
112
106
  });
113
- isCheckAll.value = data.value.length > 0 && checkAll;
107
+ isCheckAll.value = colItems.value.length > 0 && checkAll;
114
108
  isIndeterminate.value = !checkAll && indeterminate;
115
109
  cacheSettingCols();
116
110
  updateColumns();
117
111
  };
118
- const onCheckAllChange = (checked) => {
112
+ const handleCheckAllChange = (checked) => {
119
113
  isCheckAll.value = checked;
120
114
  isIndeterminate.value = false;
121
- eachTree(data.value, (d) => {
115
+ eachTree(colItems.value, (d) => {
122
116
  if (d.checked !== checked) {
123
117
  d.checked = checked;
124
118
  }
@@ -126,18 +120,13 @@ const _sfc_main = defineComponent({
126
120
  cacheSettingCols();
127
121
  updateColumns();
128
122
  };
129
- const onReset = () => {
130
- cleanSettingCols();
131
- initData();
132
- updateColumns();
133
- };
134
- const onSortChange = (colItems, parent) => {
123
+ const handleSortChange = (items, parent) => {
135
124
  if (!parent) {
136
- data.value = colItems;
125
+ colItems.value = items;
137
126
  } else {
138
- eachTree(data.value, (d) => {
127
+ eachTree(colItems.value, (d) => {
139
128
  if (d.uid === parent.uid) {
140
- d.children = colItems;
129
+ d.children = items;
141
130
  return false;
142
131
  }
143
132
  });
@@ -145,8 +134,8 @@ const _sfc_main = defineComponent({
145
134
  cacheSettingCols();
146
135
  updateColumns();
147
136
  };
148
- const onFixedLeft = (colItem) => {
149
- eachTree(data.value, (d) => {
137
+ const handleFixedLeft = (colItem) => {
138
+ eachTree(colItems.value, (d) => {
150
139
  if (d.uid === colItem.uid) {
151
140
  d.fixed = d.fixed === true || d.fixed === "left" ? false : "left";
152
141
  return false;
@@ -155,8 +144,8 @@ const _sfc_main = defineComponent({
155
144
  cacheSettingCols();
156
145
  updateColumns();
157
146
  };
158
- const onFixedRight = (colItem) => {
159
- eachTree(data.value, (d) => {
147
+ const handleFixedRight = (colItem) => {
148
+ eachTree(colItems.value, (d) => {
160
149
  if (d.uid === colItem.uid) {
161
150
  d.fixed = d.fixed === "right" ? false : "right";
162
151
  return false;
@@ -165,35 +154,37 @@ const _sfc_main = defineComponent({
165
154
  cacheSettingCols();
166
155
  updateColumns();
167
156
  };
168
- const onFixedLeftTooltip = (el) => {
169
- virtualRef.value = el;
170
- tooltipContent.value = props.fixedLeftText ?? "";
157
+ const handleFixedLeftTooltip = (el) => {
158
+ toolRef.value && toolRef.value.showTooltip(props.locale.columnFixedLeft ?? "", el);
159
+ };
160
+ const handleFixedRightTooltip = (el) => {
161
+ toolRef.value && toolRef.value.showTooltip(props.locale.columnFixedRight ?? "", el);
171
162
  };
172
- const onFixedRightTooltip = (el) => {
173
- virtualRef.value = el;
174
- tooltipContent.value = props.fixedRightText ?? "";
163
+ const handleReset = () => {
164
+ cleanSettingCols();
165
+ initColItems();
166
+ updateColumns();
175
167
  };
176
168
  watch(
177
- [() => props.columns, () => props.untitledText],
169
+ [() => props.columns, () => props.locale],
178
170
  () => {
179
- initData();
171
+ initColItems();
180
172
  },
181
173
  { immediate: true, deep: true }
182
174
  );
183
175
  return {
184
- data,
176
+ toolRef,
177
+ colItems,
185
178
  isCheckAll,
186
179
  isIndeterminate,
187
- tooltipContent,
188
- virtualRef,
189
- onCheckedChange,
190
- onCheckAllChange,
191
- onReset,
192
- onSortChange,
193
- onFixedLeft,
194
- onFixedRight,
195
- onFixedLeftTooltip,
196
- onFixedRightTooltip
180
+ handleCheckedChange,
181
+ handleCheckAllChange,
182
+ handleReset,
183
+ handleSortChange,
184
+ handleFixedLeft,
185
+ handleFixedRight,
186
+ handleFixedLeftTooltip,
187
+ handleFixedRightTooltip
197
188
  };
198
189
  }
199
190
  });
@@ -214,8 +205,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
214
205
  const _component_EleTooltip = resolveComponent("EleTooltip");
215
206
  const _component_EleTool = resolveComponent("EleTool");
216
207
  return openBlock(), createBlock(_component_EleTool, {
217
- title: _ctx.title,
218
- placement: _ctx.placement
208
+ ref: "toolRef",
209
+ title: _ctx.locale.columns,
210
+ placement: _ctx.placement,
211
+ clickHideTooltip: true
219
212
  }, {
220
213
  default: withCtx(() => [
221
214
  createVNode(_component_EleTooltip, {
@@ -242,39 +235,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
242
235
  createElementVNode("div", _hoisted_1, [
243
236
  createElementVNode("div", _hoisted_2, [
244
237
  createVNode(_component_ElCheckbox, {
245
- label: _ctx.checkAllText,
238
+ label: _ctx.locale.columnTitle,
246
239
  modelValue: _ctx.isCheckAll,
247
240
  indeterminate: _ctx.isIndeterminate,
248
- "onUpdate:modelValue": _ctx.onCheckAllChange
241
+ "onUpdate:modelValue": _ctx.handleCheckAllChange
249
242
  }, null, 8, ["label", "modelValue", "indeterminate", "onUpdate:modelValue"])
250
243
  ]),
251
244
  createElementVNode("div", {
252
245
  class: "ele-tool-column-link",
253
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onReset && _ctx.onReset(...args))
254
- }, toDisplayString(_ctx.resetText), 1)
246
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))
247
+ }, toDisplayString(_ctx.locale.columnReset), 1)
255
248
  ]),
256
- _ctx.data.length ? (openBlock(), createBlock(_component_ToolColumnList, {
249
+ _ctx.colItems.length ? (openBlock(), createBlock(_component_ToolColumnList, {
257
250
  key: 0,
258
- data: _ctx.data,
251
+ data: _ctx.colItems,
259
252
  sortable: _ctx.sortable,
260
253
  allowFixed: _ctx.allowFixed,
261
- onSortChange: _ctx.onSortChange,
262
- onCheckedChange: _ctx.onCheckedChange,
263
- onFixedLeft: _ctx.onFixedLeft,
264
- onFixedRight: _ctx.onFixedRight,
265
- onFixedLeftTooltip: _ctx.onFixedLeftTooltip,
266
- onFixedRightTooltip: _ctx.onFixedRightTooltip
254
+ onSortChange: _ctx.handleSortChange,
255
+ onCheckedChange: _ctx.handleCheckedChange,
256
+ onFixedLeft: _ctx.handleFixedLeft,
257
+ onFixedRight: _ctx.handleFixedRight,
258
+ onFixedLeftTooltip: _ctx.handleFixedLeftTooltip,
259
+ onFixedRightTooltip: _ctx.handleFixedRightTooltip
267
260
  }, null, 8, ["data", "sortable", "allowFixed", "onSortChange", "onCheckedChange", "onFixedLeft", "onFixedRight", "onFixedLeftTooltip", "onFixedRightTooltip"])) : createCommentVNode("", true)
268
- ], 2),
269
- createVNode(_component_EleTooltip, {
270
- trigger: "hover",
271
- placement: "top",
272
- teleported: false,
273
- persistent: false,
274
- virtualTriggering: true,
275
- virtualRef: _ctx.virtualRef,
276
- content: _ctx.tooltipContent
277
- }, null, 8, ["virtualRef", "content"])
261
+ ], 2)
278
262
  ]),
279
263
  default: withCtx(() => [
280
264
  createVNode(_component_ElIcon, null, {