ele-admin-plus 1.2.1-beta.2 → 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 (357) hide show
  1. package/es/ele-admin-layout/index.d.ts +26 -30
  2. package/es/ele-admin-layout/props.d.ts +11 -10
  3. package/es/ele-alert/index.d.ts +14 -14
  4. package/es/ele-alert/props.d.ts +9 -8
  5. package/es/ele-app/components/message-body.d.ts +5 -4
  6. package/es/ele-app/components/message-box-icon.d.ts +7 -6
  7. package/es/ele-app/style/overwrite/input/index.scss +2 -0
  8. package/es/ele-avatar-group/index.d.ts +15 -14
  9. package/es/ele-avatar-group/props.d.ts +10 -7
  10. package/es/ele-basic-select/index.d.ts +17 -14
  11. package/es/ele-basic-select/index.js +14 -7
  12. package/es/ele-basic-select/props.d.ts +11 -6
  13. package/es/ele-basic-select/props.js +3 -1
  14. package/es/ele-basic-select/util.d.ts +6 -0
  15. package/es/ele-basic-select/util.js +13 -0
  16. package/es/ele-bottom-bar/index.d.ts +4 -4
  17. package/es/ele-bottom-bar/props.d.ts +3 -2
  18. package/es/ele-breadcrumb/index.d.ts +3 -3
  19. package/es/ele-breadcrumb/props.d.ts +1 -1
  20. package/es/ele-card/index.d.ts +14 -14
  21. package/es/ele-card/props.d.ts +8 -6
  22. package/es/ele-check-card/components/card-item.d.ts +3 -2
  23. package/es/ele-check-card/index.d.ts +4 -4
  24. package/es/ele-check-card/index.js +8 -3
  25. package/es/ele-check-card/props.d.ts +3 -2
  26. package/es/ele-config-provider/index.d.ts +4 -4
  27. package/es/ele-config-provider/props.d.ts +3 -3
  28. package/es/ele-config-provider/types.d.ts +1 -0
  29. package/es/ele-copyable/index.d.ts +10 -10
  30. package/es/ele-copyable/props.d.ts +7 -5
  31. package/es/ele-count-up/index.d.ts +1 -1
  32. package/es/ele-cropper/components/cropper-tools.d.ts +4 -3
  33. package/es/ele-cropper/index.d.ts +3 -3
  34. package/es/ele-cropper/props.d.ts +2 -1
  35. package/es/ele-cropper-modal/index.d.ts +4 -4
  36. package/es/ele-cropper-modal/props.d.ts +1 -4
  37. package/es/ele-data-table/index.d.ts +22 -22
  38. package/es/ele-data-table/props.d.ts +16 -16
  39. package/es/ele-data-table/style/index.scss +1 -1
  40. package/es/ele-data-table/types.d.ts +2 -0
  41. package/es/ele-data-table/util.js +5 -1
  42. package/es/ele-drawer/index.d.ts +14 -14
  43. package/es/ele-drawer/props.d.ts +11 -10
  44. package/es/ele-dropdown/index.d.ts +22 -22
  45. package/es/ele-dropdown/index.js +45 -39
  46. package/es/ele-dropdown/props.d.ts +13 -12
  47. package/es/ele-dropdown/types.d.ts +2 -0
  48. package/es/ele-edit-tag/index.d.ts +21 -19
  49. package/es/ele-edit-tag/index.js +10 -2
  50. package/es/ele-edit-tag/props.d.ts +13 -8
  51. package/es/ele-edit-tag/props.js +3 -1
  52. package/es/ele-ellipsis/index.d.ts +5 -4
  53. package/es/ele-ellipsis/props.d.ts +1 -1
  54. package/es/ele-file-list/index.d.ts +4 -4
  55. package/es/ele-icon-select/components/icon-grid.d.ts +8 -6
  56. package/es/ele-icon-select/index.d.ts +37 -36
  57. package/es/ele-icon-select/index.js +6 -2
  58. package/es/ele-icon-select/props.d.ts +18 -14
  59. package/es/ele-icon-select/props.js +2 -0
  60. package/es/ele-loading/index.d.ts +4 -4
  61. package/es/ele-loading/props.d.ts +3 -2
  62. package/es/ele-map-picker/components/map-view.d.ts +26 -28
  63. package/es/ele-map-picker/components/map-view.js +1 -0
  64. package/es/ele-map-picker/index.d.ts +10 -10
  65. package/es/ele-map-picker/props.d.ts +6 -5
  66. package/es/ele-map-picker/style/index.scss +1 -1
  67. package/es/ele-menus/index.d.ts +2 -2
  68. package/es/ele-menus/props.d.ts +1 -1
  69. package/es/ele-menus/style/index.scss +4 -0
  70. package/es/ele-modal/index.d.ts +24 -23
  71. package/es/ele-modal/index.js +30 -64
  72. package/es/ele-modal/props.d.ts +14 -13
  73. package/es/ele-modal/util.d.ts +31 -24
  74. package/es/ele-modal/util.js +235 -132
  75. package/es/ele-pagination/index.d.ts +18 -6
  76. package/es/ele-pagination/index.js +3 -2
  77. package/es/ele-pagination/props.d.ts +8 -2
  78. package/es/ele-pagination/style/index.scss +70 -0
  79. package/es/ele-popconfirm/index.d.ts +32 -32
  80. package/es/ele-popconfirm/props.d.ts +19 -17
  81. package/es/ele-popover/index.d.ts +22 -22
  82. package/es/ele-popover/props.d.ts +11 -10
  83. package/es/ele-printer/index.d.ts +8 -8
  84. package/es/ele-printer/props.d.ts +6 -5
  85. package/es/ele-printer/util.d.ts +5 -5
  86. package/es/ele-printer/util.js +68 -43
  87. package/es/ele-pro-layout/index.d.ts +43 -47
  88. package/es/ele-pro-layout/props.d.ts +16 -14
  89. package/es/ele-pro-table/components/table-tools.d.ts +402 -32
  90. package/es/ele-pro-table/components/table-tools.js +223 -140
  91. package/es/ele-pro-table/components/tool-column-list.d.ts +12 -0
  92. package/es/ele-pro-table/components/tool-column-list.js +33 -6
  93. package/es/ele-pro-table/components/tool-column.d.ts +8 -7
  94. package/es/ele-pro-table/components/tool-column.js +11 -5
  95. package/es/ele-pro-table/components/tool-export.d.ts +33 -30
  96. package/es/ele-pro-table/components/tool-export.js +204 -184
  97. package/es/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
  98. package/es/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
  99. package/es/ele-pro-table/components/tool-print.d.ts +41 -40
  100. package/es/ele-pro-table/components/tool-print.js +357 -336
  101. package/es/ele-pro-table/index.d.ts +1006 -70
  102. package/es/ele-pro-table/index.js +63 -13
  103. package/es/ele-pro-table/props.d.ts +17 -18
  104. package/es/ele-pro-table/props.js +3 -1
  105. package/es/ele-pro-table/style/index.scss +43 -12
  106. package/es/ele-pro-table/types.d.ts +54 -0
  107. package/es/ele-pro-table/util.d.ts +51 -9
  108. package/es/ele-pro-table/util.js +89 -28
  109. package/es/ele-qr-code/components/canvas-render.d.ts +67 -0
  110. package/es/ele-qr-code/components/canvas-render.js +147 -0
  111. package/es/ele-qr-code/index.d.ts +5 -9
  112. package/es/ele-qr-code/index.js +33 -136
  113. package/es/ele-qr-code/props.d.ts +5 -2
  114. package/es/ele-qr-code/props.js +3 -1
  115. package/es/ele-qr-code/types.d.ts +5 -0
  116. package/es/ele-qr-code-svg/index.d.ts +6 -5
  117. package/es/ele-qr-code-svg/index.js +11 -14
  118. package/es/ele-segmented/index.js +3 -0
  119. package/es/ele-split-panel/index.d.ts +7 -7
  120. package/es/ele-split-panel/props.d.ts +4 -3
  121. package/es/ele-steps/index.d.ts +2 -2
  122. package/es/ele-steps/props.d.ts +2 -2
  123. package/es/ele-table/index.d.ts +2 -2
  124. package/es/ele-table/props.d.ts +2 -1
  125. package/es/ele-table-select/index.d.ts +22 -20
  126. package/es/ele-table-select/index.js +5 -2
  127. package/es/ele-table-select/props.d.ts +11 -7
  128. package/es/ele-table-select/props.js +2 -0
  129. package/es/ele-tabs/index.d.ts +19 -34
  130. package/es/ele-tabs/index.js +133 -86
  131. package/es/ele-tabs/props.d.ts +10 -24
  132. package/es/ele-tabs/props.js +3 -1
  133. package/es/ele-tabs/style/index.scss +42 -2
  134. package/es/ele-tabs/types.d.ts +2 -11
  135. package/es/ele-text/index.d.ts +2 -2
  136. package/es/ele-text/props.d.ts +2 -1
  137. package/es/ele-tool/index.d.ts +5 -2
  138. package/es/ele-tool/index.js +2 -5
  139. package/es/ele-tool/props.d.ts +4 -1
  140. package/es/ele-tool/props.js +3 -1
  141. package/es/ele-tool/style/index.scss +13 -0
  142. package/es/ele-toolbar/index.d.ts +17 -17
  143. package/es/ele-toolbar/props.d.ts +4 -3
  144. package/es/ele-tooltip/index.d.ts +13 -12
  145. package/es/ele-tooltip/props.d.ts +7 -6
  146. package/es/ele-tour/index.d.ts +1 -1
  147. package/es/ele-tree-select/index.d.ts +18 -18
  148. package/es/ele-tree-select/index.js +5 -2
  149. package/es/ele-tree-select/props.d.ts +12 -8
  150. package/es/ele-tree-select/props.js +3 -1
  151. package/es/ele-upload-list/index.d.ts +7 -9
  152. package/es/ele-upload-list/props.d.ts +4 -3
  153. package/es/ele-upload-list/style/index.scss +4 -0
  154. package/es/ele-virtual-table/components/body-cell.d.ts +11 -27
  155. package/es/ele-virtual-table/components/body-row.d.ts +13 -29
  156. package/es/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
  157. package/es/ele-virtual-table/components/cell-filter.d.ts +6 -6
  158. package/es/ele-virtual-table/components/footer-row.d.ts +3 -3
  159. package/es/ele-virtual-table/components/header-cell.d.ts +7 -7
  160. package/es/ele-virtual-table/components/header-row.d.ts +7 -7
  161. package/es/ele-virtual-table/index.d.ts +20 -21
  162. package/es/ele-virtual-table/props.d.ts +11 -11
  163. package/es/ele-watermark/index.d.ts +5 -4
  164. package/es/ele-watermark/props.d.ts +2 -1
  165. package/es/ele-xg-player/index.d.ts +3 -3
  166. package/es/icons/SizeCompactOutlined.d.ts +2 -0
  167. package/es/icons/SizeCompactOutlined.js +34 -0
  168. package/es/icons/SizeSlackOutlined.d.ts +2 -0
  169. package/es/icons/SizeSlackOutlined.js +34 -0
  170. package/es/icons/index.d.ts +2 -0
  171. package/es/icons/index.js +46 -42
  172. package/es/lang/en_US.js +1 -0
  173. package/es/lang/zh_CN.js +1 -0
  174. package/es/lang/zh_TW.js +1 -0
  175. package/es/style/themes/default.scss +12 -5
  176. package/es/style/themes/rounded.scss +3 -2
  177. package/es/utils/hook.d.ts +75 -4
  178. package/es/utils/hook.js +155 -6
  179. package/lib/ele-admin-layout/index.d.ts +26 -30
  180. package/lib/ele-admin-layout/props.d.ts +11 -10
  181. package/lib/ele-alert/index.d.ts +14 -14
  182. package/lib/ele-alert/props.d.ts +9 -8
  183. package/lib/ele-app/components/message-body.d.ts +5 -4
  184. package/lib/ele-app/components/message-box-icon.d.ts +7 -6
  185. package/lib/ele-app/style/overwrite/input/index.scss +2 -0
  186. package/lib/ele-avatar-group/index.d.ts +15 -14
  187. package/lib/ele-avatar-group/props.d.ts +10 -7
  188. package/lib/ele-basic-select/index.cjs +14 -7
  189. package/lib/ele-basic-select/index.d.ts +17 -14
  190. package/lib/ele-basic-select/props.cjs +3 -1
  191. package/lib/ele-basic-select/props.d.ts +11 -6
  192. package/lib/ele-basic-select/util.cjs +13 -0
  193. package/lib/ele-basic-select/util.d.ts +6 -0
  194. package/lib/ele-bottom-bar/index.d.ts +4 -4
  195. package/lib/ele-bottom-bar/props.d.ts +3 -2
  196. package/lib/ele-breadcrumb/index.d.ts +3 -3
  197. package/lib/ele-breadcrumb/props.d.ts +1 -1
  198. package/lib/ele-card/index.d.ts +14 -14
  199. package/lib/ele-card/props.d.ts +8 -6
  200. package/lib/ele-check-card/components/card-item.d.ts +3 -2
  201. package/lib/ele-check-card/index.cjs +8 -3
  202. package/lib/ele-check-card/index.d.ts +4 -4
  203. package/lib/ele-check-card/props.d.ts +3 -2
  204. package/lib/ele-config-provider/index.d.ts +4 -4
  205. package/lib/ele-config-provider/props.d.ts +3 -3
  206. package/lib/ele-config-provider/types.d.ts +1 -0
  207. package/lib/ele-copyable/index.d.ts +10 -10
  208. package/lib/ele-copyable/props.d.ts +7 -5
  209. package/lib/ele-count-up/index.d.ts +1 -1
  210. package/lib/ele-cropper/components/cropper-tools.d.ts +4 -3
  211. package/lib/ele-cropper/index.d.ts +3 -3
  212. package/lib/ele-cropper/props.d.ts +2 -1
  213. package/lib/ele-cropper-modal/index.d.ts +4 -4
  214. package/lib/ele-cropper-modal/props.d.ts +1 -4
  215. package/lib/ele-data-table/index.d.ts +22 -22
  216. package/lib/ele-data-table/props.d.ts +16 -16
  217. package/lib/ele-data-table/style/index.scss +1 -1
  218. package/lib/ele-data-table/types.d.ts +2 -0
  219. package/lib/ele-data-table/util.cjs +5 -1
  220. package/lib/ele-drawer/index.d.ts +14 -14
  221. package/lib/ele-drawer/props.d.ts +11 -10
  222. package/lib/ele-dropdown/index.cjs +45 -39
  223. package/lib/ele-dropdown/index.d.ts +22 -22
  224. package/lib/ele-dropdown/props.d.ts +13 -12
  225. package/lib/ele-dropdown/types.d.ts +2 -0
  226. package/lib/ele-edit-tag/index.cjs +10 -2
  227. package/lib/ele-edit-tag/index.d.ts +21 -19
  228. package/lib/ele-edit-tag/props.cjs +3 -1
  229. package/lib/ele-edit-tag/props.d.ts +13 -8
  230. package/lib/ele-ellipsis/index.d.ts +5 -4
  231. package/lib/ele-ellipsis/props.d.ts +1 -1
  232. package/lib/ele-file-list/index.d.ts +4 -4
  233. package/lib/ele-icon-select/components/icon-grid.d.ts +8 -6
  234. package/lib/ele-icon-select/index.cjs +9 -5
  235. package/lib/ele-icon-select/index.d.ts +37 -36
  236. package/lib/ele-icon-select/props.cjs +2 -0
  237. package/lib/ele-icon-select/props.d.ts +18 -14
  238. package/lib/ele-loading/index.d.ts +4 -4
  239. package/lib/ele-loading/props.d.ts +3 -2
  240. package/lib/ele-map-picker/components/map-view.cjs +1 -0
  241. package/lib/ele-map-picker/components/map-view.d.ts +26 -28
  242. package/lib/ele-map-picker/index.d.ts +10 -10
  243. package/lib/ele-map-picker/props.d.ts +6 -5
  244. package/lib/ele-map-picker/style/index.scss +1 -1
  245. package/lib/ele-menus/index.d.ts +2 -2
  246. package/lib/ele-menus/props.d.ts +1 -1
  247. package/lib/ele-menus/style/index.scss +4 -0
  248. package/lib/ele-modal/index.cjs +28 -62
  249. package/lib/ele-modal/index.d.ts +24 -23
  250. package/lib/ele-modal/props.d.ts +14 -13
  251. package/lib/ele-modal/util.cjs +235 -132
  252. package/lib/ele-modal/util.d.ts +31 -24
  253. package/lib/ele-pagination/index.cjs +3 -2
  254. package/lib/ele-pagination/index.d.ts +18 -6
  255. package/lib/ele-pagination/props.d.ts +8 -2
  256. package/lib/ele-pagination/style/index.scss +70 -0
  257. package/lib/ele-popconfirm/index.d.ts +32 -32
  258. package/lib/ele-popconfirm/props.d.ts +19 -17
  259. package/lib/ele-popover/index.d.ts +22 -22
  260. package/lib/ele-popover/props.d.ts +11 -10
  261. package/lib/ele-printer/index.d.ts +8 -8
  262. package/lib/ele-printer/props.d.ts +6 -5
  263. package/lib/ele-printer/util.cjs +68 -43
  264. package/lib/ele-printer/util.d.ts +5 -5
  265. package/lib/ele-pro-layout/index.d.ts +43 -47
  266. package/lib/ele-pro-layout/props.d.ts +16 -14
  267. package/lib/ele-pro-table/components/table-tools.cjs +221 -138
  268. package/lib/ele-pro-table/components/table-tools.d.ts +402 -32
  269. package/lib/ele-pro-table/components/tool-column-list.cjs +32 -5
  270. package/lib/ele-pro-table/components/tool-column-list.d.ts +12 -0
  271. package/lib/ele-pro-table/components/tool-column.cjs +10 -4
  272. package/lib/ele-pro-table/components/tool-column.d.ts +8 -7
  273. package/lib/ele-pro-table/components/tool-export.cjs +201 -181
  274. package/lib/ele-pro-table/components/tool-export.d.ts +33 -30
  275. package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +5 -4
  276. package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +5 -4
  277. package/lib/ele-pro-table/components/tool-print.cjs +354 -333
  278. package/lib/ele-pro-table/components/tool-print.d.ts +41 -40
  279. package/lib/ele-pro-table/index.cjs +60 -10
  280. package/lib/ele-pro-table/index.d.ts +1006 -70
  281. package/lib/ele-pro-table/props.cjs +3 -1
  282. package/lib/ele-pro-table/props.d.ts +17 -18
  283. package/lib/ele-pro-table/style/index.scss +43 -12
  284. package/lib/ele-pro-table/types.d.ts +54 -0
  285. package/lib/ele-pro-table/util.cjs +89 -28
  286. package/lib/ele-pro-table/util.d.ts +51 -9
  287. package/lib/ele-qr-code/components/canvas-render.cjs +146 -0
  288. package/lib/ele-qr-code/components/canvas-render.d.ts +67 -0
  289. package/lib/ele-qr-code/index.cjs +32 -135
  290. package/lib/ele-qr-code/index.d.ts +5 -9
  291. package/lib/ele-qr-code/props.cjs +3 -1
  292. package/lib/ele-qr-code/props.d.ts +5 -2
  293. package/lib/ele-qr-code/types.d.ts +5 -0
  294. package/lib/ele-qr-code-svg/index.cjs +10 -13
  295. package/lib/ele-qr-code-svg/index.d.ts +6 -5
  296. package/lib/ele-segmented/index.cjs +3 -0
  297. package/lib/ele-split-panel/index.d.ts +7 -7
  298. package/lib/ele-split-panel/props.d.ts +4 -3
  299. package/lib/ele-steps/index.d.ts +2 -2
  300. package/lib/ele-steps/props.d.ts +2 -2
  301. package/lib/ele-table/index.d.ts +2 -2
  302. package/lib/ele-table/props.d.ts +2 -1
  303. package/lib/ele-table-select/index.cjs +20 -17
  304. package/lib/ele-table-select/index.d.ts +22 -20
  305. package/lib/ele-table-select/props.cjs +2 -0
  306. package/lib/ele-table-select/props.d.ts +11 -7
  307. package/lib/ele-tabs/index.cjs +132 -85
  308. package/lib/ele-tabs/index.d.ts +19 -34
  309. package/lib/ele-tabs/props.cjs +3 -1
  310. package/lib/ele-tabs/props.d.ts +10 -24
  311. package/lib/ele-tabs/style/index.scss +42 -2
  312. package/lib/ele-tabs/types.d.ts +2 -11
  313. package/lib/ele-text/index.d.ts +2 -2
  314. package/lib/ele-text/props.d.ts +2 -1
  315. package/lib/ele-tool/index.cjs +2 -5
  316. package/lib/ele-tool/index.d.ts +5 -2
  317. package/lib/ele-tool/props.cjs +3 -1
  318. package/lib/ele-tool/props.d.ts +4 -1
  319. package/lib/ele-tool/style/index.scss +13 -0
  320. package/lib/ele-toolbar/index.d.ts +17 -17
  321. package/lib/ele-toolbar/props.d.ts +4 -3
  322. package/lib/ele-tooltip/index.d.ts +13 -12
  323. package/lib/ele-tooltip/props.d.ts +7 -6
  324. package/lib/ele-tour/index.d.ts +1 -1
  325. package/lib/ele-tree-select/index.cjs +4 -1
  326. package/lib/ele-tree-select/index.d.ts +18 -18
  327. package/lib/ele-tree-select/props.cjs +3 -1
  328. package/lib/ele-tree-select/props.d.ts +12 -8
  329. package/lib/ele-upload-list/index.d.ts +7 -9
  330. package/lib/ele-upload-list/props.d.ts +4 -3
  331. package/lib/ele-upload-list/style/index.scss +4 -0
  332. package/lib/ele-virtual-table/components/body-cell.d.ts +11 -27
  333. package/lib/ele-virtual-table/components/body-row.d.ts +13 -29
  334. package/lib/ele-virtual-table/components/cell-checkbox.d.ts +3 -2
  335. package/lib/ele-virtual-table/components/cell-filter.d.ts +6 -6
  336. package/lib/ele-virtual-table/components/footer-row.d.ts +3 -3
  337. package/lib/ele-virtual-table/components/header-cell.d.ts +7 -7
  338. package/lib/ele-virtual-table/components/header-row.d.ts +7 -7
  339. package/lib/ele-virtual-table/index.d.ts +20 -21
  340. package/lib/ele-virtual-table/props.d.ts +11 -11
  341. package/lib/ele-watermark/index.d.ts +5 -4
  342. package/lib/ele-watermark/props.d.ts +2 -1
  343. package/lib/ele-xg-player/index.d.ts +3 -3
  344. package/lib/icons/SizeCompactOutlined.cjs +33 -0
  345. package/lib/icons/SizeCompactOutlined.d.ts +2 -0
  346. package/lib/icons/SizeSlackOutlined.cjs +33 -0
  347. package/lib/icons/SizeSlackOutlined.d.ts +2 -0
  348. package/lib/icons/index.cjs +4 -0
  349. package/lib/icons/index.d.ts +2 -0
  350. package/lib/lang/en_US.cjs +1 -0
  351. package/lib/lang/zh_CN.cjs +1 -0
  352. package/lib/lang/zh_TW.cjs +1 -0
  353. package/lib/style/themes/default.scss +12 -5
  354. package/lib/style/themes/rounded.scss +3 -2
  355. package/lib/utils/hook.cjs +154 -5
  356. package/lib/utils/hook.d.ts +75 -4
  357. package/package.json +14 -13
