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

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 (384) hide show
  1. package/es/core-components.d.ts +1 -0
  2. package/es/core-components.js +60 -58
  3. package/es/ele-admin-layout/components/layout-tabs.d.ts +1 -6
  4. package/es/ele-admin-layout/components/layout-tabs.js +18 -76
  5. package/es/ele-admin-layout/index.js +7 -2
  6. package/es/ele-admin-layout/types.d.ts +2 -0
  7. package/es/ele-app/el.d.ts +3 -0
  8. package/es/ele-app/plus.d.ts +21 -0
  9. package/es/ele-app/style/overwrite/css-var.scss +0 -2
  10. package/es/ele-app/style/overwrite/index.js +0 -1
  11. package/es/ele-app/style/overwrite/index.scss +0 -1
  12. package/es/ele-app/style/scrollbar/css-var.scss +17 -16
  13. package/es/ele-app/types.d.ts +8 -1
  14. package/es/ele-basic-select/index.d.ts +2 -2
  15. package/es/ele-bottom-bar/index.d.ts +9 -2
  16. package/es/ele-bottom-bar/index.js +37 -15
  17. package/es/ele-bottom-bar/props.d.ts +2 -0
  18. package/es/ele-bottom-bar/props.js +3 -1
  19. package/es/ele-bottom-bar/style/index.scss +5 -0
  20. package/es/ele-check-card/index.d.ts +2 -2
  21. package/es/ele-cropper/components/cropper-tools.d.ts +9 -3
  22. package/es/ele-cropper/components/cropper-tools.js +41 -13
  23. package/es/ele-cropper/index.d.ts +3 -1
  24. package/es/ele-cropper/index.js +2 -1
  25. package/es/ele-cropper/props.d.ts +3 -1
  26. package/es/ele-cropper/props.js +2 -0
  27. package/es/ele-cropper/style/index.scss +3 -2
  28. package/es/ele-cropper/types.d.ts +16 -0
  29. package/es/ele-cropper-modal/index.d.ts +3 -1
  30. package/es/ele-cropper-modal/index.js +2 -1
  31. package/es/ele-cropper-modal/props.d.ts +1 -0
  32. package/es/ele-data-table/components/table-columns.d.ts +32 -0
  33. package/es/ele-data-table/components/table-columns.js +114 -0
  34. package/es/ele-data-table/index.d.ts +205 -23
  35. package/es/ele-data-table/index.js +202 -120
  36. package/es/ele-data-table/props.d.ts +14 -18
  37. package/es/ele-data-table/types.d.ts +2 -2
  38. package/es/ele-data-table/util.d.ts +1 -45
  39. package/es/ele-data-table/util.js +2 -110
  40. package/es/ele-drawer/index.d.ts +8 -8
  41. package/es/ele-drawer/props.d.ts +2 -2
  42. package/es/ele-dropdown/components/pro-dropdown.d.ts +237 -0
  43. package/es/ele-dropdown/components/pro-dropdown.js +204 -0
  44. package/es/ele-dropdown/index.d.ts +517 -31
  45. package/es/ele-dropdown/index.js +144 -65
  46. package/es/ele-dropdown/props.d.ts +109 -15
  47. package/es/ele-dropdown/props.js +54 -7
  48. package/es/ele-dropdown/style/index.js +4 -1
  49. package/es/ele-dropdown/style/index.scss +174 -6
  50. package/es/ele-dropdown/types.d.ts +0 -2
  51. package/es/ele-edit-tag/index.d.ts +2 -2
  52. package/es/ele-file-list/components/file-grid-item.d.ts +11 -20
  53. package/es/ele-file-list/components/file-grid-item.js +19 -58
  54. package/es/ele-file-list/components/file-grid.d.ts +15 -19
  55. package/es/ele-file-list/components/file-grid.js +16 -39
  56. package/es/ele-file-list/components/file-table-item.d.ts +11 -20
  57. package/es/ele-file-list/components/file-table-item.js +19 -58
  58. package/es/ele-file-list/components/file-table.d.ts +15 -19
  59. package/es/ele-file-list/components/file-table.js +17 -37
  60. package/es/ele-file-list/index.d.ts +33 -12
  61. package/es/ele-file-list/index.js +118 -20
  62. package/es/ele-file-list/props.d.ts +4 -5
  63. package/es/ele-file-list/props.js +5 -8
  64. package/es/ele-file-list/style/index.scss +10 -5
  65. package/es/ele-file-list/types.d.ts +13 -1
  66. package/es/ele-icon-select/components/icon-grid.d.ts +1 -1
  67. package/es/ele-icon-select/index.d.ts +2 -2
  68. package/es/ele-image-viewer/index.d.ts +120 -0
  69. package/es/ele-image-viewer/index.js +88 -0
  70. package/es/ele-image-viewer/props.d.ts +58 -0
  71. package/es/ele-image-viewer/props.js +35 -0
  72. package/es/ele-image-viewer/style/css-var.scss +8 -0
  73. package/es/ele-image-viewer/style/index.js +2 -0
  74. package/es/ele-image-viewer/style/index.scss +117 -0
  75. package/es/ele-map-picker/components/map-view.d.ts +18 -18
  76. package/es/ele-menus/components/item-title.d.ts +48 -0
  77. package/es/ele-menus/components/item-title.js +108 -0
  78. package/es/ele-menus/components/menu-items.d.ts +78 -0
  79. package/es/ele-menus/components/menu-items.js +269 -0
  80. package/es/ele-menus/index.d.ts +77 -18
  81. package/es/ele-menus/index.js +280 -210
  82. package/es/ele-menus/props.d.ts +2 -2
  83. package/es/ele-menus/util.d.ts +1 -62
  84. package/es/ele-menus/util.js +3 -244
  85. package/es/ele-modal/index.d.ts +9 -9
  86. package/es/ele-modal/props.d.ts +2 -2
  87. package/es/ele-modal/util.d.ts +1 -1
  88. package/es/ele-modal/util.js +8 -4
  89. package/es/ele-pagination/index.d.ts +2 -2
  90. package/es/ele-pagination/props.d.ts +1 -1
  91. package/es/ele-popconfirm/index.d.ts +11 -14
  92. package/es/ele-popconfirm/props.d.ts +3 -4
  93. package/es/ele-popover/index.d.ts +11 -14
  94. package/es/ele-popover/props.d.ts +0 -1
  95. package/es/ele-popover/props.js +1 -1
  96. package/es/ele-printer/util.js +1 -1
  97. package/es/ele-pro-layout/components/pro-iframe.d.ts +6 -6
  98. package/es/ele-pro-layout/components/pro-iframe.js +6 -4
  99. package/es/ele-pro-layout/index.d.ts +1 -1
  100. package/es/ele-pro-layout/index.js +13 -4
  101. package/es/ele-pro-layout/props.d.ts +3 -3
  102. package/es/ele-pro-layout/props.js +3 -3
  103. package/es/ele-pro-layout/types.d.ts +9 -5
  104. package/es/ele-pro-layout/util.d.ts +6 -0
  105. package/es/ele-pro-layout/util.js +12 -0
  106. package/es/ele-pro-table/components/table-tools.d.ts +24 -24
  107. package/es/ele-pro-table/components/table-tools.js +6 -7
  108. package/es/ele-pro-table/components/tool-column.d.ts +7 -7
  109. package/es/ele-pro-table/components/tool-column.js +4 -4
  110. package/es/ele-pro-table/components/tool-export.d.ts +5 -5
  111. package/es/ele-pro-table/components/tool-print-body-cell.js +1 -1
  112. package/es/ele-pro-table/components/tool-print-header-cell.js +3 -2
  113. package/es/ele-pro-table/components/tool-print.d.ts +5 -5
  114. package/es/ele-pro-table/index.d.ts +71 -81
  115. package/es/ele-pro-table/index.js +19 -23
  116. package/es/ele-pro-table/props.d.ts +9 -11
  117. package/es/ele-pro-table/props.js +1 -1
  118. package/es/ele-segmented/index.d.ts +3 -1
  119. package/es/ele-segmented/index.js +27 -3
  120. package/es/ele-segmented/style/index.scss +7 -1
  121. package/es/ele-steps/index.d.ts +12 -12
  122. package/es/ele-steps/props.d.ts +3 -3
  123. package/es/ele-tab-tool/index.d.ts +6 -1
  124. package/es/ele-tab-tool/index.js +44 -3
  125. package/es/ele-tab-tool/props.d.ts +2 -0
  126. package/es/ele-tab-tool/props.js +3 -1
  127. package/es/ele-tab-wrap/components/tab-dropdown.js +9 -26
  128. package/es/ele-tab-wrap/index.js +21 -2
  129. package/es/ele-table/style/index.scss +1 -2
  130. package/es/ele-table-select/index.d.ts +6 -6
  131. package/es/ele-tabs/index.d.ts +21 -19
  132. package/es/ele-tabs/index.js +240 -115
  133. package/es/ele-tabs/props.d.ts +1 -6
  134. package/es/ele-tabs/props.js +1 -1
  135. package/es/ele-tabs/style/index.scss +152 -176
  136. package/es/ele-tabs/types.d.ts +29 -6
  137. package/es/ele-tool/index.js +6 -1
  138. package/es/ele-toolbar/index.d.ts +9 -9
  139. package/es/ele-tooltip/index.d.ts +15 -15
  140. package/es/ele-tooltip/props.d.ts +2 -2
  141. package/es/ele-tooltip/style/css-var.scss +4 -0
  142. package/es/ele-tree-select/index.d.ts +5 -5
  143. package/es/ele-upload-list/components/list-item.d.ts +31 -5
  144. package/es/ele-upload-list/components/list-item.js +146 -66
  145. package/es/ele-upload-list/index.d.ts +55 -26
  146. package/es/ele-upload-list/index.js +180 -97
  147. package/es/ele-upload-list/props.d.ts +22 -9
  148. package/es/ele-upload-list/props.js +20 -8
  149. package/es/ele-upload-list/style/css-var.scss +8 -0
  150. package/es/ele-upload-list/style/index.js +1 -1
  151. package/es/ele-upload-list/style/index.scss +425 -135
  152. package/es/ele-upload-list/types.d.ts +35 -11
  153. package/es/ele-virtual-table/components/body-cell.d.ts +2 -2
  154. package/es/ele-virtual-table/components/header-cell.d.ts +1 -1
  155. package/es/ele-virtual-table/components/header-row.d.ts +1 -1
  156. package/es/ele-virtual-table/index.d.ts +14 -22
  157. package/es/ele-virtual-table/index.js +8 -6
  158. package/es/ele-virtual-table/props.d.ts +6 -8
  159. package/es/icons/CornerLeftFilled.d.ts +2 -0
  160. package/es/icons/CornerLeftFilled.js +26 -0
  161. package/es/icons/CornerRightFilled.d.ts +2 -0
  162. package/es/icons/CornerRightFilled.js +26 -0
  163. package/es/icons/EyeOutlined.d.ts +2 -0
  164. package/es/icons/EyeOutlined.js +30 -0
  165. package/es/icons/FileOutlined.js +4 -4
  166. package/es/icons/SizeCompactOutlined.js +4 -4
  167. package/es/icons/SizeMiddleOutlined.d.ts +2 -0
  168. package/es/icons/SizeMiddleOutlined.js +34 -0
  169. package/es/icons/SizeSlackOutlined.js +4 -4
  170. package/es/icons/index.d.ts +4 -0
  171. package/es/icons/index.js +162 -154
  172. package/es/lang/en_US.js +4 -1
  173. package/es/lang/zh_CN.js +4 -1
  174. package/es/lang/zh_TW.js +4 -1
  175. package/es/style/plus.scss +1 -0
  176. package/es/style/themes/default.scss +80 -4
  177. package/es/style/themes/rounded.scss +6 -3
  178. package/es/style/themes/theme-util.scss +4 -0
  179. package/es/style/util.scss +10 -3
  180. package/es/utils/core.d.ts +4 -2
  181. package/es/utils/hook.d.ts +2 -0
  182. package/es/utils/hook.js +5 -1
  183. package/es/utils/menu-util.js +11 -5
  184. package/es/utils/message-box.js +5 -1
  185. package/es/utils/message.js +2 -2
  186. package/lib/core-components.cjs +60 -58
  187. package/lib/core-components.d.ts +1 -0
  188. package/lib/ele-admin-layout/components/layout-tabs.cjs +17 -75
  189. package/lib/ele-admin-layout/components/layout-tabs.d.ts +1 -6
  190. package/lib/ele-admin-layout/index.cjs +7 -2
  191. package/lib/ele-admin-layout/types.d.ts +2 -0
  192. package/lib/ele-app/el.d.ts +3 -0
  193. package/lib/ele-app/plus.d.ts +21 -0
  194. package/lib/ele-app/style/overwrite/css-var.scss +0 -2
  195. package/lib/ele-app/style/overwrite/index.cjs +0 -1
  196. package/lib/ele-app/style/overwrite/index.scss +0 -1
  197. package/lib/ele-app/style/scrollbar/css-var.scss +17 -16
  198. package/lib/ele-app/types.d.ts +8 -1
  199. package/lib/ele-basic-select/index.d.ts +2 -2
  200. package/lib/ele-bottom-bar/index.cjs +36 -14
  201. package/lib/ele-bottom-bar/index.d.ts +9 -2
  202. package/lib/ele-bottom-bar/props.cjs +3 -1
  203. package/lib/ele-bottom-bar/props.d.ts +2 -0
  204. package/lib/ele-bottom-bar/style/index.scss +5 -0
  205. package/lib/ele-check-card/index.d.ts +2 -2
  206. package/lib/ele-cropper/components/cropper-tools.cjs +40 -12
  207. package/lib/ele-cropper/components/cropper-tools.d.ts +9 -3
  208. package/lib/ele-cropper/index.cjs +2 -1
  209. package/lib/ele-cropper/index.d.ts +3 -1
  210. package/lib/ele-cropper/props.cjs +2 -0
  211. package/lib/ele-cropper/props.d.ts +3 -1
  212. package/lib/ele-cropper/style/index.scss +3 -2
  213. package/lib/ele-cropper/types.d.ts +16 -0
  214. package/lib/ele-cropper-modal/index.cjs +2 -1
  215. package/lib/ele-cropper-modal/index.d.ts +3 -1
  216. package/lib/ele-cropper-modal/props.d.ts +1 -0
  217. package/lib/ele-data-table/components/table-columns.cjs +113 -0
  218. package/lib/ele-data-table/components/table-columns.d.ts +32 -0
  219. package/lib/ele-data-table/index.cjs +199 -117
  220. package/lib/ele-data-table/index.d.ts +205 -23
  221. package/lib/ele-data-table/props.d.ts +14 -18
  222. package/lib/ele-data-table/types.d.ts +2 -2
  223. package/lib/ele-data-table/util.cjs +0 -108
  224. package/lib/ele-data-table/util.d.ts +1 -45
  225. package/lib/ele-drawer/index.d.ts +8 -8
  226. package/lib/ele-drawer/props.d.ts +2 -2
  227. package/lib/ele-dropdown/components/pro-dropdown.cjs +203 -0
  228. package/lib/ele-dropdown/components/pro-dropdown.d.ts +237 -0
  229. package/lib/ele-dropdown/index.cjs +147 -68
  230. package/lib/ele-dropdown/index.d.ts +517 -31
  231. package/lib/ele-dropdown/props.cjs +53 -6
  232. package/lib/ele-dropdown/props.d.ts +109 -15
  233. package/lib/ele-dropdown/style/index.cjs +4 -1
  234. package/lib/ele-dropdown/style/index.scss +174 -6
  235. package/lib/ele-dropdown/types.d.ts +0 -2
  236. package/lib/ele-edit-tag/index.d.ts +2 -2
  237. package/lib/ele-file-list/components/file-grid-item.cjs +18 -57
  238. package/lib/ele-file-list/components/file-grid-item.d.ts +11 -20
  239. package/lib/ele-file-list/components/file-grid.cjs +15 -38
  240. package/lib/ele-file-list/components/file-grid.d.ts +15 -19
  241. package/lib/ele-file-list/components/file-table-item.cjs +18 -57
  242. package/lib/ele-file-list/components/file-table-item.d.ts +11 -20
  243. package/lib/ele-file-list/components/file-table.cjs +16 -36
  244. package/lib/ele-file-list/components/file-table.d.ts +15 -19
  245. package/lib/ele-file-list/index.cjs +117 -19
  246. package/lib/ele-file-list/index.d.ts +33 -12
  247. package/lib/ele-file-list/props.cjs +4 -7
  248. package/lib/ele-file-list/props.d.ts +4 -5
  249. package/lib/ele-file-list/style/index.scss +10 -5
  250. package/lib/ele-file-list/types.d.ts +13 -1
  251. package/lib/ele-icon-select/components/icon-grid.d.ts +1 -1
  252. package/lib/ele-icon-select/index.d.ts +2 -2
  253. package/lib/ele-image-viewer/index.cjs +87 -0
  254. package/lib/ele-image-viewer/index.d.ts +120 -0
  255. package/lib/ele-image-viewer/props.cjs +35 -0
  256. package/lib/ele-image-viewer/props.d.ts +58 -0
  257. package/lib/ele-image-viewer/style/css-var.scss +8 -0
  258. package/lib/ele-image-viewer/style/index.cjs +3 -0
  259. package/lib/ele-image-viewer/style/index.scss +117 -0
  260. package/lib/ele-map-picker/components/map-view.d.ts +18 -18
  261. package/lib/ele-menus/components/item-title.cjs +107 -0
  262. package/lib/ele-menus/components/item-title.d.ts +48 -0
  263. package/lib/ele-menus/components/menu-items.cjs +268 -0
  264. package/lib/ele-menus/components/menu-items.d.ts +78 -0
  265. package/lib/ele-menus/index.cjs +278 -208
  266. package/lib/ele-menus/index.d.ts +77 -18
  267. package/lib/ele-menus/props.d.ts +2 -2
  268. package/lib/ele-menus/util.cjs +1 -242
  269. package/lib/ele-menus/util.d.ts +1 -62
  270. package/lib/ele-modal/index.d.ts +9 -9
  271. package/lib/ele-modal/props.d.ts +2 -2
  272. package/lib/ele-modal/util.cjs +8 -4
  273. package/lib/ele-modal/util.d.ts +1 -1
  274. package/lib/ele-pagination/index.d.ts +2 -2
  275. package/lib/ele-pagination/props.d.ts +1 -1
  276. package/lib/ele-popconfirm/index.d.ts +11 -14
  277. package/lib/ele-popconfirm/props.d.ts +3 -4
  278. package/lib/ele-popover/index.d.ts +11 -14
  279. package/lib/ele-popover/props.cjs +1 -1
  280. package/lib/ele-popover/props.d.ts +0 -1
  281. package/lib/ele-printer/util.cjs +1 -1
  282. package/lib/ele-pro-layout/components/pro-iframe.cjs +6 -4
  283. package/lib/ele-pro-layout/components/pro-iframe.d.ts +6 -6
  284. package/lib/ele-pro-layout/index.cjs +13 -4
  285. package/lib/ele-pro-layout/index.d.ts +1 -1
  286. package/lib/ele-pro-layout/props.cjs +3 -3
  287. package/lib/ele-pro-layout/props.d.ts +3 -3
  288. package/lib/ele-pro-layout/types.d.ts +9 -5
  289. package/lib/ele-pro-layout/util.cjs +12 -0
  290. package/lib/ele-pro-layout/util.d.ts +6 -0
  291. package/lib/ele-pro-table/components/table-tools.cjs +5 -6
  292. package/lib/ele-pro-table/components/table-tools.d.ts +24 -24
  293. package/lib/ele-pro-table/components/tool-column.cjs +4 -4
  294. package/lib/ele-pro-table/components/tool-column.d.ts +7 -7
  295. package/lib/ele-pro-table/components/tool-export.d.ts +5 -5
  296. package/lib/ele-pro-table/components/tool-print-body-cell.cjs +1 -1
  297. package/lib/ele-pro-table/components/tool-print-header-cell.cjs +3 -2
  298. package/lib/ele-pro-table/components/tool-print.d.ts +5 -5
  299. package/lib/ele-pro-table/index.cjs +17 -21
  300. package/lib/ele-pro-table/index.d.ts +71 -81
  301. package/lib/ele-pro-table/props.cjs +1 -1
  302. package/lib/ele-pro-table/props.d.ts +9 -11
  303. package/lib/ele-segmented/index.cjs +26 -2
  304. package/lib/ele-segmented/index.d.ts +3 -1
  305. package/lib/ele-segmented/style/index.scss +7 -1
  306. package/lib/ele-steps/index.d.ts +12 -12
  307. package/lib/ele-steps/props.d.ts +3 -3
  308. package/lib/ele-tab-tool/index.cjs +43 -2
  309. package/lib/ele-tab-tool/index.d.ts +6 -1
  310. package/lib/ele-tab-tool/props.cjs +3 -1
  311. package/lib/ele-tab-tool/props.d.ts +2 -0
  312. package/lib/ele-tab-wrap/components/tab-dropdown.cjs +8 -25
  313. package/lib/ele-tab-wrap/index.cjs +20 -1
  314. package/lib/ele-table/style/index.scss +1 -2
  315. package/lib/ele-table-select/index.d.ts +6 -6
  316. package/lib/ele-tabs/index.cjs +238 -113
  317. package/lib/ele-tabs/index.d.ts +21 -19
  318. package/lib/ele-tabs/props.cjs +1 -1
  319. package/lib/ele-tabs/props.d.ts +1 -6
  320. package/lib/ele-tabs/style/index.scss +152 -176
  321. package/lib/ele-tabs/types.d.ts +29 -6
  322. package/lib/ele-tool/index.cjs +6 -1
  323. package/lib/ele-toolbar/index.d.ts +9 -9
  324. package/lib/ele-tooltip/index.d.ts +15 -15
  325. package/lib/ele-tooltip/props.d.ts +2 -2
  326. package/lib/ele-tooltip/style/css-var.scss +4 -0
  327. package/lib/ele-tree-select/index.d.ts +5 -5
  328. package/lib/ele-upload-list/components/list-item.cjs +144 -64
  329. package/lib/ele-upload-list/components/list-item.d.ts +31 -5
  330. package/lib/ele-upload-list/index.cjs +178 -95
  331. package/lib/ele-upload-list/index.d.ts +55 -26
  332. package/lib/ele-upload-list/props.cjs +20 -8
  333. package/lib/ele-upload-list/props.d.ts +22 -9
  334. package/lib/ele-upload-list/style/css-var.scss +8 -0
  335. package/lib/ele-upload-list/style/index.cjs +1 -1
  336. package/lib/ele-upload-list/style/index.scss +425 -135
  337. package/lib/ele-upload-list/types.d.ts +35 -11
  338. package/lib/ele-virtual-table/components/body-cell.d.ts +2 -2
  339. package/lib/ele-virtual-table/components/header-cell.d.ts +1 -1
  340. package/lib/ele-virtual-table/components/header-row.d.ts +1 -1
  341. package/lib/ele-virtual-table/index.cjs +7 -5
  342. package/lib/ele-virtual-table/index.d.ts +14 -22
  343. package/lib/ele-virtual-table/props.d.ts +6 -8
  344. package/lib/icons/CornerLeftFilled.cjs +25 -0
  345. package/lib/icons/CornerLeftFilled.d.ts +2 -0
  346. package/lib/icons/CornerRightFilled.cjs +25 -0
  347. package/lib/icons/CornerRightFilled.d.ts +2 -0
  348. package/lib/icons/EyeOutlined.cjs +29 -0
  349. package/lib/icons/EyeOutlined.d.ts +2 -0
  350. package/lib/icons/FileOutlined.cjs +4 -4
  351. package/lib/icons/SizeCompactOutlined.cjs +4 -4
  352. package/lib/icons/SizeMiddleOutlined.cjs +33 -0
  353. package/lib/icons/SizeMiddleOutlined.d.ts +2 -0
  354. package/lib/icons/SizeSlackOutlined.cjs +4 -4
  355. package/lib/icons/index.cjs +8 -0
  356. package/lib/icons/index.d.ts +4 -0
  357. package/lib/lang/en_US.cjs +4 -1
  358. package/lib/lang/zh_CN.cjs +4 -1
  359. package/lib/lang/zh_TW.cjs +4 -1
  360. package/lib/style/plus.scss +1 -0
  361. package/lib/style/themes/default.scss +80 -4
  362. package/lib/style/themes/rounded.scss +6 -3
  363. package/lib/style/themes/theme-util.scss +4 -0
  364. package/lib/style/util.scss +10 -3
  365. package/lib/utils/core.d.ts +4 -2
  366. package/lib/utils/hook.cjs +5 -1
  367. package/lib/utils/hook.d.ts +2 -0
  368. package/lib/utils/menu-util.cjs +9 -3
  369. package/lib/utils/message-box.cjs +4 -0
  370. package/lib/utils/message.cjs +1 -1
  371. package/package.json +36 -36
  372. package/typings/global.d.ts +1 -0
  373. package/es/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
  374. package/es/ele-app/style/overwrite/image-viewer/index.js +0 -1
  375. package/es/ele-app/style/overwrite/image-viewer/index.scss +0 -10
  376. package/es/ele-tabs/components/tab-title.d.ts +0 -52
  377. package/es/ele-tabs/components/tab-title.js +0 -115
  378. package/lib/ele-app/style/overwrite/image-viewer/css-var.scss +0 -8
  379. package/lib/ele-app/style/overwrite/image-viewer/index.cjs +0 -2
  380. package/lib/ele-app/style/overwrite/image-viewer/index.scss +0 -10
  381. package/lib/ele-tabs/components/tab-title.cjs +0 -114
  382. package/lib/ele-tabs/components/tab-title.d.ts +0 -52
  383. /package/es/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
  384. /package/lib/{ele-app/style/overwrite/image-viewer → ele-image-viewer/style}/index.d.ts +0 -0
