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
@@ -1,4 +1,5 @@
1
1
  import { Ref } from 'vue';
2
+ import { StyleValue } from '../ele-app/types';
2
3
 
3
4
  declare const _default: import('vue').DefineComponent<{
4
5
  width: NumberConstructor;
@@ -14,12 +15,12 @@ declare const _default: import('vue').DefineComponent<{
14
15
  type: NumberConstructor;
15
16
  default: number;
16
17
  };
17
- customStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
18
+ customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
18
19
  fixed: BooleanConstructor;
19
20
  wrapPosition: {
20
21
  type: BooleanConstructor;
21
22
  default: boolean;
22
- }; /** 根节点 */
23
+ };
23
24
  disabled: BooleanConstructor;
24
25
  }, {
25
26
  rootKey: Ref<number>;
@@ -40,12 +41,12 @@ declare const _default: import('vue').DefineComponent<{
40
41
  type: NumberConstructor;
41
42
  default: number;
42
43
  };
43
- customStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
44
+ customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
44
45
  fixed: BooleanConstructor;
45
46
  wrapPosition: {
46
47
  type: BooleanConstructor;
47
48
  default: boolean;
48
- }; /** 根节点 */
49
+ };
49
50
  disabled: BooleanConstructor;
50
51
  }>>, {
51
52
  lineGap: number;
@@ -1,4 +1,5 @@
1
1
  import { PropType, ExtractPropTypes } from 'vue';
2
+ import { StyleValue } from '../ele-app/types';
2
3
  import { WatermarkGap, WatermarkOffset, WatermarkFont } from './types';
3
4
 
4
5
  export declare const watermarkProps: {
@@ -26,7 +27,7 @@ export declare const watermarkProps: {
26
27
  default: number;
27
28
  };
28
29
  /** 自定义样式 */
29
- customStyle: PropType<Partial<import('vue').CSSProperties>>;
30
+ customStyle: PropType<Exclude<StyleValue, string>>;
30
31
  /** 是否使用固定定位 */
31
32
  fixed: BooleanConstructor;
32
33
  /** 是否为外层添加定位样式 */
@@ -1,9 +1,9 @@
1
1
  import { PropType } from 'vue';
2
- import { default as Player } from 'xgplayer';
2
+ import { default as Player, IPlayerOptions } from 'xgplayer';
3
3
 
4
4
  declare const _default: import('vue').DefineComponent<{
5
5
  config: {
6
- type: PropType<import('xgplayer/es/defaultConfig').IPlayerOptions>;
6
+ type: PropType<IPlayerOptions>;
7
7
  required: true;
8
8
  };
9
9
  }, {
@@ -13,7 +13,7 @@ declare const _default: import('vue').DefineComponent<{
13
13
  player: (_player: Player | null) => true;
14
14
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
15
  config: {
16
- type: PropType<import('xgplayer/es/defaultConfig').IPlayerOptions>;
16
+ type: PropType<IPlayerOptions>;
17
17
  required: true;
18
18
  };
19
19
  }>> & {
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
2
+ const _sfc_main = defineComponent({
3
+ name: "SizeCompactOutlined"
4
+ });
5
+ const _export_sfc = (sfc, props) => {
6
+ const target = sfc.__vccOpts || sfc;
7
+ for (const [key, val] of props) {
8
+ target[key] = val;
9
+ }
10
+ return target;
11
+ };
12
+ const _hoisted_1 = {
13
+ viewBox: "0 0 48 48",
14
+ fill: "none",
15
+ stroke: "currentColor",
16
+ "stroke-width": "4"
17
+ };
18
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M47 14L41 19L35 14M41 1V19M47 34L41 29L35 34M41 47V29" }, null, -1);
19
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H31" }, null, -1);
20
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H31" }, null, -1);
21
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H31" }, null, -1);
22
+ const _hoisted_6 = [
23
+ _hoisted_2,
24
+ _hoisted_3,
25
+ _hoisted_4,
26
+ _hoisted_5
27
+ ];
28
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_6);
30
+ }
31
+ const SizeCompactOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
32
+ export {
33
+ SizeCompactOutlined as default
34
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
2
+ const _sfc_main = defineComponent({
3
+ name: "SizeSlackOutlined"
4
+ });
5
+ const _export_sfc = (sfc, props) => {
6
+ const target = sfc.__vccOpts || sfc;
7
+ for (const [key, val] of props) {
8
+ target[key] = val;
9
+ }
10
+ return target;
11
+ };
12
+ const _hoisted_1 = {
13
+ viewBox: "0 0 48 48",
14
+ fill: "none",
15
+ stroke: "currentColor",
16
+ "stroke-width": "4"
17
+ };
18
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M41 6V42M35 11L41 6L47 11M47 37L41 42L35 37" }, null, -1);
19
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H31" }, null, -1);
20
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H31" }, null, -1);
21
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H31" }, null, -1);
22
+ const _hoisted_6 = [
23
+ _hoisted_2,
24
+ _hoisted_3,
25
+ _hoisted_4,
26
+ _hoisted_5
27
+ ];
28
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_6);
30
+ }
31
+ const SizeSlackOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
32
+ export {
33
+ SizeSlackOutlined as default
34
+ };
@@ -86,6 +86,8 @@ export { default as ResizeOutlined } from './ResizeOutlined';
86
86
  export { default as SearchOutlined } from './SearchOutlined';
87
87
  export { default as SettingOutlined } from './SettingOutlined';
88
88
  export { default as ShoppingOutlined } from './ShoppingOutlined';
89
+ export { default as SizeCompactOutlined } from './SizeCompactOutlined';
90
+ export { default as SizeSlackOutlined } from './SizeSlackOutlined';
89
91
  export { default as SortOutlined } from './SortOutlined';
90
92
  export { default as StarFilled } from './StarFilled';
91
93
  export { default as StepBackwardFilled } from './StepBackwardFilled';
package/es/icons/index.js CHANGED
@@ -86,27 +86,29 @@ import { default as default86 } from "./ResizeOutlined";
86
86
  import { default as default87 } from "./SearchOutlined";
87
87
  import { default as default88 } from "./SettingOutlined";
88
88
  import { default as default89 } from "./ShoppingOutlined";
89
- import { default as default90 } from "./SortOutlined";
90
- import { default as default91 } from "./StarFilled";
91
- import { default as default92 } from "./StepBackwardFilled";
92
- import { default as default93 } from "./StepForwardFilled";
93
- import { default as default94 } from "./SuitcaseOutlined";
94
- import { default as default95 } from "./SunOutlined";
95
- import { default as default96 } from "./SwapOutlined";
96
- import { default as default97 } from "./SyncOutlined";
97
- import { default as default98 } from "./TableOutlined";
98
- import { default as default99 } from "./TagOutlined";
99
- import { default as default100 } from "./TimerOutlined";
100
- import { default as default101 } from "./UndoOutlined";
101
- import { default as default102 } from "./UnlockOutlined";
102
- import { default as default103 } from "./UploadOutlined";
103
- import { default as default104 } from "./UserOutlined";
104
- import { default as default105 } from "./VerticalAlignMiddleOutlined";
105
- import { default as default106 } from "./VerticalLeftOutlined";
106
- import { default as default107 } from "./VerticalRightOutlined";
107
- import { default as default108 } from "./WarningOutlined";
108
- import { default as default109 } from "./ZoomInOutlined";
109
- import { default as default110 } from "./ZoomOutOutlined";
89
+ import { default as default90 } from "./SizeCompactOutlined";
90
+ import { default as default91 } from "./SizeSlackOutlined";
91
+ import { default as default92 } from "./SortOutlined";
92
+ import { default as default93 } from "./StarFilled";
93
+ import { default as default94 } from "./StepBackwardFilled";
94
+ import { default as default95 } from "./StepForwardFilled";
95
+ import { default as default96 } from "./SuitcaseOutlined";
96
+ import { default as default97 } from "./SunOutlined";
97
+ import { default as default98 } from "./SwapOutlined";
98
+ import { default as default99 } from "./SyncOutlined";
99
+ import { default as default100 } from "./TableOutlined";
100
+ import { default as default101 } from "./TagOutlined";
101
+ import { default as default102 } from "./TimerOutlined";
102
+ import { default as default103 } from "./UndoOutlined";
103
+ import { default as default104 } from "./UnlockOutlined";
104
+ import { default as default105 } from "./UploadOutlined";
105
+ import { default as default106 } from "./UserOutlined";
106
+ import { default as default107 } from "./VerticalAlignMiddleOutlined";
107
+ import { default as default108 } from "./VerticalLeftOutlined";
108
+ import { default as default109 } from "./VerticalRightOutlined";
109
+ import { default as default110 } from "./WarningOutlined";
110
+ import { default as default111 } from "./ZoomInOutlined";
111
+ import { default as default112 } from "./ZoomOutOutlined";
110
112
  export {
111
113
  default2 as AnalysisOutlined,
112
114
  default3 as ApplicationOutlined,
@@ -196,25 +198,27 @@ export {
196
198
  default87 as SearchOutlined,
197
199
  default88 as SettingOutlined,
198
200
  default89 as ShoppingOutlined,
199
- default90 as SortOutlined,
200
- default91 as StarFilled,
201
- default92 as StepBackwardFilled,
202
- default93 as StepForwardFilled,
203
- default94 as SuitcaseOutlined,
204
- default95 as SunOutlined,
205
- default96 as SwapOutlined,
206
- default97 as SyncOutlined,
207
- default98 as TableOutlined,
208
- default99 as TagOutlined,
209
- default100 as TimerOutlined,
210
- default101 as UndoOutlined,
211
- default102 as UnlockOutlined,
212
- default103 as UploadOutlined,
213
- default104 as UserOutlined,
214
- default105 as VerticalAlignMiddleOutlined,
215
- default106 as VerticalLeftOutlined,
216
- default107 as VerticalRightOutlined,
217
- default108 as WarningOutlined,
218
- default109 as ZoomInOutlined,
219
- default110 as ZoomOutOutlined
201
+ default90 as SizeCompactOutlined,
202
+ default91 as SizeSlackOutlined,
203
+ default92 as SortOutlined,
204
+ default93 as StarFilled,
205
+ default94 as StepBackwardFilled,
206
+ default95 as StepForwardFilled,
207
+ default96 as SuitcaseOutlined,
208
+ default97 as SunOutlined,
209
+ default98 as SwapOutlined,
210
+ default99 as SyncOutlined,
211
+ default100 as TableOutlined,
212
+ default101 as TagOutlined,
213
+ default102 as TimerOutlined,
214
+ default103 as UndoOutlined,
215
+ default104 as UnlockOutlined,
216
+ default105 as UploadOutlined,
217
+ default106 as UserOutlined,
218
+ default107 as VerticalAlignMiddleOutlined,
219
+ default108 as VerticalLeftOutlined,
220
+ default109 as VerticalRightOutlined,
221
+ default110 as WarningOutlined,
222
+ default111 as ZoomInOutlined,
223
+ default112 as ZoomOutOutlined
220
224
  };
package/es/lang/en_US.js CHANGED
@@ -46,6 +46,7 @@ const localeValues = {
46
46
  columnExpand: "Expand",
47
47
  columnFixedLeft: "Pin to left",
48
48
  columnFixedRight: "Pin to right",
49
+ columnWidth: "Width",
49
50
  exportOk: "Ok",
50
51
  exportCancel: "Cancel",
51
52
  exportFileName: "Filename",
package/es/lang/zh_CN.js CHANGED
@@ -46,6 +46,7 @@ const localeValues = {
46
46
  columnExpand: "展开列",
47
47
  columnFixedLeft: "固定在左侧",
48
48
  columnFixedRight: "固定在右侧",
49
+ columnWidth: "列宽",
49
50
  exportOk: "确定",
50
51
  exportCancel: "取消",
51
52
  exportFileName: "文件名",
package/es/lang/zh_TW.js CHANGED
@@ -46,6 +46,7 @@ const localeValues = {
46
46
  columnExpand: "展開列",
47
47
  columnFixedLeft: "固定在左側",
48
48
  columnFixedRight: "固定在右側",
49
+ columnWidth: "列寬",
49
50
  exportOk: "確認",
50
51
  exportCancel: "取消",
51
52
  exportFileName: "檔名",
@@ -505,7 +505,13 @@ $ele: map.deep-merge(
505
505
  'sm-radius': 24px,
506
506
  'sm-space': 4px,
507
507
  'sm-gap': 8px,
508
- 'sm-font-size': 14px
508
+ 'sm-font-size': 14px,
509
+ 'lg-height': 40px,
510
+ 'lg-padding': 0 8px,
511
+ 'lg-radius': 40px,
512
+ 'lg-space': 8px,
513
+ 'lg-gap': 8px 12px,
514
+ 'lg-font-size': 14px
509
515
  ),
510
516
  'segmented': (
511
517
  // 分段器
@@ -714,15 +720,16 @@ $ele: map.deep-merge(
714
720
  // 高级表格列配置
715
721
  'width': 220px,
716
722
  'max-height': 480px,
717
- 'header-padding': 6px 16px 4px 12px,
723
+ 'header-padding': 6px 14px 4px 14px,
718
724
  'header-border': 1px solid elVar('border-color', 'light'),
719
725
  'body-padding': 6px 0,
720
- 'item-padding': 12px,
726
+ 'item-padding': 14px,
721
727
  'item-height': 28px,
722
728
  'item-hover-bg': elVar('color-primary', 'light-9'),
723
729
  'item-radius': 0,
724
- 'btn-space': 0,
725
- 'btn-padding': 3px,
730
+ 'btn-space': 1px,
731
+ 'btn-size': 18px,
732
+ 'btn-offset': -6px,
726
733
  'btn-radius': elVar('border-radius', 'small'),
727
734
  'btn-color': elVar('text-color', 'placeholder'),
728
735
  'btn-hover-color': elVar('text-color', 'primary'),
@@ -109,7 +109,8 @@ $ele-rounded: map.deep-merge(
109
109
  'active-bg': none,
110
110
  'active-border': 1px solid elVar('color', 'primary'),
111
111
  'active-font-weight': bold,
112
- 'sm-radius': elVar('border-radius', 'base')
112
+ 'sm-radius': elVar('border-radius', 'base'),
113
+ 'lg-radius': $radius-large
113
114
  ),
114
115
  'segmented': (
115
116
  'radius': elVar('border-radius', 'small')
@@ -164,7 +165,7 @@ $ele-rounded: map.deep-merge(
164
165
  ),
165
166
  'tool-column': (
166
167
  'body-padding': 6px 4px,
167
- 'item-padding': 8px,
168
+ 'item-padding': 10px,
168
169
  'item-radius': elVar('border-radius', 'small'),
169
170
  'btn-hover-bg': elVar('color-primary', 'light-8'),
170
171
  'btn-active-bg': elVar('color-primary', 'light-7')
@@ -1,9 +1,12 @@
1
+ import { Ref } from 'vue';
2
+
1
3
  /**
2
- * useTimer返回结果
4
+ * useTimer 返回结果
3
5
  */
4
6
  export type UseTimerResult = [
5
- (callback: () => void, timeout?: number) => void,
6
- () => void
7
+ (callback?: () => void, timeout?: number) => void,
8
+ () => void,
9
+ Ref<boolean>
7
10
  ];
8
11
  /**
9
12
  * 定时器
@@ -12,7 +15,7 @@ export type UseTimerResult = [
12
15
  */
13
16
  export declare function useTimer(ms?: number | (() => number), cb?: () => void): UseTimerResult;
14
17
  /**
15
- * useMediaQuery返回结果
18
+ * useMediaQuery 返回结果
16
19
  */
17
20
  export type UseMediaQueryResult = [MediaQueryList, () => void, () => void];
18
21
  /**
@@ -38,3 +41,71 @@ export declare function useCollapseAnim(): {
38
41
  handleLeave: (el: HTMLElement) => void;
39
42
  handleAfterLeave: (el: HTMLElement) => void;
40
43
  };
44
+ /**
45
+ * 鼠标滚轮事件回调方法参数
46
+ */
47
+ export interface UseMousewheelCallbackParam {
48
+ /** 事件对象 */
49
+ e: MouseEvent;
50
+ /** 方向 */
51
+ direction: 'up' | 'down';
52
+ }
53
+ /**
54
+ * 鼠标滚轮事件
55
+ * @param cb 回调
56
+ */
57
+ export declare function useMousewheel(cb?: (p: UseMousewheelCallbackParam) => void): {
58
+ handleMousewheel: (e: MouseEvent) => void;
59
+ handleFirefoxMousewheel: (e: MouseEvent) => void;
60
+ bindMousewheel: (el: HTMLElement) => void;
61
+ unbindMousewheel: (el: HTMLElement) => void;
62
+ };
63
+ /**
64
+ * 触摸事件回调参数
65
+ */
66
+ export interface UseTouchEventCallbackParam<T> {
67
+ /** 事件对象 */
68
+ e: T;
69
+ /** 开始横向位置 */
70
+ startX: number | null;
71
+ /** 开始纵向位置 */
72
+ startY: number | null;
73
+ /** 横向移动距离 */
74
+ distanceX?: number | null;
75
+ /** 纵向移动距离 */
76
+ distanceY?: number | null;
77
+ }
78
+ /**
79
+ * 触摸事件参数
80
+ */
81
+ export interface UseTouchEventOption<T> {
82
+ /** 触摸开始的回调 */
83
+ start?: (param: UseTouchEventCallbackParam<T>) => void;
84
+ /** 触摸移动的回调 */
85
+ move?: (param: UseTouchEventCallbackParam<T>) => void;
86
+ /** 触摸结束的回调 */
87
+ end?: (param: UseTouchEventCallbackParam<T>) => void;
88
+ }
89
+ /**
90
+ * 触摸事件
91
+ * @param option 参数
92
+ */
93
+ export declare function useTouchEvent(option?: UseTouchEventOption<TouchEvent>): {
94
+ handleTouchStart: (e: TouchEvent) => void;
95
+ handleTouchMove: (e: TouchEvent) => void;
96
+ handleTouchEnd: (e: TouchEvent) => void;
97
+ bindTouchEvent: (el: HTMLElement) => void;
98
+ unbindTouchEvent: (el: HTMLElement) => void;
99
+ };
100
+ /**
101
+ * 移动事件对象
102
+ */
103
+ export type MoveEvent = MouseEvent | TouchEvent;
104
+ /**
105
+ * 鼠标移动事件或触摸移动事件
106
+ * @param option 参数
107
+ */
108
+ export declare function useMoveEvent(option?: UseTouchEventOption<MoveEvent>): {
109
+ handleMousedown: (e: MouseEvent) => void;
110
+ handleTouchstart: (e: TouchEvent) => void;
111
+ };
package/es/utils/hook.js CHANGED
@@ -1,23 +1,28 @@
1
- import { onBeforeUnmount } from "vue";
1
+ import { ref, onBeforeUnmount } from "vue";
2
2
  function useTimer(ms, cb) {
3
3
  let timer = null;
4
+ const waiting = ref(false);
4
5
  const stopTimer = () => {
5
6
  if (timer != null) {
6
7
  clearTimeout(timer);
7
8
  timer = null;
8
9
  }
10
+ waiting.value = false;
9
11
  };
10
12
  const startTimer = (callback, timeout) => {
11
13
  stopTimer();
12
- timer = setTimeout(
13
- callback ?? cb,
14
- timeout ?? (typeof ms === "function" ? ms() : ms)
15
- );
14
+ waiting.value = true;
15
+ const to = timeout ?? (typeof ms === "function" ? ms() : ms);
16
+ timer = setTimeout(() => {
17
+ const func = callback ?? cb;
18
+ func && func();
19
+ waiting.value = false;
20
+ }, to);
16
21
  };
17
22
  onBeforeUnmount(() => {
18
23
  stopTimer();
19
24
  });
20
- return [startTimer, stopTimer];
25
+ return [startTimer, stopTimer, waiting];
21
26
  }
22
27
  function useMediaQuery(query, onChange) {
23
28
  const mediaQuery = window.matchMedia(query);
@@ -103,9 +108,153 @@ function useCollapseAnim() {
103
108
  handleAfterLeave
104
109
  };
105
110
  }
111
+ function useMousewheel(cb) {
112
+ const handleMousewheel = (e) => {
113
+ const delta = e.wheelDelta || e.detail;
114
+ cb && cb({ e, direction: delta > 0 ? "up" : "down" });
115
+ };
116
+ const handleFirefoxMousewheel = (e) => {
117
+ const delta = e.wheelDelta || e.detail;
118
+ cb && cb({ e, direction: delta < 0 ? "up" : "down" });
119
+ };
120
+ const bindMousewheel = (el) => {
121
+ el.addEventListener("mousewheel", handleMousewheel, { passive: false });
122
+ el.addEventListener("DOMMouseScroll", handleFirefoxMousewheel);
123
+ };
124
+ const unbindMousewheel = (el) => {
125
+ el.removeEventListener("mousewheel", handleMousewheel);
126
+ el.removeEventListener("DOMMouseScroll", handleFirefoxMousewheel);
127
+ };
128
+ return {
129
+ handleMousewheel,
130
+ handleFirefoxMousewheel,
131
+ bindMousewheel,
132
+ unbindMousewheel
133
+ };
134
+ }
135
+ function useTouchEvent(option) {
136
+ let startX = null;
137
+ let startY = null;
138
+ let distanceX = null;
139
+ let distanceY = null;
140
+ const handleTouchStart = (e) => {
141
+ startX = e.touches[0].clientX;
142
+ startY = e.touches[0].clientY;
143
+ if (option && option.start) {
144
+ option.start({ e, startX, startY });
145
+ }
146
+ };
147
+ const handleTouchMove = (e) => {
148
+ if (startX != null && startY != null) {
149
+ const currentX = e.touches[0].clientX;
150
+ const currentY = e.touches[0].clientY;
151
+ distanceX = currentX - startX;
152
+ distanceY = currentY - startY;
153
+ if (option && option.move) {
154
+ option.move({ e, startX, startY, distanceX, distanceY });
155
+ }
156
+ }
157
+ };
158
+ const handleTouchEnd = (e) => {
159
+ if (option && option.end) {
160
+ option.end({ e, startX, startY, distanceX, distanceY });
161
+ }
162
+ startX = null;
163
+ startY = null;
164
+ distanceX = null;
165
+ distanceY = null;
166
+ };
167
+ const bindTouchEvent = (el) => {
168
+ el.addEventListener("touchstart", handleTouchStart);
169
+ el.addEventListener("touchmove", handleTouchMove);
170
+ el.addEventListener("touchend", handleTouchEnd);
171
+ };
172
+ const unbindTouchEvent = (el) => {
173
+ el.removeEventListener("touchstart", handleTouchStart);
174
+ el.removeEventListener("touchmove", handleTouchMove);
175
+ el.removeEventListener("touchend", handleTouchEnd);
176
+ };
177
+ return {
178
+ handleTouchStart,
179
+ handleTouchMove,
180
+ handleTouchEnd,
181
+ bindTouchEvent,
182
+ unbindTouchEvent
183
+ };
184
+ }
185
+ function useMoveEvent(option) {
186
+ let startX = null;
187
+ let startY = null;
188
+ let distanceX = null;
189
+ let distanceY = null;
190
+ const unbindEvent = () => {
191
+ document.removeEventListener("mousemove", mousemoveFn);
192
+ document.removeEventListener("mouseup", mouseupFn);
193
+ document.removeEventListener("touchmove", touchmoveFn);
194
+ document.removeEventListener("touchend", touchendFn);
195
+ };
196
+ const emitStart = (clientX, clientY, e) => {
197
+ startX = clientX;
198
+ startY = clientY;
199
+ if (option && option.start) {
200
+ option.start({ e, startX, startY });
201
+ }
202
+ };
203
+ const emitMove = (currentX, currentY, e) => {
204
+ if (startX != null && startY != null) {
205
+ distanceX = currentX - startX;
206
+ distanceY = currentY - startY;
207
+ if (option && option.move) {
208
+ option.move({ e, startX, startY, distanceX, distanceY });
209
+ }
210
+ }
211
+ };
212
+ const emitEnd = (e) => {
213
+ unbindEvent();
214
+ if (option && option.end) {
215
+ option.end({ e, startX, startY, distanceX, distanceY });
216
+ }
217
+ startX = null;
218
+ startY = null;
219
+ distanceX = null;
220
+ distanceY = null;
221
+ };
222
+ const mousemoveFn = function(e) {
223
+ emitMove(e.clientX, e.clientY, e);
224
+ };
225
+ const touchmoveFn = function(e) {
226
+ emitMove(e.touches[0].clientX, e.touches[0].clientY, e);
227
+ };
228
+ const mouseupFn = (e) => {
229
+ emitEnd(e);
230
+ };
231
+ const touchendFn = (e) => {
232
+ emitEnd(e);
233
+ };
234
+ const handleMousedown = (e) => {
235
+ emitStart(e.clientX, e.clientY, e);
236
+ document.addEventListener("mousemove", mousemoveFn);
237
+ document.addEventListener("mouseup", mouseupFn);
238
+ };
239
+ const handleTouchstart = (e) => {
240
+ emitStart(e.touches[0].clientX, e.touches[0].clientY, e);
241
+ document.addEventListener("touchmove", touchmoveFn);
242
+ document.addEventListener("touchend", touchendFn);
243
+ };
244
+ onBeforeUnmount(() => {
245
+ unbindEvent();
246
+ });
247
+ return {
248
+ handleMousedown,
249
+ handleTouchstart
250
+ };
251
+ }
106
252
  export {
107
253
  useCollapseAnim,
108
254
  useMediaQuery,
255
+ useMousewheel,
256
+ useMoveEvent,
109
257
  useTimer,
258
+ useTouchEvent,
110
259
  useWindowListener
111
260
  };