@@ -3,6 +3,7 @@ const vue = require("vue");
3
3
  const SortableJs = require("sortablejs");
4
4
  const elementPlus = require("element-plus");
5
5
  const core = require("../utils/core");
6
+ const hook = require("../utils/hook");
6
7
  const TabTitle = require("./components/tab-title");
7
8
  const props = require("./props");
8
9
  const _sfc_main = vue.defineComponent({
@@ -11,8 +12,25 @@ const _sfc_main = vue.defineComponent({
11
12
  props: props.tabsProps,
12
13
  emits: props.tabsEmits,
13
14
  setup(props$1, { emit }) {
15
+ const [startScrollTimer, _stopScrollTimer, scrollWaiting] = hook.useTimer(320);
16
+ let sortableIns = null;
14
17
  const wrapProps = vue.inject(props.TAB_WRAP_KEY, null);
15
- const current = { sortIns: null, isScroll: false };
18
+ const { bindMousewheel, unbindMousewheel } = hook.useMousewheel((param) => {
19
+ const { e, direction } = param;
20
+ scrollTabs(direction === "up" ? "prev" : "next", () => {
21
+ e.preventDefault();
22
+ e.stopPropagation();
23
+ });
24
+ });
25
+ const { bindTouchEvent, unbindTouchEvent } = hook.useTouchEvent({
26
+ end: (param) => {
27
+ if (param.distanceX && param.distanceX > 80) {
28
+ scrollTabs("prev");
29
+ } else if (param.distanceX && param.distanceX < 80) {
30
+ scrollTabs("next");
31
+ }
32
+ }
33
+ });
16
34
  const tabRef = vue.ref(null);
17
35
  const itemRefs = vue.ref([]);
18
36
  const isWrap = vue.computed(() => wrapProps == null);
@@ -58,7 +76,7 @@ const _sfc_main = vue.defineComponent({
58
76
  const handleItemContextOpen = (ref2) => {
59
77
  if (itemRefs.value) {
60
78
  itemRefs.value.forEach((r) => {
61
- if ((r == null ? void 0 : r.dropdownRef) && r.dropdownRef !== ref2) {
79
+ if (r && r.dropdownRef && r.dropdownRef !== ref2) {
62
80
  r.dropdownRef.handleClose();
63
81
  }
64
82
  });
@@ -74,7 +92,7 @@ const _sfc_main = vue.defineComponent({
74
92
  const hideAllDropdown = () => {
75
93
  if (itemRefs.value) {
76
94
  itemRefs.value.forEach((r) => {
77
- if (r == null ? void 0 : r.dropdownRef) {
95
+ if (r && r.dropdownRef) {
78
96
  r.dropdownRef.handleClose();
79
97
  }
80
98
  });
@@ -89,15 +107,6 @@ const _sfc_main = vue.defineComponent({
89
107
  const headerEl = getHeaderEl();
90
108
  return headerEl ? headerEl.querySelector(".el-tabs__nav") : void 0;
91
109
  };
92
- const getBtnEl = (el, e, firefox) => {
93
- const wheelDelta = e.wheelDelta || e.detail;
94
- const delta = firefox ? -wheelDelta : wheelDelta;
95
- if (delta > 0) {
96
- return el.querySelector(".el-tabs__nav-prev");
97
- } else if (delta < 0) {
98
- return el.querySelector(".el-tabs__nav-next");
99
- }
100
- };
101
110
  const updateActiveBar = () => {
102
111
  const el = getNavEl();
103
112
  if (el) {
@@ -107,13 +116,35 @@ const _sfc_main = vue.defineComponent({
107
116
  }
108
117
  }
109
118
  };
119
+ const scrollTabs = (direction, done) => {
120
+ const tabEl = getHeaderEl();
121
+ if (tabEl && !scrollWaiting.value) {
122
+ const el = tabEl.querySelector(`.el-tabs__nav-${direction}`);
123
+ if (el && !el.classList.contains("is-disabled")) {
124
+ startScrollTimer();
125
+ done && done();
126
+ el.click();
127
+ }
128
+ }
129
+ };
130
+ const checkScrollActive = () => {
131
+ const active = props$1.modelValue;
132
+ if (props$1.items && active != null) {
133
+ const index2 = props$1.items.findIndex((item) => item.name === active);
134
+ if (index2 === 0) {
135
+ scrollTabs("prev");
136
+ } else if (index2 === props$1.items.length - 1) {
137
+ scrollTabs("next");
138
+ }
139
+ }
140
+ };
110
141
  const bindDragSort = () => {
111
142
  unbindDragSort();
112
143
  const el = getNavEl();
113
144
  if (!props$1.sortable || !el) {
114
145
  return;
115
146
  }
116
- current.sortIns = new SortableJs(el, {
147
+ sortableIns = new SortableJs(el, {
117
148
  animation: 300,
118
149
  draggable: ".el-tabs__item",
119
150
  onUpdate: ({ oldDraggableIndex, newDraggableIndex }) => {
@@ -132,42 +163,40 @@ const _sfc_main = vue.defineComponent({
132
163
  });
133
164
  };
134
165
  const unbindDragSort = () => {
135
- current.sortIns && current.sortIns.destroy();
136
- current.sortIns = null;
166
+ sortableIns && sortableIns.destroy();
167
+ sortableIns = null;
137
168
  };
138
- const handleMousewheel = (e, isFirefox) => {
139
- const tabEl = e.currentTarget;
140
- if (tabEl && !current.isScroll) {
141
- const el = getBtnEl(tabEl, e, isFirefox);
142
- if (el && !el.classList.contains("is-disabled")) {
143
- current.isScroll = true;
144
- e.preventDefault();
145
- e.stopPropagation();
146
- el.click();
147
- setTimeout(() => {
148
- current.isScroll = false;
149
- }, 300);
169
+ const initMousewheelEvent = () => {
170
+ const el = getHeaderEl();
171
+ if (el != null) {
172
+ unbindMousewheel(el);
173
+ if (props$1.mousewheel) {
174
+ bindMousewheel(el);
150
175
  }
151
176
  }
152
177
  };
153
- const handleFirefoxMousewheel = (e) => {
154
- handleMousewheel(e, true);
178
+ const initTouchEvent = () => {
179
+ const el = getHeaderEl();
180
+ if (el != null) {
181
+ unbindTouchEvent(el);
182
+ if (!props$1.sortable) {
183
+ bindTouchEvent(el);
184
+ }
185
+ }
155
186
  };
156
187
  vue.onMounted(() => {
188
+ vue.nextTick(() => {
189
+ checkScrollActive();
190
+ });
191
+ initMousewheelEvent();
192
+ initTouchEvent();
157
193
  bindDragSort();
158
- const el = getHeaderEl();
159
- if (props$1.mousewheel && el) {
160
- el.addEventListener("mousewheel", handleMousewheel, {
161
- passive: false
162
- });
163
- el.addEventListener("DOMMouseScroll", handleFirefoxMousewheel);
164
- }
165
194
  });
166
195
  vue.onBeforeUnmount(() => {
167
196
  const el = getHeaderEl();
168
- if (el) {
169
- el.removeEventListener("mousewheel", handleMousewheel);
170
- el.removeEventListener("DOMMouseScroll", handleFirefoxMousewheel);
197
+ if (el != null) {
198
+ unbindMousewheel(el);
199
+ unbindTouchEvent(el);
171
200
  }
172
201
  unbindDragSort();
173
202
  });
@@ -175,6 +204,21 @@ const _sfc_main = vue.defineComponent({
175
204
  () => props$1.sortable,
176
205
  () => {
177
206
  bindDragSort();
207
+ initTouchEvent();
208
+ }
209
+ );
210
+ vue.watch(
211
+ () => props$1.mousewheel,
212
+ () => {
213
+ initMousewheelEvent();
214
+ }
215
+ );
216
+ vue.watch(
217
+ () => props$1.modelValue,
218
+ () => {
219
+ vue.nextTick(() => {
220
+ checkScrollActive();
221
+ });
178
222
  }
179
223
  );
180
224
  return {
@@ -226,7 +270,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
226
270
  { "is-indicator": _ctx.tabType === "indicator" },
227
271
  { "is-button": _ctx.tabType === "button" },
228
272
  { "is-tag": _ctx.tabType === "tag" },
229
- { "is-center": _ctx.center }
273
+ { "is-center": _ctx.center },
274
+ { "is-flex-table": _ctx.flexTable }
230
275
  ],
231
276
  "onUpdate:modelValue": _ctx.updateModelValue,
232
277
  onTabClick: _ctx.handleTabClick,
@@ -238,52 +283,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
238
283
  }), vue.createSlots({
239
284
  default: vue.withCtx(() => [
240
285
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item, index2) => {
241
- return vue.openBlock(), vue.createBlock(_component_ElTabPane, vue.mergeProps({
242
- key: index2 + "-" + item.name + "-" + item.label,
243
- ref_for: true
244
- }, _ctx.omit(item, ["slot", "meta"])), vue.createSlots({
245
- label: vue.withCtx(() => [
246
- vue.createVNode(_component_TabTitle, {
247
- ref_for: true,
248
- ref: "itemRefs",
249
- item,
250
- label: item.label,
251
- tabName: item.name,
252
- active: _ctx.modelValue,
253
- handleClick: _ctx.handleClick,
254
- contextMenu: _ctx.contextMenu,
255
- contextMenus: _ctx.getContextMenus(item),
256
- onContextMenu: _ctx.handleItemContextMenu,
257
- onContextOpen: _ctx.handleItemContextOpen,
258
- onItemClick: _ctx.handleItemClick
259
- }, vue.createSlots({ _: 2 }, [
260
- _ctx.$slots.label ? {
261
- name: "label",
262
- fn: vue.withCtx((slotProps) => [
263
- vue.renderSlot(_ctx.$slots, "label", vue.mergeProps({ ref_for: true }, slotProps || {}))
264
- ]),
265
- key: "0"
266
- } : void 0,
267
- _ctx.$slots.contextMenu ? {
268
- name: "contextMenu",
269
- fn: vue.withCtx((slotProps) => [
270
- vue.renderSlot(_ctx.$slots, "contextMenu", vue.mergeProps({ ref_for: true }, slotProps || {}))
271
- ]),
272
- key: "1"
273
- } : void 0
274
- ]), 1032, ["item", "label", "tabName", "active", "handleClick", "contextMenu", "contextMenus", "onContextMenu", "onContextOpen", "onItemClick"])
275
- ]),
276
- _: 2
277
- }, [
278
- item.name && _ctx.$slots[item.slot || item.name] ? {
279
- name: "default",
280
- fn: vue.withCtx(() => [
281
- vue.renderSlot(_ctx.$slots, item.slot || item.name, { item })
286
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
287
+ (item.vIf == null ? true : item.vIf) ? (vue.openBlock(), vue.createBlock(_component_ElTabPane, vue.mergeProps({
288
+ key: index2 + "-" + item.name + "-" + item.label,
289
+ ref_for: true
290
+ }, _ctx.omit(item, ["slot", "meta", "vIf"])), vue.createSlots({
291
+ label: vue.withCtx(() => [
292
+ vue.createVNode(_component_TabTitle, {
293
+ ref_for: true,
294
+ ref: "itemRefs",
295
+ item,
296
+ label: item.label,
297
+ tabName: item.name,
298
+ active: _ctx.modelValue,
299
+ handleClick: _ctx.handleClick,
300
+ contextMenu: _ctx.contextMenu,
301
+ contextMenus: _ctx.getContextMenus(item),
302
+ onContextMenu: _ctx.handleItemContextMenu,
303
+ onContextOpen: _ctx.handleItemContextOpen,
304
+ onItemClick: _ctx.handleItemClick
305
+ }, vue.createSlots({ _: 2 }, [
306
+ _ctx.$slots.label ? {
307
+ name: "label",
308
+ fn: vue.withCtx((slotProps) => [
309
+ vue.renderSlot(_ctx.$slots, "label", vue.mergeProps({ ref_for: true }, slotProps || {}))
310
+ ]),
311
+ key: "0"
312
+ } : void 0,
313
+ _ctx.$slots.contextMenu ? {
314
+ name: "contextMenu",
315
+ fn: vue.withCtx((slotProps) => [
316
+ vue.renderSlot(_ctx.$slots, "contextMenu", vue.mergeProps({ ref_for: true }, slotProps || {}))
317
+ ]),
318
+ key: "1"
319
+ } : void 0
320
+ ]), 1032, ["item", "label", "tabName", "active", "handleClick", "contextMenu", "contextMenus", "onContextMenu", "onContextOpen", "onItemClick"])
282
321
  ]),
283
- key: "0"
284
- } : void 0
285
- ]), 1040);
286
- }), 128))
322
+ _: 2
323
+ }, [
324
+ item.name && _ctx.$slots[item.slot || item.name] ? {
325
+ name: "default",
326
+ fn: vue.withCtx(() => [
327
+ vue.renderSlot(_ctx.$slots, item.slot || item.name, { item })
328
+ ]),
329
+ key: "0"
330
+ } : void 0
331
+ ]), 1040)) : vue.createCommentVNode("", true)
332
+ ], 64);
333
+ }), 256))
287
334
  ]),
288
335
  _: 2
289
336
  }, [
@@ -19,6 +19,7 @@ declare const _default: import('vue').DefineComponent<{
19
19
  sortable: BooleanConstructor;
20
20
  mousewheel: BooleanConstructor;
21
21
  handleClick: BooleanConstructor;
22
+ flexTable: BooleanConstructor;
22
23
  closable: BooleanConstructor;
23
24
  addable: BooleanConstructor;
24
25
  modelValue: {
@@ -28,13 +29,13 @@ declare const _default: import('vue').DefineComponent<{
28
29
  __epPropKey: true;
29
30
  };
30
31
  editable: BooleanConstructor;
31
- tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "right" | "left", unknown, "top", boolean>;
32
- beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
33
- (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
32
+ tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
33
+ beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
34
+ (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
34
35
  new (): any;
35
36
  readonly prototype: any;
36
- } | ((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
37
- (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
37
+ } | ((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
38
+ (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
38
39
  new (): any;
39
40
  readonly prototype: any;
40
41
  })[], unknown, unknown, () => true, boolean>;
@@ -53,7 +54,7 @@ declare const _default: import('vue').DefineComponent<{
53
54
  handleTabChange: (name: TabPaneName) => void;
54
55
  handleTabRemove: (name: TabPaneName) => void;
55
56
  handleTabAdd: () => void;
56
- handleEdit: (name: TabPaneName | undefined, action: 'remove' | 'add') => void;
57
+ handleEdit: (name: TabPaneName | undefined, action: "remove" | "add") => void;
57
58
  handleItemClick: (option: TabEventOption) => void;
58
59
  handleItemContextMenu: (option: TabEventOption) => void;
59
60
  handleItemContextOpen: (ref: EleDropdownInstance) => void;
@@ -66,25 +67,9 @@ declare const _default: import('vue').DefineComponent<{
66
67
  tabContextOpen: (_ref: EleDropdownInstance) => boolean;
67
68
  tabSortChange: (_data: TabPaneItem[]) => boolean;
68
69
  "update:modelValue": (name: TabPaneName) => boolean;
69
- tabClick: (pane: {
70
- uid: number;
71
- slots: Readonly<{
72
- [name: string]: import('vue').Slot<any> | undefined;
73
- }>;
74
- props: {
75
- readonly label: string;
76
- readonly closable: boolean;
77
- readonly disabled: boolean;
78
- readonly lazy: boolean;
79
- readonly name?: import('element-plus/es/utils/index').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
80
- };
81
- paneName: string | number | undefined;
82
- active: boolean;
83
- index: string | undefined;
84
- isClosable: boolean;
85
- }, ev: Event) => boolean;
70
+ tabClick: (pane: TabsPaneContext, ev: Event) => boolean;
86
71
  tabChange: (name: TabPaneName) => boolean;
87
- edit: (paneName: TabPaneName | undefined, action: "add" | "remove") => boolean;
72
+ edit: (paneName: TabPaneName | undefined, action: "remove" | "add") => boolean;
88
73
  tabRemove: (name: TabPaneName) => boolean;
89
74
  tabAdd: () => boolean;
90
75
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -100,6 +85,7 @@ declare const _default: import('vue').DefineComponent<{
100
85
  sortable: BooleanConstructor;
101
86
  mousewheel: BooleanConstructor;
102
87
  handleClick: BooleanConstructor;
88
+ flexTable: BooleanConstructor;
103
89
  closable: BooleanConstructor;
104
90
  addable: BooleanConstructor;
105
91
  modelValue: {
@@ -109,13 +95,13 @@ declare const _default: import('vue').DefineComponent<{
109
95
  __epPropKey: true;
110
96
  };
111
97
  editable: BooleanConstructor;
112
- tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "right" | "left", unknown, "top", boolean>;
113
- beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
114
- (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
98
+ tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
99
+ beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
100
+ (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
115
101
  new (): any;
116
102
  readonly prototype: any;
117
- } | ((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
118
- (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
103
+ } | ((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
104
+ (): (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
119
105
  new (): any;
120
106
  readonly prototype: any;
121
107
  })[], unknown, unknown, () => true, boolean>;
@@ -124,9 +110,7 @@ declare const _default: import('vue').DefineComponent<{
124
110
  "onUpdate:modelValue"?: ((name: TabPaneName) => any) | undefined;
125
111
  onTabClick?: ((pane: {
126
112
  uid: number;
127
- slots: Readonly<{
128
- [name: string]: import('vue').Slot<any> | undefined;
129
- }>;
113
+ slots: import('vue').Slots;
130
114
  props: {
131
115
  readonly label: string;
132
116
  readonly closable: boolean;
@@ -148,15 +132,16 @@ declare const _default: import('vue').DefineComponent<{
148
132
  onTabContextOpen?: ((_ref: EleDropdownInstance) => any) | undefined;
149
133
  onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
150
134
  }, {
135
+ mousewheel: boolean;
151
136
  closable: boolean;
152
137
  center: boolean;
153
- beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
138
+ beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
154
139
  sortable: boolean;
155
140
  addable: boolean;
156
141
  editable: boolean;
157
142
  tabPosition: import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "top" | "bottom" | "right" | "left", unknown>;
158
143
  stretch: boolean;
159
144
  handleClick: boolean;
160
- mousewheel: boolean;
145
+ flexTable: boolean;
161
146
  }, {}>;
162
147
  export default _default;
@@ -23,7 +23,9 @@ const tabsProps = {
23
23
  /** 是否支持鼠标滚轮滑动 */
24
24
  mousewheel: Boolean,
25
25
  /** 是否自己处理页签点击事件 */
26
- handleClick: Boolean
26
+ handleClick: Boolean,
27
+ /** 内部表格是否弹性布局 */
28
+ flexTable: Boolean
27
29
  };
28
30
  const tabsEmits = {
29
31
  ...elementPlus.tabsEmits,
@@ -29,22 +29,24 @@ export declare const tabsProps: {
29
29
  mousewheel: BooleanConstructor;
30
30
  /** 是否自己处理页签点击事件 */
31
31
  handleClick: BooleanConstructor;
32
+ /** 内部表格是否弹性布局 */
33
+ flexTable: BooleanConstructor;
32
34
  closable: BooleanConstructor;
33
35
  addable: BooleanConstructor;
34
36
  modelValue: {
35
- readonly type: PropType<import('element-plus/es/utils/index').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
37
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
36
38
  readonly required: false;
37
39
  readonly validator: ((val: unknown) => boolean) | undefined;
38
40
  __epPropKey: true;
39
41
  };
40
42
  editable: BooleanConstructor;
41
- tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "right" | "left", unknown, "top", boolean>;
42
- beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
43
- (): (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
43
+ tabPosition: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
44
+ beforeLeave: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
45
+ (): (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
44
46
  new (): any;
45
47
  readonly prototype: any;
46
- } | ((new (...args: any[]) => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | (() => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>) | {
47
- (): (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<boolean | void>;
48
+ } | ((new (...args: any[]) => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | (() => (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>) | {
49
+ (): (newName: import('element-plus').TabPaneName, oldName: import('element-plus').TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
48
50
  new (): any;
49
51
  readonly prototype: any;
50
52
  })[], unknown, unknown, () => true, boolean>;
@@ -64,25 +66,9 @@ export declare const tabsEmits: {
64
66
  /** 拖动排序改变事件 */
65
67
  tabSortChange: (_data: TabPaneItem[]) => boolean;
66
68
  "update:modelValue": (name: import('element-plus').TabPaneName) => boolean;
67
- tabClick: (pane: {
68
- uid: number;
69
- slots: Readonly<{
70
- [name: string]: import('vue').Slot<any> | undefined;
71
- }>;
72
- props: {
73
- readonly closable: boolean;
74
- readonly disabled: boolean;
75
- readonly label: string;
76
- readonly lazy: boolean;
77
- readonly name?: import('element-plus/es/utils/index').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
78
- };
79
- paneName: string | number | undefined;
80
- active: boolean;
81
- index: string | undefined;
82
- isClosable: boolean;
83
- }, ev: Event) => boolean;
69
+ tabClick: (pane: import('element-plus').TabsPaneContext, ev: Event) => boolean;
84
70
  tabChange: (name: import('element-plus').TabPaneName) => boolean;
85
- edit: (paneName: import('element-plus').TabPaneName | undefined, action: "add" | "remove") => boolean;
71
+ edit: (paneName: import('element-plus').TabPaneName | undefined, action: "remove" | "add") => boolean;
86
72
  tabRemove: (name: import('element-plus').TabPaneName) => boolean;
87
73
  tabAdd: () => boolean;
88
74
  };
@@ -6,6 +6,7 @@
6
6
 
7
7
  /* 标签页 */
8
8
  .ele-tabs.el-tabs > .el-tabs__header {
9
+ flex-shrink: 0;
9
10
  margin: 0;
10
11
 
11
12
  .el-tabs__nav-wrap {
@@ -122,8 +123,14 @@
122
123
  }
123
124
 
124
125
  /* 拖动 */
125
- .el-tabs__item.sortable-ghost {
126
- opacity: 0;
126
+ .el-tabs__item {
127
+ &.sortable-chosen {
128
+ user-select: none;
129
+ }
130
+
131
+ &.sortable-ghost {
132
+ opacity: 0;
133
+ }
127
134
  }
128
135
 
129
136
  /* 左右箭头 */
@@ -1056,3 +1063,36 @@
1056
1063
  }
1057
1064
  }
1058
1065
  }
1066
+
1067
+ /* 内部表格高度铺满 */
1068
+ .ele-tabs.is-flex-table {
1069
+ flex: 1;
1070
+ display: flex;
1071
+ flex-direction: column;
1072
+ overflow: auto;
1073
+
1074
+ & > .el-tabs__content {
1075
+ flex: 1;
1076
+ overflow: auto;
1077
+
1078
+ & > .el-tab-pane {
1079
+ height: 100%;
1080
+ display: flex;
1081
+ flex-direction: column;
1082
+ box-sizing: border-box;
1083
+
1084
+ & > .ele-pro-table {
1085
+ flex: 1;
1086
+ display: flex;
1087
+ flex-direction: column;
1088
+ overflow: auto;
1089
+
1090
+ & > .ele-pro-table-view {
1091
+ flex: 1;
1092
+ height: 100%;
1093
+ overflow: hidden;
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ }
@@ -1,4 +1,3 @@
1
- import type SortableJs from 'sortablejs';
2
1
  import type { ElTabPaneProps } from '../ele-app/el';
3
2
  import type { DropdownItem } from '../ele-dropdown/types';
4
3
 
@@ -10,6 +9,8 @@ export interface TabPaneItem extends ElTabPaneProps {
10
9
  slot?: string;
11
10
  /** 元数据 */
12
11
  meta?: any;
12
+ /** 显示条件 */
13
+ vIf?: any;
13
14
  }
14
15
 
15
16
  /**
@@ -54,16 +55,6 @@ export type ContextMenusFunc = (item?: TabPaneItem) => DropdownItem[];
54
55
  */
55
56
  export type ContextMenus = DropdownItem[] | ContextMenusFunc;
56
57
 
57
- /**
58
- * 页签实例数据
59
- */
60
- export interface TabCurrent {
61
- /** 拖拽排序实例 */
62
- sortIns?: SortableJs | null;
63
- /** 鼠标滚轮事件节流 */
64
- isScroll?: boolean;
65
- }
66
-
67
58
  /**
68
59
  * 标签页容器属性
69
60
  */
@@ -11,7 +11,7 @@ declare const _default: import('vue').DefineComponent<{
11
11
  italic: BooleanConstructor;
12
12
  icon: import('vue').PropType<import('./types').TextIcon>;
13
13
  iconProps: import('vue').PropType<import('../ele-app/el').ElIconProps>;
14
- iconStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
14
+ iconStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
15
15
  }, unknown, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
16
  tag: {
17
17
  type: StringConstructor;
@@ -25,7 +25,7 @@ declare const _default: import('vue').DefineComponent<{
25
25
  italic: BooleanConstructor;
26
26
  icon: import('vue').PropType<import('./types').TextIcon>;
27
27
  iconProps: import('vue').PropType<import('../ele-app/el').ElIconProps>;
28
- iconStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
28
+ iconStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
29
29
  }>>, {
30
30
  tag: string;
31
31
  underline: boolean;
@@ -1,4 +1,5 @@
1
1
  import { PropType, ExtractPropTypes } from 'vue';
2
+ import { StyleValue } from '../ele-app/types';
2
3
  import { ElIconProps } from '../ele-app/el';
3
4
  import { TextType, TextSize, TextIcon } from './types';
4
5
 
@@ -28,7 +29,7 @@ export declare const textProps: {
28
29
  /** 图标属性 */
29
30
  iconProps: PropType<ElIconProps>;
30
31
  /** 图标样式 */
31
- iconStyle: PropType<Partial<import('vue').CSSProperties>>;
32
+ iconStyle: PropType<StyleValue>;
32
33
  };
33
34
  export type TextProps = ExtractPropTypes<typeof textProps>;
34
35
  export type TextPropKeys = Array<keyof typeof textProps>;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
- const hook = require("../utils/hook");
4
3
  const props$1 = require("../ele-toolbar/props");
5
4
  const props = require("./props");
6
5
  const _sfc_main = vue.defineComponent({
@@ -9,7 +8,6 @@ const _sfc_main = vue.defineComponent({
9
8
  emits: props.toolEmits,
10
9
  setup(props2, { emit }) {
11
10
  const toolbarProvide = vue.inject(props$1.TOOLBAR_KEY, {});
12
- const [startHideTipTimer, stopHideTipTimer] = hook.useTimer(200);
13
11
  const showTooltip = (text, el, options) => {
14
12
  if (toolbarProvide.showTooltip) {
15
13
  toolbarProvide.showTooltip(text, el, options);
@@ -19,14 +17,13 @@ const _sfc_main = vue.defineComponent({
19
17
  toolbarProvide.hideTooltip && toolbarProvide.hideTooltip();
20
18
  };
21
19
  const handleClick = (e) => {
22
- startHideTipTimer(() => {
20
+ if (props2.clickHideTooltip) {
23
21
  hideTooltip();
24
- });
22
+ }
25
23
  emit("click", e);
26
24
  };
27
25
  const handleMouseover = (e) => {
28
26
  if (props2.title && !props2.disabled) {
29
- stopHideTipTimer();
30
27
  showTooltip(props2.title, e.currentTarget, {
31
28
  placement: props2.placement,
32
29
  offset: 10