@@ -2,19 +2,30 @@
2
2
  const vue = require("vue");
3
3
  const SortableJs = require("sortablejs");
4
4
  const elementPlus = require("element-plus");
5
+ const icons = require("../icons");
5
6
  const core = require("../utils/core");
6
7
  const hook = require("../utils/hook");
7
- const TabTitle = require("./components/tab-title");
8
+ const EleDropdown = require("../ele-dropdown/index");
8
9
  const props = require("./props");
9
10
  const _sfc_main = vue.defineComponent({
10
11
  name: "EleTabs",
11
- components: { ElTabs: elementPlus.ElTabs, ElTabPane: elementPlus.ElTabPane, TabTitle },
12
+ components: {
13
+ ElTabs: elementPlus.ElTabs,
14
+ ElTabPane: elementPlus.ElTabPane,
15
+ ElIcon: elementPlus.ElIcon,
16
+ EleDropdown,
17
+ CornerLeftFilled: icons.CornerLeftFilled,
18
+ CornerRightFilled: icons.CornerRightFilled
19
+ },
12
20
  props: props.tabsProps,
13
21
  emits: props.tabsEmits,
14
22
  setup(props$1, { emit }) {
15
- const [startScrollTimer, _stopScrollTimer, scrollWaiting] = hook.useTimer(320);
16
23
  let sortableIns = null;
24
+ let currentSortItemId = null;
25
+ let contextMenuTabItem = null;
26
+ let contextMenuTabName = null;
17
27
  const wrapProps = vue.inject(props.TAB_WRAP_KEY, null);
28
+ const [startScrollTimer, _stopScrollTimer, scrollWaiting] = hook.useTimer(320);
18
29
  const { bindMousewheel, unbindMousewheel } = hook.useMousewheel((param) => {
19
30
  const { e, direction } = param;
20
31
  scrollTabs(direction === "up" ? "prev" : "next", () => {
@@ -31,9 +42,9 @@ const _sfc_main = vue.defineComponent({
31
42
  }
32
43
  }
33
44
  });
45
+ const [startGhostTimer] = hook.useTimer(100);
34
46
  const tabRef = vue.ref(null);
35
- const itemRefs = vue.ref([]);
36
- const isWrap = vue.computed(() => wrapProps == null);
47
+ const isOnlyTab = vue.computed(() => wrapProps == null);
37
48
  const tabSize = vue.computed(
38
49
  () => wrapProps == null ? props$1.size : wrapProps.size
39
50
  );
@@ -43,15 +54,21 @@ const _sfc_main = vue.defineComponent({
43
54
  const tabProps = vue.computed(() => {
44
55
  return core.pick(props$1, props.tabPropKeys);
45
56
  });
46
- const getContextMenus = (item) => {
47
- if (typeof props$1.contextMenus === "function") {
48
- return props$1.contextMenus(item);
49
- }
50
- return props$1.contextMenus;
51
- };
57
+ const ctxMenuDropdownRef = vue.ref(null);
58
+ const ctxMenuDropdownItems = vue.shallowRef([]);
59
+ const ctxMenuDropdownVirtualRef = vue.ref();
52
60
  const updateModelValue = (name) => {
53
61
  emit("update:modelValue", name);
54
62
  };
63
+ const handleContextmenu = (e) => {
64
+ if (!props$1.contextMenu) {
65
+ return;
66
+ }
67
+ const el = e.target;
68
+ if (el && el.classList.contains("is-icon-close")) {
69
+ e.preventDefault();
70
+ }
71
+ };
55
72
  const handleTabClick = (pane, e) => {
56
73
  emit("tabClick", pane, e);
57
74
  };
@@ -67,41 +84,75 @@ const _sfc_main = vue.defineComponent({
67
84
  const handleEdit = (name, action) => {
68
85
  emit("edit", name, action);
69
86
  };
70
- const handleItemClick = (option) => {
71
- emit("tabItemClick", option);
87
+ const handleItemClick = (item, tabName, e) => {
88
+ if (props$1.handleClick) {
89
+ e.stopPropagation();
90
+ }
91
+ emit("tabItemClick", {
92
+ item,
93
+ name: item ? item.name : tabName,
94
+ active: props$1.modelValue
95
+ });
72
96
  };
73
- const handleItemContextMenu = (option) => {
74
- emit("tabContextMenu", option);
97
+ const handleItemCtxMenuVisible = (visible) => {
98
+ if (visible) {
99
+ emit(
100
+ "tabContextOpen",
101
+ ctxMenuDropdownRef.value,
102
+ contextMenuTabItem,
103
+ contextMenuTabName
104
+ );
105
+ }
75
106
  };
76
- const handleItemContextOpen = (ref2) => {
77
- if (itemRefs.value) {
78
- itemRefs.value.forEach((r) => {
79
- if (r && r.dropdownRef && r.dropdownRef !== ref2) {
80
- r.dropdownRef.handleClose();
81
- }
107
+ const handleItemCtxMenuClick = (command) => {
108
+ if (contextMenuTabItem != null || contextMenuTabName != null) {
109
+ emit("tabContextMenu", {
110
+ command,
111
+ item: contextMenuTabItem,
112
+ name: contextMenuTabItem ? contextMenuTabItem.name : contextMenuTabName,
113
+ active: props$1.modelValue
82
114
  });
83
115
  }
84
- emit("tabContextOpen", ref2);
85
116
  };
86
- const handleContextmenu = (e) => {
87
- const el = e.target;
88
- if (el && el.classList.contains("is-icon-close")) {
89
- e.preventDefault();
117
+ const getContextMenus = (item, tabName) => {
118
+ if (typeof props$1.contextMenus === "function") {
119
+ return props$1.contextMenus(item, tabName);
90
120
  }
121
+ return props$1.contextMenus;
91
122
  };
92
123
  const hideAllDropdown = () => {
93
- if (itemRefs.value) {
94
- itemRefs.value.forEach((r) => {
95
- if (r && r.dropdownRef) {
96
- r.dropdownRef.handleClose();
97
- }
98
- });
124
+ if (ctxMenuDropdownRef.value) {
125
+ ctxMenuDropdownRef.value.handleClose();
126
+ }
127
+ };
128
+ const showItemContextMenu = (item, tabName, itemEl) => {
129
+ if (contextMenuTabItem != null && contextMenuTabItem === item || contextMenuTabName != null && contextMenuTabName === tabName) {
130
+ return;
131
+ }
132
+ hideAllDropdown();
133
+ vue.nextTick(() => {
134
+ contextMenuTabItem = item;
135
+ contextMenuTabName = tabName;
136
+ ctxMenuDropdownItems.value = getContextMenus(item, tabName) || [];
137
+ ctxMenuDropdownVirtualRef.value = itemEl;
138
+ if (props$1.contextMenu && ctxMenuDropdownItems.value.length) {
139
+ vue.nextTick(() => {
140
+ ctxMenuDropdownRef.value && ctxMenuDropdownRef.value.handleOpen();
141
+ });
142
+ }
143
+ });
144
+ };
145
+ const handleItemContextmenu = (item, tabName, e) => {
146
+ const itemEl = e.currentTarget;
147
+ if (!props$1.contextMenu || ctxMenuDropdownVirtualRef.value === itemEl) {
148
+ return;
99
149
  }
150
+ e.preventDefault();
151
+ showItemContextMenu(item, tabName, itemEl);
100
152
  };
101
153
  const getHeaderEl = () => {
102
154
  const tabEl = tabRef.value ? tabRef.value.$el : void 0;
103
- const el = tabEl ? tabEl.querySelector(".el-tabs__header") : void 0;
104
- return el;
155
+ return tabEl ? tabEl.querySelector(".el-tabs__header") : void 0;
105
156
  };
106
157
  const getNavEl = () => {
107
158
  const headerEl = getHeaderEl();
@@ -127,26 +178,34 @@ const _sfc_main = vue.defineComponent({
127
178
  }
128
179
  }
129
180
  };
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");
181
+ const checkSortGhostTab = () => {
182
+ const navEl = getNavEl();
183
+ if (navEl == null) {
184
+ return;
185
+ }
186
+ if (currentSortItemId == null) {
187
+ const el2 = navEl.querySelector(".el-tabs__item.sortable-ghost");
188
+ if (el2 != null) {
189
+ el2.classList.remove("sortable-ghost");
138
190
  }
191
+ return;
192
+ }
193
+ const el = navEl.querySelector(
194
+ `.el-tabs__item[id="${currentSortItemId}"]`
195
+ );
196
+ if (el != null) {
197
+ el.classList.add("sortable-ghost");
139
198
  }
140
199
  };
141
200
  const bindDragSort = () => {
142
201
  unbindDragSort();
143
- const el = getNavEl();
144
- if (!props$1.sortable || !el) {
202
+ const navEl = getNavEl();
203
+ if (!props$1.sortable || !navEl) {
145
204
  return;
146
205
  }
147
- sortableIns = new SortableJs(el, {
148
- animation: 300,
206
+ sortableIns = new SortableJs(navEl, {
149
207
  draggable: ".el-tabs__item",
208
+ delay: 20,
150
209
  onUpdate: ({ oldDraggableIndex, newDraggableIndex }) => {
151
210
  if (typeof oldDraggableIndex === "number" && typeof newDraggableIndex === "number") {
152
211
  const data = [...props$1.items];
@@ -158,6 +217,29 @@ const _sfc_main = vue.defineComponent({
158
217
  emit("tabSortChange", data);
159
218
  }
160
219
  },
220
+ onStart: (e) => {
221
+ currentSortItemId = e.item.getAttribute("id");
222
+ checkSortGhostTab();
223
+ startGhostTimer(() => {
224
+ checkSortGhostTab();
225
+ });
226
+ },
227
+ onEnd: () => {
228
+ currentSortItemId = null;
229
+ checkSortGhostTab();
230
+ },
231
+ onChange: () => {
232
+ checkSortGhostTab();
233
+ startGhostTimer(() => {
234
+ checkSortGhostTab();
235
+ });
236
+ },
237
+ onMove: () => {
238
+ checkSortGhostTab();
239
+ startGhostTimer(() => {
240
+ checkSortGhostTab();
241
+ });
242
+ },
161
243
  setData: () => {
162
244
  }
163
245
  });
@@ -165,6 +247,7 @@ const _sfc_main = vue.defineComponent({
165
247
  const unbindDragSort = () => {
166
248
  sortableIns && sortableIns.destroy();
167
249
  sortableIns = null;
250
+ currentSortItemId = null;
168
251
  };
169
252
  const initMousewheelEvent = () => {
170
253
  const el = getHeaderEl();
@@ -184,15 +267,26 @@ const _sfc_main = vue.defineComponent({
184
267
  }
185
268
  }
186
269
  };
187
- vue.onMounted(() => {
188
- vue.nextTick(() => {
189
- checkScrollActive();
270
+ if (wrapProps && wrapProps.setTabMethods) {
271
+ wrapProps.setTabMethods({
272
+ triggerTabItemClick: handleItemClick,
273
+ triggerItemContextMenu: handleItemContextmenu
190
274
  });
275
+ }
276
+ vue.onMounted(() => {
191
277
  initMousewheelEvent();
192
278
  initTouchEvent();
193
279
  bindDragSort();
194
280
  });
195
281
  vue.onBeforeUnmount(() => {
282
+ if (wrapProps && wrapProps.setTabMethods) {
283
+ wrapProps.setTabMethods({
284
+ triggerTabItemClick: void 0,
285
+ triggerItemContextMenu: void 0
286
+ });
287
+ }
288
+ contextMenuTabItem = null;
289
+ contextMenuTabName = null;
196
290
  const el = getHeaderEl();
197
291
  if (el != null) {
198
292
  unbindMousewheel(el);
@@ -213,35 +307,30 @@ const _sfc_main = vue.defineComponent({
213
307
  initMousewheelEvent();
214
308
  }
215
309
  );
216
- vue.watch(
217
- () => props$1.modelValue,
218
- () => {
219
- vue.nextTick(() => {
220
- checkScrollActive();
221
- });
222
- }
223
- );
224
310
  return {
225
311
  omit: core.omit,
226
312
  tabRef,
227
- itemRefs,
228
- isWrap,
313
+ isOnlyTab,
229
314
  tabSize,
230
315
  tabType,
231
316
  tabProps,
232
- getContextMenus,
317
+ ctxMenuDropdownRef,
318
+ ctxMenuDropdownItems,
319
+ ctxMenuDropdownVirtualRef,
233
320
  updateModelValue,
321
+ handleContextmenu,
234
322
  handleTabClick,
235
323
  handleTabChange,
236
324
  handleTabRemove,
237
325
  handleTabAdd,
238
326
  handleEdit,
239
327
  handleItemClick,
240
- handleItemContextMenu,
241
- handleItemContextOpen,
242
- handleContextmenu,
328
+ handleItemCtxMenuVisible,
329
+ handleItemCtxMenuClick,
330
+ handleItemContextmenu,
243
331
  hideAllDropdown,
244
- updateActiveBar
332
+ updateActiveBar,
333
+ scrollTabs
245
334
  };
246
335
  }
247
336
  });
@@ -252,16 +341,20 @@ const _export_sfc = (sfc, props2) => {
252
341
  }
253
342
  return target;
254
343
  };
344
+ const _hoisted_1 = ["onClick", "onContextmenu"];
255
345
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
256
- const _component_TabTitle = vue.resolveComponent("TabTitle");
346
+ const _component_CornerLeftFilled = vue.resolveComponent("CornerLeftFilled");
347
+ const _component_ElIcon = vue.resolveComponent("ElIcon");
348
+ const _component_CornerRightFilled = vue.resolveComponent("CornerRightFilled");
257
349
  const _component_ElTabPane = vue.resolveComponent("ElTabPane");
350
+ const _component_EleDropdown = vue.resolveComponent("EleDropdown");
258
351
  const _component_ElTabs = vue.resolveComponent("ElTabs");
259
352
  return vue.openBlock(), vue.createBlock(_component_ElTabs, vue.mergeProps(_ctx.tabProps, {
260
353
  ref: "tabRef",
261
354
  type: _ctx.tabType === "card" || _ctx.tabType === "border-card" ? _ctx.tabType : void 0,
262
355
  class: [
263
356
  "ele-tabs",
264
- { "ele-tabs-wrap": _ctx.isWrap },
357
+ { "ele-tabs-wrap": _ctx.isOnlyTab },
265
358
  { "is-small": _ctx.tabSize === "small" },
266
359
  { "is-large": _ctx.tabSize === "large" },
267
360
  { "is-default": !_ctx.tabType || _ctx.tabType === "default" },
@@ -271,6 +364,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
271
364
  { "is-button": _ctx.tabType === "button" },
272
365
  { "is-tag": _ctx.tabType === "tag" },
273
366
  { "is-center": _ctx.center },
367
+ { "is-sortable": _ctx.sortable },
274
368
  { "is-flex-table": _ctx.flexTable }
275
369
  ],
276
370
  "onUpdate:modelValue": _ctx.updateModelValue,
@@ -283,54 +377,86 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
283
377
  }), vue.createSlots({
284
378
  default: vue.withCtx(() => [
285
379
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item, index2) => {
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",
380
+ return vue.openBlock(), vue.createBlock(_component_ElTabPane, vue.mergeProps({
381
+ key: [
382
+ index2,
383
+ item.name,
384
+ item.label,
385
+ !!item.closable,
386
+ !!item.disabled,
387
+ !!item.lazy
388
+ ].join("-"),
389
+ ref_for: true
390
+ }, _ctx.omit(item, ["slot", "meta"])), vue.createSlots({
391
+ label: vue.withCtx(() => [
392
+ vue.createElementVNode("div", {
393
+ class: "ele-tab-title",
394
+ onClick: (e) => _ctx.handleItemClick(item, void 0, e),
395
+ onContextmenu: (e) => _ctx.handleItemContextmenu(item, void 0, e)
396
+ }, [
397
+ vue.renderSlot(_ctx.$slots, "label", {
295
398
  item,
296
399
  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"])
321
- ]),
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 })
400
+ active: _ctx.modelValue
401
+ }, () => [
402
+ vue.createTextVNode(vue.toDisplayString(item.label), 1)
403
+ ])
404
+ ], 40, _hoisted_1),
405
+ _ctx.tabType === "simple" || _ctx.tabType === "indicator" ? (vue.openBlock(), vue.createBlock(_component_ElIcon, {
406
+ key: 0,
407
+ class: "ele-tab-corner-left"
408
+ }, {
409
+ default: vue.withCtx(() => [
410
+ vue.createVNode(_component_CornerLeftFilled)
411
+ ]),
412
+ _: 1
413
+ })) : vue.createCommentVNode("", true),
414
+ _ctx.tabType === "simple" || _ctx.tabType === "indicator" ? (vue.openBlock(), vue.createBlock(_component_ElIcon, {
415
+ key: 1,
416
+ class: "ele-tab-corner-right"
417
+ }, {
418
+ default: vue.withCtx(() => [
419
+ vue.createVNode(_component_CornerRightFilled)
328
420
  ]),
329
- key: "0"
330
- } : void 0
331
- ]), 1040)) : vue.createCommentVNode("", true)
332
- ], 64);
333
- }), 256))
421
+ _: 1
422
+ })) : vue.createCommentVNode("", true)
423
+ ]),
424
+ _: 2
425
+ }, [
426
+ item.name && _ctx.$slots[item.slot || item.name] ? {
427
+ name: "default",
428
+ fn: vue.withCtx(() => [
429
+ vue.renderSlot(_ctx.$slots, item.slot || item.name, { item })
430
+ ]),
431
+ key: "0"
432
+ } : void 0
433
+ ]), 1040);
434
+ }), 128)),
435
+ _ctx.contextMenu ? (vue.openBlock(), vue.createBlock(_component_EleDropdown, vue.mergeProps(
436
+ {
437
+ key: 0,
438
+ triggerKeys: [],
439
+ persistent: false,
440
+ placement: "bottom-start",
441
+ popperClass: "ele-tab-popup",
442
+ popperOptions: {
443
+ modifiers: [{ name: "offset", options: { offset: [0, 8] } }]
444
+ }
445
+ },
446
+ !_ctx.contextMenu || typeof _ctx.contextMenu == "boolean" ? {} : _ctx.contextMenu,
447
+ {
448
+ ref: "ctxMenuDropdownRef",
449
+ componentType: "pro",
450
+ preventContextmenu: true,
451
+ trigger: "contextmenu",
452
+ virtualTriggering: true,
453
+ virtualRef: _ctx.ctxMenuDropdownVirtualRef,
454
+ disabled: !_ctx.ctxMenuDropdownItems.length,
455
+ items: _ctx.ctxMenuDropdownItems,
456
+ onCommand: _ctx.handleItemCtxMenuClick,
457
+ onVisibleChange: _ctx.handleItemCtxMenuVisible
458
+ }
459
+ ), null, 16, ["virtualRef", "disabled", "items", "onCommand", "onVisibleChange"])) : vue.createCommentVNode("", true)
334
460
  ]),
335
461
  _: 2
336
462
  }, [
@@ -340,8 +466,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
340
466
  vue.renderSlot(_ctx.$slots, "add-icon")
341
467
  ]),
342
468
  key: "0"
343
- } : void 0,
344
- _ctx.$slots.addIcon ? {
469
+ } : _ctx.$slots.addIcon ? {
345
470
  name: "addIcon",
346
471
  fn: vue.withCtx(() => [
347
472
  vue.renderSlot(_ctx.$slots, "addIcon")
@@ -1,10 +1,9 @@
1
- import { Ref } from 'vue';
2
1
  import { TabPaneName, TabsPaneContext } from 'element-plus';
3
2
  import { omit } from '../utils/core';
4
3
  import { ElTabsProps, ElTabsInstance } from '../ele-app/el';
5
4
  import { EleDropdownInstance } from '../ele-app/plus';
6
- import { TabPaneItem, TabSize, TabType, TabEventOption, ContextMenusFunc } from './types';
7
- import { TabTitleInstance } from './props';
5
+ import { DropdownItem } from '../ele-dropdown/types';
6
+ import { TabPaneItem, TabSize, TabType } from './types';
8
7
 
9
8
  declare const _default: import('vue').DefineComponent<{
10
9
  items: {
@@ -42,29 +41,32 @@ declare const _default: import('vue').DefineComponent<{
42
41
  stretch: BooleanConstructor;
43
42
  }, {
44
43
  omit: typeof omit;
45
- tabRef: Ref<ElTabsInstance>;
46
- itemRefs: Ref<TabTitleInstance[]>;
47
- isWrap: import('vue').ComputedRef<boolean>;
44
+ tabRef: import('vue').Ref<ElTabsInstance>;
45
+ isOnlyTab: import('vue').ComputedRef<boolean>;
48
46
  tabSize: import('vue').ComputedRef<TabSize | undefined>;
49
47
  tabType: import('vue').ComputedRef<TabType | undefined>;
50
48
  tabProps: import('vue').ComputedRef<Omit<ElTabsProps, "type">>;
51
- getContextMenus: ContextMenusFunc;
49
+ ctxMenuDropdownRef: import('vue').Ref<EleDropdownInstance>;
50
+ ctxMenuDropdownItems: import('vue').ShallowRef<DropdownItem[]>;
51
+ ctxMenuDropdownVirtualRef: import('vue').Ref<any>;
52
52
  updateModelValue: (name: TabPaneName) => void;
53
+ handleContextmenu: (e: MouseEvent) => void;
53
54
  handleTabClick: (pane: TabsPaneContext, e: Event) => void;
54
55
  handleTabChange: (name: TabPaneName) => void;
55
56
  handleTabRemove: (name: TabPaneName) => void;
56
57
  handleTabAdd: () => void;
57
58
  handleEdit: (name: TabPaneName | undefined, action: "remove" | "add") => void;
58
- handleItemClick: (option: TabEventOption) => void;
59
- handleItemContextMenu: (option: TabEventOption) => void;
60
- handleItemContextOpen: (ref: EleDropdownInstance) => void;
61
- handleContextmenu: (e: MouseEvent) => void;
59
+ handleItemClick: (item: TabPaneItem | undefined, tabName: string | number | undefined, e: MouseEvent) => void;
60
+ handleItemCtxMenuVisible: (visible: boolean) => void;
61
+ handleItemCtxMenuClick: (command: string) => void;
62
+ handleItemContextmenu: (item: TabPaneItem | undefined, tabName: string | number | undefined, e: MouseEvent) => void;
62
63
  hideAllDropdown: () => void;
63
64
  updateActiveBar: () => void;
65
+ scrollTabs: (direction: "prev" | "next", done?: () => void) => void;
64
66
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
65
- tabItemClick: (_opt: TabEventOption) => boolean;
66
- tabContextMenu: (_opt: TabEventOption) => boolean;
67
- tabContextOpen: (_ref: EleDropdownInstance) => boolean;
67
+ tabItemClick: (_opt: import('./types').TabEventOption) => boolean;
68
+ tabContextMenu: (_opt: import('./types').TabEventOption) => boolean;
69
+ tabContextOpen: (_ref: EleDropdownInstance, _item?: TabPaneItem | null, _name?: string | number | null) => boolean;
68
70
  tabSortChange: (_data: TabPaneItem[]) => boolean;
69
71
  "update:modelValue": (name: TabPaneName) => boolean;
70
72
  tabClick: (pane: TabsPaneContext, ev: Event) => boolean;
@@ -123,23 +125,23 @@ declare const _default: import('vue').DefineComponent<{
123
125
  index: string | undefined;
124
126
  isClosable: boolean;
125
127
  }, ev: Event) => any) | undefined;
128
+ onTabRemove?: ((name: TabPaneName) => any) | undefined;
126
129
  onTabChange?: ((name: TabPaneName) => any) | undefined;
127
130
  onEdit?: ((paneName: TabPaneName | undefined, action: "add" | "remove") => any) | undefined;
128
- onTabRemove?: ((name: TabPaneName) => any) | undefined;
129
131
  onTabAdd?: (() => any) | undefined;
130
- onTabContextMenu?: ((_opt: TabEventOption) => any) | undefined;
131
- onTabItemClick?: ((_opt: TabEventOption) => any) | undefined;
132
- onTabContextOpen?: ((_ref: EleDropdownInstance) => any) | undefined;
132
+ onTabContextMenu?: ((_opt: import('./types').TabEventOption) => any) | undefined;
133
+ onTabItemClick?: ((_opt: import('./types').TabEventOption) => any) | undefined;
134
+ onTabContextOpen?: ((_ref: EleDropdownInstance, _item?: TabPaneItem | null | undefined, _name?: string | number | null | undefined) => any) | undefined;
133
135
  onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
134
136
  }, {
135
137
  mousewheel: boolean;
136
138
  closable: boolean;
137
139
  center: boolean;
138
- beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
139
140
  sortable: boolean;
140
141
  addable: boolean;
141
142
  editable: boolean;
142
143
  tabPosition: import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "top" | "bottom" | "right" | "left", unknown>;
144
+ beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import('element-plus/es/utils/typescript').Awaitable<void | boolean>;
143
145
  stretch: boolean;
144
146
  handleClick: boolean;
145
147
  flexTable: boolean;
@@ -34,7 +34,7 @@ const tabsEmits = {
34
34
  /** 页签右键菜单项点击事件 */
35
35
  tabContextMenu: (_opt) => true,
36
36
  /** 页签右键菜单打开事件 */
37
- tabContextOpen: (_ref) => true,
37
+ tabContextOpen: (_ref, _item, _name) => true,
38
38
  /** 拖动排序改变事件 */
39
39
  tabSortChange: (_data) => true
40
40
  };
@@ -1,7 +1,6 @@
1
1
  import { PropType, ExtractPropTypes, InjectionKey } from 'vue';
2
2
  import { tabsProps as elTabsProps } from 'element-plus';
3
3
  import { EleDropdownProps, EleDropdownInstance } from '../ele-app/plus';
4
- import { default as TabTitle } from './components/tab-title';
5
4
  import { TabPaneItem, TabSize, TabType, ContextMenus, TabEventOption, TabWrapProvide } from './types';
6
5
 
7
6
  /**
@@ -62,7 +61,7 @@ export declare const tabsEmits: {
62
61
  /** 页签右键菜单项点击事件 */
63
62
  tabContextMenu: (_opt: TabEventOption) => boolean;
64
63
  /** 页签右键菜单打开事件 */
65
- tabContextOpen: (_ref: EleDropdownInstance) => boolean;
64
+ tabContextOpen: (_ref: EleDropdownInstance, _item?: TabPaneItem | null, _name?: string | number | null) => boolean;
66
65
  /** 拖动排序改变事件 */
67
66
  tabSortChange: (_data: TabPaneItem[]) => boolean;
68
67
  "update:modelValue": (name: import('element-plus').TabPaneName) => boolean;
@@ -77,10 +76,6 @@ export declare const tabsEmits: {
77
76
  */
78
77
  export type TabPropKeys = Array<keyof typeof elTabsProps>;
79
78
  export declare const tabPropKeys: TabPropKeys;
80
- /**
81
- * 页签标题实例
82
- */
83
- export type TabTitleInstance = InstanceType<typeof TabTitle> | null;
84
79
  /**
85
80
  * 标签页容器依赖注入key
86
81
  */