vxe-pc-ui 3.14.4 → 3.14.6

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 (474) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +134 -134
  3. package/es/tree/src/tree.js +40 -5
  4. package/es/tree-select/src/tree-select.js +2 -0
  5. package/es/ui/index.js +1 -1
  6. package/es/ui/src/log.js +1 -1
  7. package/lib/index.umd.js +8406 -8476
  8. package/lib/index.umd.min.js +1 -1
  9. package/lib/tree/src/tree.js +40 -5
  10. package/lib/tree/src/tree.min.js +1 -1
  11. package/lib/tree-select/src/tree-select.js +2 -0
  12. package/lib/tree-select/src/tree-select.min.js +1 -1
  13. package/lib/ui/index.js +1 -1
  14. package/lib/ui/index.min.js +1 -1
  15. package/lib/ui/src/log.js +1 -1
  16. package/lib/ui/src/log.min.js +1 -1
  17. package/package.json +89 -89
  18. package/packages/alert/index.ts +16 -16
  19. package/packages/alert/src/alert.ts +106 -106
  20. package/packages/anchor/index.ts +16 -16
  21. package/packages/anchor/src/anchor-link.ts +158 -158
  22. package/packages/anchor/src/anchor.ts +267 -267
  23. package/packages/anchor/src/util.ts +23 -23
  24. package/packages/anchor-link/index.ts +16 -16
  25. package/packages/avatar/index.ts +16 -16
  26. package/packages/avatar/src/avatar.ts +141 -141
  27. package/packages/backtop/index.ts +16 -16
  28. package/packages/backtop/src/backtop.ts +330 -330
  29. package/packages/badge/index.ts +16 -16
  30. package/packages/badge/src/badge.ts +87 -87
  31. package/packages/breadcrumb/index.ts +16 -16
  32. package/packages/breadcrumb/src/breadcrumb-item.ts +118 -118
  33. package/packages/breadcrumb/src/breadcrumb.ts +89 -89
  34. package/packages/breadcrumb-item/index.ts +16 -16
  35. package/packages/button/index.ts +16 -16
  36. package/packages/button/src/button-group.ts +113 -113
  37. package/packages/button/src/button.ts +956 -956
  38. package/packages/button-group/index.ts +16 -16
  39. package/packages/calendar/index.ts +16 -16
  40. package/packages/calendar/src/calendar.ts +1527 -1527
  41. package/packages/card/index.ts +16 -16
  42. package/packages/card/src/card.ts +162 -162
  43. package/packages/carousel/index.ts +16 -16
  44. package/packages/carousel/src/carousel-item.ts +117 -117
  45. package/packages/carousel/src/carousel.ts +460 -460
  46. package/packages/carousel/src/util.ts +21 -21
  47. package/packages/carousel-item/index.ts +16 -16
  48. package/packages/cascader/index.ts +16 -16
  49. package/packages/cascader/src/cascader.ts +943 -943
  50. package/packages/checkbox/index.ts +16 -16
  51. package/packages/checkbox/src/button.ts +185 -185
  52. package/packages/checkbox/src/checkbox.ts +189 -189
  53. package/packages/checkbox/src/group.ts +259 -259
  54. package/packages/checkbox-button/index.ts +16 -16
  55. package/packages/checkbox-group/index.ts +16 -16
  56. package/packages/col/index.ts +16 -16
  57. package/packages/collapse/index.ts +16 -16
  58. package/packages/collapse/src/collapse-pane.ts +136 -136
  59. package/packages/collapse/src/collapse.ts +259 -259
  60. package/packages/collapse/src/util.ts +21 -21
  61. package/packages/collapse-pane/index.ts +16 -16
  62. package/packages/color-picker/index.ts +16 -16
  63. package/packages/color-picker/src/color-picker.ts +1286 -1286
  64. package/packages/color-picker/src/util.ts +198 -198
  65. package/packages/components.ts +307 -307
  66. package/packages/context-menu/index.ts +54 -54
  67. package/packages/context-menu/src/context-menu.ts +727 -727
  68. package/packages/countdown/index.ts +16 -16
  69. package/packages/countdown/src/countdown.ts +276 -276
  70. package/packages/date-panel/index.ts +16 -16
  71. package/packages/date-panel/src/date-panel.ts +2024 -2024
  72. package/packages/date-panel/src/util.ts +244 -244
  73. package/packages/date-picker/index.ts +17 -17
  74. package/packages/date-picker/src/date-picker.ts +1249 -1249
  75. package/packages/date-range-picker/index.ts +16 -16
  76. package/packages/date-range-picker/src/date-range-picker.ts +1480 -1480
  77. package/packages/drawer/index.ts +87 -87
  78. package/packages/drawer/src/drawer.ts +767 -767
  79. package/packages/dynamics/index.ts +127 -127
  80. package/packages/empty/index.ts +16 -16
  81. package/packages/empty/src/empty.ts +80 -80
  82. package/packages/form/index.ts +16 -16
  83. package/packages/form/render/index.ts +617 -617
  84. package/packages/form/src/form-config-item.ts +84 -84
  85. package/packages/form/src/form-group.ts +125 -125
  86. package/packages/form/src/form-item.ts +217 -217
  87. package/packages/form/src/form.ts +1032 -1032
  88. package/packages/form/src/itemInfo.ts +80 -80
  89. package/packages/form/src/render.ts +398 -398
  90. package/packages/form/src/util.ts +92 -92
  91. package/packages/form-gather/index.ts +18 -18
  92. package/packages/form-group/index.ts +16 -16
  93. package/packages/form-item/index.ts +16 -16
  94. package/packages/icon/index.ts +16 -16
  95. package/packages/icon/src/icon.ts +75 -75
  96. package/packages/icon-picker/index.ts +16 -16
  97. package/packages/icon-picker/src/icon-picker.ts +753 -753
  98. package/packages/image/index.ts +16 -16
  99. package/packages/image/src/group.ts +162 -162
  100. package/packages/image/src/image.ts +303 -303
  101. package/packages/image/src/preview.ts +737 -737
  102. package/packages/image/src/util.ts +62 -62
  103. package/packages/image-group/index.ts +16 -16
  104. package/packages/image-preview/index.ts +19 -19
  105. package/packages/index.ts +8 -8
  106. package/packages/input/index.ts +16 -16
  107. package/packages/input/src/input.ts +3187 -3187
  108. package/packages/language/ar-EG.ts +840 -840
  109. package/packages/language/de-DE.ts +840 -840
  110. package/packages/language/en-US.ts +840 -840
  111. package/packages/language/es-ES.ts +840 -840
  112. package/packages/language/fr-FR.ts +840 -840
  113. package/packages/language/hu-HU.ts +840 -840
  114. package/packages/language/hy-AM.ts +840 -840
  115. package/packages/language/id-ID.ts +840 -840
  116. package/packages/language/it-IT.ts +840 -840
  117. package/packages/language/ja-JP.ts +840 -840
  118. package/packages/language/ko-KR.ts +840 -840
  119. package/packages/language/ms-MY.ts +840 -840
  120. package/packages/language/nb-NO.ts +840 -840
  121. package/packages/language/pt-BR.ts +840 -840
  122. package/packages/language/ru-RU.ts +840 -840
  123. package/packages/language/th-TH.ts +840 -840
  124. package/packages/language/ug-CN.ts +840 -840
  125. package/packages/language/uk-UA.ts +840 -840
  126. package/packages/language/uz-UZ.ts +840 -840
  127. package/packages/language/vi-VN.ts +840 -840
  128. package/packages/language/zh-CHT.ts +840 -840
  129. package/packages/language/zh-CN.ts +840 -840
  130. package/packages/language/zh-HK.ts +3 -3
  131. package/packages/language/zh-MO.ts +3 -3
  132. package/packages/language/zh-TC.ts +3 -3
  133. package/packages/language/zh-TW.ts +3 -3
  134. package/packages/layout-aside/index.ts +16 -16
  135. package/packages/layout-aside/src/layout-aside.ts +115 -115
  136. package/packages/layout-body/index.ts +16 -16
  137. package/packages/layout-body/src/layout-body.ts +137 -137
  138. package/packages/layout-container/index.ts +16 -16
  139. package/packages/layout-container/src/layout-container.ts +65 -65
  140. package/packages/layout-footer/index.ts +16 -16
  141. package/packages/layout-footer/src/layout-footer.ts +53 -53
  142. package/packages/layout-header/index.ts +16 -16
  143. package/packages/layout-header/src/layout-header.ts +49 -49
  144. package/packages/link/index.ts +16 -16
  145. package/packages/link/src/link.ts +153 -153
  146. package/packages/list/index.ts +16 -16
  147. package/packages/list/src/list.ts +492 -492
  148. package/packages/loading/index.ts +34 -34
  149. package/packages/loading/src/loading.ts +162 -162
  150. package/packages/mention/index.ts +16 -16
  151. package/packages/mention/src/mention.ts +54 -54
  152. package/packages/menu/index.ts +16 -16
  153. package/packages/menu/src/menu.ts +632 -632
  154. package/packages/modal/index.ts +150 -150
  155. package/packages/modal/src/modal.ts +1668 -1668
  156. package/packages/notice-bar/index.ts +16 -16
  157. package/packages/notice-bar/src/notice-bar.ts +182 -182
  158. package/packages/number-input/index.ts +16 -16
  159. package/packages/number-input/src/number-input.ts +1255 -1255
  160. package/packages/number-input/src/util.ts +12 -12
  161. package/packages/optgroup/index.ts +16 -16
  162. package/packages/option/index.ts +16 -16
  163. package/packages/pager/index.ts +16 -16
  164. package/packages/pager/src/pager.ts +913 -913
  165. package/packages/password-input/index.ts +16 -16
  166. package/packages/password-input/src/password-input.ts +466 -466
  167. package/packages/print/index.ts +18 -18
  168. package/packages/print/src/page-break.ts +78 -78
  169. package/packages/print/src/print.ts +266 -266
  170. package/packages/print/src/util.ts +284 -284
  171. package/packages/print-page-break/index.ts +14 -14
  172. package/packages/pulldown/index.ts +16 -16
  173. package/packages/pulldown/src/pulldown.ts +533 -533
  174. package/packages/radio/index.ts +16 -16
  175. package/packages/radio/src/button.ts +221 -221
  176. package/packages/radio/src/group.ts +252 -252
  177. package/packages/radio/src/radio.ts +228 -228
  178. package/packages/radio-button/index.ts +16 -16
  179. package/packages/radio-group/index.ts +16 -16
  180. package/packages/rate/index.ts +16 -16
  181. package/packages/rate/src/rate.ts +199 -199
  182. package/packages/result/index.ts +16 -16
  183. package/packages/result/src/result.ts +93 -93
  184. package/packages/row/index.ts +16 -16
  185. package/packages/row/src/col.ts +130 -130
  186. package/packages/row/src/row.ts +106 -106
  187. package/packages/segmented/index.ts +16 -16
  188. package/packages/segmented/src/segmented.ts +281 -281
  189. package/packages/select/index.ts +16 -16
  190. package/packages/select/src/optgroup.ts +107 -107
  191. package/packages/select/src/option-info.ts +20 -20
  192. package/packages/select/src/option.ts +103 -103
  193. package/packages/select/src/select.ts +2001 -2001
  194. package/packages/select/src/util.ts +47 -47
  195. package/packages/slider/index.ts +16 -16
  196. package/packages/slider/src/slider.ts +332 -332
  197. package/packages/split/index.ts +16 -16
  198. package/packages/split-pane/index.ts +17 -17
  199. package/packages/splitter/index.ts +16 -16
  200. package/packages/splitter/src/splitter-panel.ts +171 -171
  201. package/packages/splitter/src/splitter.ts +1032 -1032
  202. package/packages/splitter/src/util.ts +21 -21
  203. package/packages/splitter-panel/index.ts +16 -16
  204. package/packages/steps/index.ts +16 -16
  205. package/packages/steps/src/steps.ts +57 -57
  206. package/packages/switch/index.ts +16 -16
  207. package/packages/switch/src/switch.ts +279 -279
  208. package/packages/tab-pane/index.ts +16 -16
  209. package/packages/table-select/index.ts +16 -16
  210. package/packages/table-select/src/table-select.ts +904 -904
  211. package/packages/tabs/index.ts +16 -16
  212. package/packages/tabs/src/tab-pane.ts +137 -137
  213. package/packages/tabs/src/tabs.ts +1014 -1014
  214. package/packages/tabs/src/util.ts +21 -21
  215. package/packages/tag/index.ts +16 -16
  216. package/packages/tag/src/tag.ts +195 -195
  217. package/packages/text/index.ts +16 -16
  218. package/packages/text/src/text.ts +267 -267
  219. package/packages/text-ellipsis/index.ts +16 -16
  220. package/packages/text-ellipsis/src/text-ellipsis.ts +291 -291
  221. package/packages/textarea/index.ts +16 -16
  222. package/packages/textarea/src/textarea.ts +436 -436
  223. package/packages/timeline/index.ts +16 -16
  224. package/packages/timeline/src/timeline-item.ts +41 -41
  225. package/packages/timeline/src/timeline.ts +54 -54
  226. package/packages/timeline-item/index.ts +16 -16
  227. package/packages/tip/index.ts +19 -19
  228. package/packages/tip/src/tip.ts +112 -112
  229. package/packages/tooltip/index.ts +16 -16
  230. package/packages/tooltip/src/tooltip.ts +669 -669
  231. package/packages/tour/index.ts +16 -16
  232. package/packages/tour/src/tour.ts +54 -54
  233. package/packages/tree/index.ts +16 -16
  234. package/packages/tree/src/store.ts +15 -15
  235. package/packages/tree/src/tree.ts +3122 -3080
  236. package/packages/tree/src/util.ts +44 -44
  237. package/packages/tree-select/index.ts +16 -16
  238. package/packages/tree-select/src/tree-select.ts +1118 -1116
  239. package/packages/ui/index.ts +697 -697
  240. package/packages/ui/src/anime.ts +52 -52
  241. package/packages/ui/src/comp.ts +3 -3
  242. package/packages/ui/src/dom.ts +279 -279
  243. package/packages/ui/src/log.ts +6 -6
  244. package/packages/ui/src/utils.ts +49 -49
  245. package/packages/ui/src/vn.ts +60 -60
  246. package/packages/upload/index.ts +20 -20
  247. package/packages/upload/src/upload.ts +2129 -2129
  248. package/packages/upload/src/util.ts +109 -109
  249. package/packages/vxe-u-i/index.ts +4 -4
  250. package/packages/watermark/index.ts +31 -31
  251. package/packages/watermark/src/util.ts +176 -176
  252. package/packages/watermark/src/watermark.ts +166 -166
  253. package/styles/all.scss +90 -90
  254. package/styles/base.scss +16 -16
  255. package/styles/components/alert.scss +101 -101
  256. package/styles/components/anchor.scss +44 -44
  257. package/styles/components/avatar.scss +115 -115
  258. package/styles/components/backtop.scss +82 -82
  259. package/styles/components/badge.scss +45 -45
  260. package/styles/components/breadcrumb.scss +29 -29
  261. package/styles/components/button-group.scss +30 -30
  262. package/styles/components/button.scss +415 -415
  263. package/styles/components/calendar.scss +471 -471
  264. package/styles/components/card.scss +121 -121
  265. package/styles/components/carousel.scss +184 -184
  266. package/styles/components/cascader.scss +140 -140
  267. package/styles/components/checkbox-button.scss +57 -57
  268. package/styles/components/checkbox.scss +81 -81
  269. package/styles/components/collapse.scss +56 -56
  270. package/styles/components/color-picker.scss +409 -409
  271. package/styles/components/context-menu.scss +102 -102
  272. package/styles/components/countdown.scss +35 -35
  273. package/styles/components/date-panel.scss +505 -505
  274. package/styles/components/date-picker.scss +247 -247
  275. package/styles/components/date-range-picker.scss +252 -252
  276. package/styles/components/drawer.scss +298 -298
  277. package/styles/components/empty.scss +79 -79
  278. package/styles/components/form.scss +668 -668
  279. package/styles/components/icon-picker.scss +211 -211
  280. package/styles/components/icon.scss +1048 -1048
  281. package/styles/components/image-group.scss +2 -2
  282. package/styles/components/image-preview.scss +215 -215
  283. package/styles/components/image.scss +16 -16
  284. package/styles/components/input.scss +846 -846
  285. package/styles/components/layout-aside.scss +22 -22
  286. package/styles/components/layout-body.scss +14 -14
  287. package/styles/components/layout-container.scss +13 -13
  288. package/styles/components/layout-footer.scss +14 -14
  289. package/styles/components/layout-header.scss +11 -11
  290. package/styles/components/link.scss +115 -115
  291. package/styles/components/list.scss +40 -40
  292. package/styles/components/loading.scss +137 -137
  293. package/styles/components/menu.scss +150 -150
  294. package/styles/components/modal.scss +480 -480
  295. package/styles/components/notice-bar.scss +91 -91
  296. package/styles/components/number-input.scss +283 -283
  297. package/styles/components/old-icon.scss +4 -4
  298. package/styles/components/pager.scss +282 -282
  299. package/styles/components/password-input.scss +374 -374
  300. package/styles/components/print.scss +3 -3
  301. package/styles/components/pulldown.scss +75 -75
  302. package/styles/components/radio-button.scss +57 -57
  303. package/styles/components/radio.scss +79 -79
  304. package/styles/components/rate.scss +76 -76
  305. package/styles/components/result.scss +91 -91
  306. package/styles/components/row.scss +69 -69
  307. package/styles/components/segmented.scss +215 -215
  308. package/styles/components/select.scss +244 -244
  309. package/styles/components/slider.scss +139 -139
  310. package/styles/components/split.scss +1 -1
  311. package/styles/components/splitter.scss +318 -318
  312. package/styles/components/switch.scss +128 -128
  313. package/styles/components/table-select.scss +105 -105
  314. package/styles/components/tabs.scss +745 -745
  315. package/styles/components/tag.scss +184 -184
  316. package/styles/components/text-ellipsis.scss +130 -130
  317. package/styles/components/text.scss +123 -123
  318. package/styles/components/textarea.scss +106 -106
  319. package/styles/components/tip.scss +97 -97
  320. package/styles/components/tooltip.scss +141 -141
  321. package/styles/components/tree-select.scss +166 -166
  322. package/styles/components/tree.scss +294 -294
  323. package/styles/components/upload.scss +497 -497
  324. package/styles/components/watermark.scss +26 -26
  325. package/styles/helpers/baseMixin.scss +95 -95
  326. package/styles/helpers/baseVar.scss +3 -3
  327. package/styles/helpers/placement.scss +38 -38
  328. package/styles/theme/base.scss +214 -214
  329. package/styles/theme/dark.scss +119 -119
  330. package/styles/theme/light.scss +118 -118
  331. package/styles/variable.scss +111 -111
  332. package/types/all.d.ts +328 -328
  333. package/types/components/alert.d.ts +80 -80
  334. package/types/components/anchor-link.d.ts +84 -84
  335. package/types/components/anchor.d.ts +84 -84
  336. package/types/components/avatar.d.ts +81 -81
  337. package/types/components/backtop.d.ts +115 -115
  338. package/types/components/badge.d.ts +69 -69
  339. package/types/components/breadcrumb-item.d.ts +73 -73
  340. package/types/components/breadcrumb.d.ts +80 -80
  341. package/types/components/button-group.d.ts +113 -113
  342. package/types/components/button.d.ts +314 -314
  343. package/types/components/calendar.d.ts +254 -254
  344. package/types/components/card.d.ts +86 -86
  345. package/types/components/carousel-item.d.ts +68 -68
  346. package/types/components/carousel.d.ts +126 -126
  347. package/types/components/cascader.d.ts +250 -250
  348. package/types/components/checkbox-button.d.ts +93 -93
  349. package/types/components/checkbox-group.d.ts +135 -135
  350. package/types/components/checkbox.d.ts +115 -115
  351. package/types/components/col.d.ts +73 -73
  352. package/types/components/colgroup.d.ts +131 -131
  353. package/types/components/collapse-pane.d.ts +82 -82
  354. package/types/components/collapse.d.ts +115 -115
  355. package/types/components/color-picker.d.ts +164 -164
  356. package/types/components/column.d.ts +852 -852
  357. package/types/components/context-menu.d.ts +301 -301
  358. package/types/components/countdown.d.ts +99 -99
  359. package/types/components/date-panel.d.ts +269 -269
  360. package/types/components/date-picker.d.ts +322 -322
  361. package/types/components/date-range-picker.d.ts +336 -336
  362. package/types/components/drawer.d.ts +295 -295
  363. package/types/components/empty.d.ts +71 -71
  364. package/types/components/flow-design.d.ts +78 -78
  365. package/types/components/flow-view.d.ts +78 -78
  366. package/types/components/form-design.d.ts +364 -364
  367. package/types/components/form-gather.d.ts +72 -72
  368. package/types/components/form-group.d.ts +63 -63
  369. package/types/components/form-item.d.ts +405 -405
  370. package/types/components/form-view.d.ts +175 -175
  371. package/types/components/form.d.ts +463 -463
  372. package/types/components/gantt-module/gantt-view.d.ts +171 -171
  373. package/types/components/gantt-module/index.d.ts +1 -1
  374. package/types/components/gantt-plugins/extend-gantt-chart.d.ts +132 -132
  375. package/types/components/gantt-plugins/index.d.ts +1 -1
  376. package/types/components/gantt.d.ts +1201 -1192
  377. package/types/components/grid.d.ts +1038 -1038
  378. package/types/components/icon-picker.d.ts +185 -185
  379. package/types/components/icon.d.ts +80 -80
  380. package/types/components/image-group.d.ts +120 -120
  381. package/types/components/image-preview.d.ts +159 -159
  382. package/types/components/image.d.ts +166 -166
  383. package/types/components/input.d.ts +425 -425
  384. package/types/components/layout-aside.d.ts +73 -73
  385. package/types/components/layout-body.d.ts +84 -84
  386. package/types/components/layout-container.d.ts +66 -66
  387. package/types/components/layout-footer.d.ts +66 -66
  388. package/types/components/layout-header.d.ts +64 -64
  389. package/types/components/link.d.ts +104 -104
  390. package/types/components/list-design.d.ts +177 -177
  391. package/types/components/list-view.d.ts +190 -190
  392. package/types/components/list.d.ts +196 -196
  393. package/types/components/loading.d.ts +96 -96
  394. package/types/components/mention.d.ts +70 -70
  395. package/types/components/menu.d.ts +203 -203
  396. package/types/components/modal.d.ts +540 -540
  397. package/types/components/notice-bar.d.ts +95 -95
  398. package/types/components/number-input.d.ts +300 -300
  399. package/types/components/optgroup.d.ts +81 -81
  400. package/types/components/option.d.ts +95 -95
  401. package/types/components/pager.d.ts +322 -322
  402. package/types/components/password-input.d.ts +129 -129
  403. package/types/components/print-page-break.d.ts +62 -62
  404. package/types/components/print.d.ts +199 -199
  405. package/types/components/pulldown.d.ts +226 -226
  406. package/types/components/radio-button.d.ts +104 -104
  407. package/types/components/radio-group.d.ts +136 -136
  408. package/types/components/radio.d.ts +121 -121
  409. package/types/components/rate.d.ts +75 -75
  410. package/types/components/result.d.ts +77 -77
  411. package/types/components/row.d.ts +72 -72
  412. package/types/components/segmented.d.ts +117 -117
  413. package/types/components/select.d.ts +519 -519
  414. package/types/components/slider.d.ts +117 -117
  415. package/types/components/split-pane.d.ts +135 -135
  416. package/types/components/split.d.ts +318 -318
  417. package/types/components/splitter-panel.d.ts +98 -98
  418. package/types/components/splitter.d.ts +283 -283
  419. package/types/components/steps.d.ts +61 -61
  420. package/types/components/switch.d.ts +124 -124
  421. package/types/components/tab-pane.d.ts +107 -107
  422. package/types/components/table-module/custom.d.ts +115 -115
  423. package/types/components/table-module/edit.d.ts +245 -245
  424. package/types/components/table-module/export.d.ts +96 -96
  425. package/types/components/table-module/filter.d.ts +140 -140
  426. package/types/components/table-module/index.d.ts +7 -7
  427. package/types/components/table-module/keyboard.d.ts +26 -26
  428. package/types/components/table-module/menu.d.ts +26 -26
  429. package/types/components/table-module/validator.d.ts +53 -53
  430. package/types/components/table-plugins/extend-cell-area.d.ts +768 -768
  431. package/types/components/table-plugins/extend-pivot-table.d.ts +68 -68
  432. package/types/components/table-plugins/filters-combination.d.ts +15 -15
  433. package/types/components/table-plugins/filters-complex-input.d.ts +9 -9
  434. package/types/components/table-plugins/index.d.ts +4 -4
  435. package/types/components/table-select.d.ts +216 -216
  436. package/types/components/table.d.ts +7496 -7496
  437. package/types/components/tabs.d.ts +324 -324
  438. package/types/components/tag.d.ts +107 -107
  439. package/types/components/text-ellipsis.d.ts +105 -105
  440. package/types/components/text.d.ts +115 -115
  441. package/types/components/textarea.d.ts +237 -237
  442. package/types/components/timeline-item.d.ts +68 -68
  443. package/types/components/timeline.d.ts +70 -70
  444. package/types/components/tip.d.ts +76 -76
  445. package/types/components/toolbar.d.ts +329 -329
  446. package/types/components/tooltip.d.ts +169 -169
  447. package/types/components/tour.d.ts +70 -70
  448. package/types/components/tree-select.d.ts +299 -299
  449. package/types/components/tree.d.ts +836 -826
  450. package/types/components/upload.d.ts +432 -432
  451. package/types/components/watermark.d.ts +113 -113
  452. package/types/index.d.ts +4 -4
  453. package/types/ui/commands.d.ts +57 -57
  454. package/types/ui/formats.d.ts +62 -62
  455. package/types/ui/global-config.d.ts +254 -254
  456. package/types/ui/global-icon.d.ts +292 -292
  457. package/types/ui/hooks.d.ts +11 -11
  458. package/types/ui/index.d.ts +95 -95
  459. package/types/ui/interceptor.d.ts +54 -54
  460. package/types/ui/menus.d.ts +77 -77
  461. package/types/ui/renderer.d.ts +1042 -1042
  462. package/types/ui/validators.d.ts +38 -38
  463. /package/es/icon/{iconfont.1778169069480.ttf → iconfont.1778317204332.ttf} +0 -0
  464. /package/es/icon/{iconfont.1778169069480.woff → iconfont.1778317204332.woff} +0 -0
  465. /package/es/icon/{iconfont.1778169069480.woff2 → iconfont.1778317204332.woff2} +0 -0
  466. /package/es/{iconfont.1778169069480.ttf → iconfont.1778317204332.ttf} +0 -0
  467. /package/es/{iconfont.1778169069480.woff → iconfont.1778317204332.woff} +0 -0
  468. /package/es/{iconfont.1778169069480.woff2 → iconfont.1778317204332.woff2} +0 -0
  469. /package/lib/icon/style/{iconfont.1778169069480.ttf → iconfont.1778317204332.ttf} +0 -0
  470. /package/lib/icon/style/{iconfont.1778169069480.woff → iconfont.1778317204332.woff} +0 -0
  471. /package/lib/icon/style/{iconfont.1778169069480.woff2 → iconfont.1778317204332.woff2} +0 -0
  472. /package/lib/{iconfont.1778169069480.ttf → iconfont.1778317204332.ttf} +0 -0
  473. /package/lib/{iconfont.1778169069480.woff → iconfont.1778317204332.woff} +0 -0
  474. /package/lib/{iconfont.1778169069480.woff2 → iconfont.1778317204332.woff2} +0 -0
@@ -1,1192 +1,1201 @@
1
- import { CreateElement } from 'vue'
2
- import { NormalizedScopedSlot } from 'vue/types/vnode'
3
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSlotType, VxeComponentAlignType, VxeComponentStatusType } from '@vxe-ui/core'
4
- import { GridPrivateRef, VxeGridProps, VxeGridPropTypes, GridPrivateComputed, GridReactData, GridInternalData, GridMethods, GridPrivateMethods, VxeGridEmits, VxeGridSlots, VxeGridListeners, VxeGridEventProps, VxeGridMethods } from './grid'
5
- import { VxeTablePropTypes } from './table'
6
- import { VxeTooltipPropTypes } from './tooltip'
7
-
8
- /* eslint-disable no-use-before-define,@typescript-eslint/ban-types,@typescript-eslint/no-unused-vars */
9
-
10
- export declare const VxeGantt: DefineVxeComponentApp<VxeGanttProps, VxeGanttEventProps, VxeGanttSlots, VxeGanttMethods>
11
- export type VxeGanttComponent = DefineVxeComponentOptions<VxeGanttProps>
12
-
13
- export type VxeGanttInstance<D = any> = DefineVxeComponentInstance<{
14
- reactData: GanttReactData<D>
15
- internalData: GanttInternalData
16
- }, VxeGanttProps<D>, VxeGanttPrivateComputed<D>, VxeGanttMethods<D>>
17
-
18
- export type VxeGanttConstructor<D = any> = VxeGanttInstance<D>
19
-
20
- export interface GanttPrivateRef<D = any> extends GridPrivateRef<D> {
21
- }
22
- export interface VxeGanttPrivateRef<D = any> extends GanttPrivateRef<D> { }
23
-
24
- export namespace VxeGanttPropTypes {
25
- export type Size = VxeGridPropTypes.Size
26
- export type Layouts = VxeGanttDefines.LayoutKey[] | VxeGanttDefines.LayoutKey[][]
27
- export type Column<D = any> = VxeGridPropTypes.Column<D>
28
- export type Columns<D = any> = Column<D>[]
29
- export interface Link<D = any> extends VxeGanttDefines.LinkStyleConfig {
30
- /**
31
- * 线类型
32
- */
33
- type: VxeGanttDependencyType
34
- /**
35
- * 从指定行
36
- */
37
- from: D | string | number
38
- /**
39
- * 到目标行
40
- */
41
- to: D | string | number
42
- }
43
- export type Links<D = any> = Link<D>[]
44
- export interface PagerConfig extends VxeGridPropTypes.PagerConfig {}
45
- export interface ProxyConfig<D = any> extends VxeGridPropTypes.ProxyConfig<D> {}
46
- export interface ToolbarConfig extends VxeGridPropTypes.ToolbarConfig {}
47
- export interface FormConfig extends VxeGridPropTypes.FormConfig {}
48
- export interface ZoomConfig extends VxeGridPropTypes.ZoomConfig {}
49
-
50
- export interface TaskConfig {
51
- /**
52
- * 标题的字段名
53
- */
54
- titleField?: string
55
- /**
56
- * 开始日期的字段名
57
- */
58
- startField?: string
59
- /**
60
- * 结束日期的字段名
61
- */
62
- endField?: string
63
- /**
64
- * 任务类型
65
- */
66
- typeField?: string
67
- /**
68
- * 进度的字段名
69
- */
70
- progressField?: string
71
- /**
72
- * 自定义解析日期的格式
73
- */
74
- dateFormat?: string
75
- }
76
-
77
- export interface TaskViewScaleConfig {
78
- /**
79
- * 年配置
80
- */
81
- year?: VxeGanttDefines.ScaleDefaultOptions
82
- /**
83
- * 季度配置
84
- */
85
- quarter?: VxeGanttDefines.ScaleDefaultOptions
86
- /**
87
- * 月配置
88
- */
89
- month?: VxeGanttDefines.ScaleDefaultOptions
90
- /**
91
- * 周配置
92
- */
93
- week?: VxeGanttDefines.ScaleWeekOptions
94
- /**
95
- * 星期配置
96
- */
97
- day?: VxeGanttDefines.ScaleDefaultOptions
98
- /**
99
- * 天配置
100
- */
101
- date?: VxeGanttDefines.ScaleDefaultOptions
102
- /**
103
- * 小时配置
104
- */
105
- hour?: VxeGanttDefines.ScaleDefaultOptions
106
- /**
107
- * 分钟配置
108
- */
109
- minute?: VxeGanttDefines.ScaleDefaultOptions
110
- /**
111
- * 秒配置
112
- */
113
- second?: VxeGanttDefines.ScaleDefaultOptions
114
- }
115
-
116
- export interface TaskNowLineConfig {
117
- /**
118
- * 此刻线的显示方式:start(显示到左侧),center(显示居中),end(显示到右侧),progress(显示实际进度)
119
- */
120
- mode?: 'start' | 'progress' | 'center' | 'end'
121
- /**
122
- * 字体颜色
123
- */
124
- fontColor?: string
125
- /**
126
- * 线背景颜色
127
- */
128
- bgColor?: string
129
- /**
130
- * 线宽度
131
- */
132
- width?: number | string
133
- }
134
-
135
- export interface TaskViewConfig<D = any> {
136
- /**
137
- * 高亮此刻线
138
- */
139
- showNowLine?: boolean
140
- /**
141
- * 日期轴配置项,可以通过 TaskViewScaleConfig.scaleUnit 指定渲染单位
142
- */
143
- scales?: VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[]
144
- /**
145
- * 表格样式
146
- */
147
- tableStyle?: {
148
- /**
149
- * 边框
150
- */
151
- border?: VxeTablePropTypes.Border
152
- /**
153
- * 宽度
154
- */
155
- width?: number | string
156
- minWidth?: number | string
157
- maxWidth?: number | string
158
- }
159
- /**
160
- * 网格样式
161
- */
162
- gridding?: {
163
- /**
164
- * 左侧间距多少列
165
- */
166
- leftSpacing?: number
167
- /**
168
- * 右侧间距多少列
169
- */
170
- rightSpacing?: number
171
- }
172
- /**
173
- * 任务视图样式
174
- */
175
- viewStyle?: {
176
- /**
177
- * 边框
178
- */
179
- border?: VxeTablePropTypes.Border
180
- /**
181
- * 单元格宽度
182
- */
183
- cellWidth?: number | string
184
- /**
185
- * 给行附加 className
186
- */
187
- rowClassName?: string | ((params: {
188
- source: string
189
- type: string
190
- scaleType: VxeGanttDefines.ColumnScaleType
191
- row: D
192
- rowIndex: number
193
- $rowIndex: number
194
- _rowIndex: number
195
- }) => void | null | string | { [key: string]: boolean | null | undefined })
196
- /**
197
- * 行样式
198
- */
199
- rowStyle?: Partial<CSSStyleDeclaration> | ((params: {
200
- source: string
201
- type: string
202
- scaleType: VxeGanttDefines.ColumnScaleType
203
- row: D
204
- rowIndex: number
205
- $rowIndex: number
206
- _rowIndex: number
207
- }) => void | null | Partial<CSSStyleDeclaration>)
208
- /**
209
- * 给单元格附加 className
210
- */
211
- cellClassName?: string | ((params: {
212
- source: string
213
- type: string
214
- scaleType: VxeGanttDefines.ColumnScaleType
215
- dateObj: VxeGanttDefines.ScaleDateObj
216
- column?: VxeGanttDefines.ViewColumn<D>
217
- row: D
218
- rowIndex: number
219
- $rowIndex: number
220
- _rowIndex: number
221
- }) => void | null | string | { [key: string]: boolean | null | undefined })
222
- /**
223
- * 单元格样式
224
- */
225
- cellStyle?: Partial<CSSStyleDeclaration> | ((params: {
226
- source: string
227
- type: string
228
- scaleType: VxeGanttDefines.ColumnScaleType
229
- dateObj: VxeGanttDefines.ScaleDateObj
230
- column?: VxeGanttDefines.ViewColumn<D>
231
- row: D
232
- rowIndex: number
233
- $rowIndex: number
234
- _rowIndex: number
235
- }) => void | null | Partial<CSSStyleDeclaration>)
236
- }
237
- }
238
-
239
- export interface TaskSplitConfig {
240
- /**
241
- * 是否启用
242
- */
243
- enabled?: boolean
244
- /**
245
- * 是否允许拖拽调整视图宽度
246
- */
247
- resize?: boolean
248
- /**
249
- * 是否显示左侧表格的折叠按钮
250
- */
251
- showCollapseTableButton?: boolean
252
- /**
253
- * 是否显示右侧任务的折叠按钮
254
- */
255
- showCollapseTaskButton?: boolean
256
- }
257
-
258
- export interface TaskLinkConfig<D = any> extends VxeGanttDefines.LinkStyleConfig {
259
- /**
260
- * 是否启用
261
- */
262
- enabled?: boolean
263
- /**
264
- * 当鼠标点击依赖线时,是否要高亮当前依赖线
265
- */
266
- isCurrent?: boolean
267
- /**
268
- * 当鼠标移到依赖线时,是否要高亮当前依赖线
269
- */
270
- isHover?: boolean
271
- /**
272
- * 是否允许双击依赖线删除
273
- */
274
- isDblclickToRemove?: boolean
275
- /**
276
- * 依赖线被删除之前的方法,可以通过返回 false 阻止删除
277
- */
278
- beforeRemoveMethod?(params: {
279
- $gantt: VxeGanttConstructor<D>
280
- linkItem: VxeGanttDefines.LinkConfObj
281
- fromRow: D
282
- toRow: D
283
- }): Promise<boolean> | boolean
284
- /**
285
- * 依赖线删除之后的方法
286
- */
287
- afterRemoveMethod?(params: {
288
- $gantt: VxeGanttConstructor<D>
289
- linkItem: VxeGanttDefines.LinkConfObj
290
- fromRow: D
291
- toRow: D
292
- }): void
293
- /**
294
- * 拖拽开始时是否允许依赖线创建的方法,该方法的返回值用来决定是否允许被拖拽
295
- */
296
- createStartMethod?(params: {
297
- $gantt: VxeGanttConstructor<D>
298
- fromRow: D
299
- fromPoint: 'start' | 'end'
300
- }): boolean
301
- /**
302
- * 拖拽依赖线创建结束时的方法,该方法的返回值用来决定是否允依赖线许被创建
303
- */
304
- createEndMethod?(params: {
305
- $gantt: VxeGanttConstructor<D>
306
- fromRow: D
307
- fromPoint: 'start' | 'end'
308
- toRow: D
309
- toPoint: 'start' | 'end'
310
- }): Promise<boolean> | boolean
311
- /**
312
- * 自定义拖拽结束时依赖线创建被赋值的方法
313
- */
314
- createSetMethod?(params: {
315
- $gantt: VxeGanttConstructor<D>
316
- fromRow: D
317
- fromPoint: 'start' | 'end'
318
- toRow: D
319
- toPoint: 'start' | 'end'
320
- link: {
321
- from: string
322
- to: string
323
- type: VxeGanttDependencyType
324
- }
325
- }): void
326
- }
327
-
328
- export interface TaskBarConfig<D = any> {
329
- /**
330
- * 是否显示进度条
331
- */
332
- showProgress?: boolean
333
- /**
334
- * 是否在任务条显示内容
335
- */
336
- showContent?: boolean
337
- /**
338
- * 是否在任务条显示提示信息
339
- */
340
- showTooltip?: boolean
341
- /**
342
- * 自定义任务条内容方法
343
- */
344
- contentMethod?(params: {
345
- scaleType: VxeGanttDefines.ColumnScaleType
346
- title: string
347
- progress?: string | number
348
- row: D
349
- }): string | number
350
- /**
351
- * 任务条样式
352
- */
353
- barStyle?: VxeGanttDefines.BarStyleConfig | ((params: {
354
- scaleType: VxeGanttDefines.ColumnScaleType
355
- $gantt: VxeGanttConstructor<D>
356
- row: D
357
- }) => VxeGanttDefines.BarStyleConfig)
358
- /**
359
- * 是否启用拖拽移动日期
360
- */
361
- moveable?: boolean
362
- /**
363
- * 是否启用拖拽调整日期
364
- */
365
- resizable?: boolean
366
- /**
367
- * 是否允许自定义创建依赖线
368
- */
369
- linkCreatable?: boolean
370
- }
371
-
372
- /**
373
- * 里程碑配置项
374
- */
375
- export interface TaskBarMilestoneConfig<D = any> {
376
- /**
377
- * 自定义图标
378
- */
379
- icon?: string | ((params: {
380
- $gantt: VxeGanttConstructor<D>
381
- row: D
382
- }) => string)
383
- /**
384
- * 图标状态颜色
385
- */
386
- iconStatus?: VxeComponentStatusType | ((params: {
387
- $gantt: VxeGanttConstructor<D>
388
- row: D
389
- }) => VxeComponentStatusType)
390
- /**
391
- * 自定义图标样式
392
- */
393
- iconStyle?: CSSStyleDeclaration | ((params: {
394
- $gantt: VxeGanttConstructor<D>
395
- row: D
396
- }) => void | null | Partial<CSSStyleDeclaration>)
397
- /**
398
- * 是否显示图标
399
- */
400
- showIcon?: boolean
401
- }
402
-
403
- /**
404
- * 子视图类型配置项
405
- */
406
- export interface TaskBarSubviewConfig<D = any> {
407
- /**
408
- * 是否启用
409
- */
410
- enabled?: boolean
411
- /**
412
- * 是否显示任务总览
413
- */
414
- showOverview?: boolean
415
- /**
416
- * 子视图任务条样式
417
- */
418
- barStyle?: CSSStyleDeclaration | ((params: {
419
- $gantt: VxeGanttConstructor<D>
420
- scaleType: VxeGanttDefines.ColumnScaleType
421
- row: D
422
- rowIndex: number
423
- $rowIndex: number
424
- _rowIndex: number
425
- }) => void | null | Partial<CSSStyleDeclaration>)
426
- }
427
-
428
- export interface TaskBarTooltipConfig<D = any> {
429
- theme?: VxeTooltipPropTypes.Theme
430
- enterable?: VxeTooltipPropTypes.Enterable
431
- enterDelay?: VxeTooltipPropTypes.EnterDelay
432
- leaveDelay?: VxeTooltipPropTypes.LeaveDelay
433
- width?: VxeTooltipPropTypes.Width
434
- height?: VxeTooltipPropTypes.Height
435
- minWidth?: VxeTooltipPropTypes.MinWidth
436
- minHeight?: VxeTooltipPropTypes.MinHeight
437
- maxWidth?: VxeTooltipPropTypes.MaxWidth
438
- maxHeight?: VxeTooltipPropTypes.MaxHeight
439
- useHTML?: VxeTooltipPropTypes.UseHTML
440
- contentMethod?(params: {
441
- $gantt: VxeGanttConstructor<D>
442
- scaleType: VxeGanttDefines.ColumnScaleType
443
- row: D
444
- rowIndex: number
445
- $rowIndex: number
446
- _rowIndex: number
447
- }): string | null | void
448
- }
449
-
450
- export interface TaskBarResizeConfig<D = any> {
451
- /**
452
- * 是否允许拖拽调整任务起始日期
453
- */
454
- allowStart?: boolean
455
- /**
456
- * 是否允许拖拽调整任务条结束日期
457
- */
458
- allowEnd?: boolean
459
- /**
460
- * 拖拽开始时是否允许行拖拽调整任务日期的方法,该方法的返回值用来决定是否允许被拖拽
461
- */
462
- resizeStartMethod?(params: {
463
- $gantt: VxeGanttConstructor<D>
464
- resizeType: 'start' | 'end'
465
- row: D
466
- startDate: Date
467
- endDate: Date
468
- }): boolean
469
- /**
470
- * 拖拽结束时是否允许行拖拽调整任务日期的方法,该方法的返回值用来决定是否允许被拖拽调整日期范围
471
- */
472
- resizeEndMethod?(params: {
473
- $gantt: VxeGanttConstructor<D>
474
- resizeType: 'start' | 'end'
475
- row: D
476
- startDate: Date
477
- endDate: Date
478
- targetStartDate: Date
479
- targetEndDate: Date
480
- }): Promise<boolean> | boolean
481
- /**
482
- * 自定义拖拽结束时赋值的方法
483
- */
484
- resizeSetMethod?(params: {
485
- $gantt: VxeGanttConstructor<D>
486
- resizeType: 'start' | 'end'
487
- row: D
488
- startDate: Date
489
- endDate: Date
490
- targetStartDate: Date
491
- targetEndDate: Date
492
- startValue: any
493
- endValue: any
494
- }): void
495
- }
496
-
497
- export interface TaskBarMoveConfig<D = any> {
498
- /**
499
- * 拖拽开始时是否允许行拖拽移动任务日期的方法,该方法的返回值用来决定是否允许被拖拽
500
- */
501
- moveStartMethod?(params: {
502
- $gantt: VxeGanttConstructor<D>
503
- row: D
504
- startDate: Date
505
- endDate: Date
506
- linkInfo: VxeGanttDefines.LinkInfoObj<D>
507
- }): boolean
508
- /**
509
- * 拖拽移动任务日期结束时的方法,该方法的返回值用来决定是否允许被拖拽移动到指定日期
510
- */
511
- moveEndMethod?(params: {
512
- $gantt: VxeGanttConstructor<D>
513
- row: D
514
- startDate: Date
515
- endDate: Date
516
- targetStartDate: Date
517
- targetEndDate: Date
518
- offsetSize: number
519
- linkInfo: VxeGanttDefines.LinkInfoObj<D>
520
- }): Promise<boolean> | boolean
521
- /**
522
- * 自定义拖拽结束时任务日期被赋值的方法
523
- */
524
- moveSetMethod?(params: {
525
- $gantt: VxeGanttConstructor<D>
526
- row: D
527
- startDate: Date
528
- endDate: Date
529
- targetStartDate: Date
530
- targetEndDate: Date
531
- startValue: any
532
- endValue: any
533
- offsetSize: number
534
- linkInfo: VxeGanttDefines.LinkInfoObj<D>
535
- }): void
536
- }
537
- }
538
-
539
- export interface VxeGanttProps<D = any> extends Omit<VxeGridProps<D>, 'layouts'> {
540
- /**
541
- * 依赖线
542
- */
543
- links?: VxeGanttPropTypes.Links<D>
544
- layouts?: VxeGanttPropTypes.Layouts
545
- taskConfig?: VxeGanttPropTypes.TaskConfig
546
- taskViewScaleConfig?: VxeGanttPropTypes.TaskViewScaleConfig
547
- taskNowLineConfig?: VxeGanttPropTypes.TaskNowLineConfig
548
- taskViewConfig?: VxeGanttPropTypes.TaskViewConfig<D>
549
- taskSplitConfig?: VxeGanttPropTypes.TaskSplitConfig
550
- taskLinkConfig?: VxeGanttPropTypes.TaskLinkConfig
551
- taskBarConfig?: VxeGanttPropTypes.TaskBarConfig<D>
552
- taskBarMilestoneConfig?: VxeGanttPropTypes.TaskBarMilestoneConfig<D>
553
- taskBarSubviewConfig?: VxeGanttPropTypes.TaskBarSubviewConfig<D>
554
- taskBarTooltipConfig?: VxeGanttPropTypes.TaskBarTooltipConfig<D>
555
- taskBarResizeConfig?: VxeGanttPropTypes.TaskBarResizeConfig<D>
556
- taskBarMoveConfig?: VxeGanttPropTypes.TaskBarMoveConfig<D>
557
- }
558
-
559
- export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
560
- computeTaskOpts: VxeGanttPropTypes.TaskConfig
561
- computeTaskViewOpts: VxeGanttPropTypes.TaskViewConfig<D>
562
- computeTaskNowLineOpts: VxeGanttPropTypes.TaskNowLineConfig
563
- computeTaskViewScaleOpts: VxeGanttPropTypes.TaskViewScaleConfig
564
- computeTaskBarOpts: VxeGanttPropTypes.TaskBarConfig<D>
565
- computeTaskBarMoveOpts: VxeGanttPropTypes.TaskBarMoveConfig<D>
566
- computeTaskBarResizeOpts: VxeGanttPropTypes.TaskBarResizeConfig<D>
567
- computeTaskSplitOpts: VxeGanttPropTypes.TaskSplitConfig
568
- computeTaskBarMilestoneOpts: VxeGanttPropTypes.TaskBarMilestoneConfig<D>
569
- computeTaskBarSubviewOpts: VxeGanttPropTypes.TaskBarSubviewConfig<D>
570
- computeTaskBarTooltipOpts: VxeGanttPropTypes.TaskBarTooltipConfig
571
- computeTaskLinkOpts: VxeGanttPropTypes.TaskLinkConfig
572
- computeTaskViewScales: VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined
573
- computeScaleUnit: VxeGanttDefines.ColumnScaleType
574
- computeMinScale: VxeGanttDefines.ColumnScaleObj
575
- computeWeekScale: VxeGanttDefines.ColumnScaleObj | null | undefined
576
- computeTitleField: string
577
- computeStartField: string
578
- computeEndField: string
579
- computeTypeField: string
580
- computeProgressField: string
581
- computeScrollbarOpts: VxeTablePropTypes.ScrollbarConfig
582
- computeScrollbarXToTop: boolean
583
- computeScrollbarYToLeft: boolean
584
- }
585
- export interface VxeGanttPrivateComputed<D = any> extends GanttPrivateComputed<D> { }
586
-
587
- export interface GanttReactData<D = any> extends GridReactData<D> {
588
- showLeftView: boolean
589
- showRightView: boolean
590
- taskScaleList: VxeGanttDefines.ColumnScaleObj[]
591
- tableLinks: VxeGanttDefines.LinkConfObj[]
592
-
593
- // 存放 bar tooltip 相关信息
594
- barTipStore: {
595
- row: D | null
596
- content: string
597
- visible: boolean
598
- params?: null | {
599
- row: D | null
600
- rowIndex: number
601
- $rowIndex: number
602
- _rowIndex: number
603
- }
604
- }
605
-
606
- dragLinkFromStore: {
607
- rowid: string | null
608
- type: 0 | 1
609
- }
610
- activeLink: VxeGanttDefines.LinkConfObj | null
611
- activeBarRowid: any
612
- isActiveCeLe: boolean
613
- linkList: VxeGanttDefines.LinkConfObj[]
614
- upLinkFlag: number
615
-
616
- nowTime: number
617
- currLeftSpacing: number
618
- currRightSpacing: number
619
- }
620
-
621
- export interface GanttInternalData extends GridInternalData {
622
- linkFromConfMaps: Record<string, VxeGanttDefines.LinkConfObj[]>
623
- linkToConfMaps: Record<string, VxeGanttDefines.LinkConfObj[]>
624
- linkUniqueMaps: Record<string, VxeGanttDefines.LinkConfObj>
625
- resizeTableWidth: number
626
- barTipTimeout?: any
627
-
628
- dragBarRow?: any
629
- dragLineRow?: any
630
- dragLinkToStore: {
631
- rowid: string | null
632
- type: 0 | 1
633
- }
634
-
635
- _msTout?: any
636
- }
637
-
638
- export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEvent'> {
639
- dispatchEvent(type: ValueOf<VxeGanttEmits>, params: Record<string, any>, evnt: Event | null): void
640
- /**
641
- * 刷新任务视图
642
- */
643
- refreshTaskView(): Promise<any>
644
-
645
- /**
646
- * 表格视图是否显示
647
- */
648
- hasTableViewVisible(): boolean
649
- /**
650
- * 显示表格视图
651
- */
652
- showTableView(): Promise<void>
653
- /**
654
- * 隐藏表格视图
655
- */
656
- hideTableView(): Promise<void>
657
- /**
658
- * 任务视图是否显示
659
- */
660
- hasTaskViewVisible(): boolean
661
- /**
662
- * 显示任务视图
663
- */
664
- showTaskView(): Promise<void>
665
- /**
666
- * 隐藏任务视图
667
- */
668
- hideTaskView(): Promise<void>
669
- /**
670
- * 手动关闭任务条提示
671
- */
672
- closeTaskBarTooltip(): Promise<void>
673
- /**
674
- * 如果有滚动条,则滚动到对应的任务视图
675
- */
676
- scrollToTaskView(rowOrRowid: any): Promise<any>
677
- }
678
- export interface VxeGanttMethods<D = any> extends GanttMethods<D>, Omit<VxeGridMethods<D>, 'dispatchEvent'> { }
679
-
680
- export interface GanttPrivateMethods<D = any> extends GridPrivateMethods<D> {
681
- callSlot<T = any>(slotFunc: NormalizedScopedSlot | ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
682
-
683
- /**
684
- * @private
685
- */
686
- handleTaskCellClickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskCellClickParams): void
687
- /**
688
- * @private
689
- */
690
- handleTaskCellDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskCellClickParams): void
691
- /**
692
- * @private
693
- */
694
- handleTaskHeaderContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskHeaderContextmenuParams): void
695
- /**
696
- * @private
697
- */
698
- handleTaskBodyContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskBodyContextmenuParams): void
699
- /**
700
- * @private
701
- */
702
- handleTaskFooterContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskFooterContextmenuParams): void
703
- /**
704
- * @private
705
- */
706
- handleTaskBarContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskBarContextmenuParams): void
707
- /**
708
- * @private
709
- */
710
- handleTaskBarClickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
711
- /**
712
- * @private
713
- */
714
- handleTaskBarDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
715
- /**
716
- * @private
717
- */
718
- triggerTaskBarTooltipEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
719
- /**
720
- * @private
721
- */
722
- handleTaskBarTooltipLeaveEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
723
- }
724
- export interface VxeGanttPrivateMethods<D = any> extends GanttPrivateMethods<D> {
725
- handleTaskClickEvent(evnt: MouseEvent, params: {
726
- row: any
727
- }): void
728
- }
729
-
730
- export type VxeGanttEmits = [
731
- ...VxeGridEmits,
732
-
733
- 'task-cell-click',
734
- 'task-cell-dblclick',
735
- 'task-bar-mouseenter',
736
- 'task-bar-mouseleave',
737
- 'task-bar-click',
738
- 'task-bar-dblclick',
739
- 'task-view-cell-click',
740
- 'task-view-cell-dblclick',
741
- 'task-move-start',
742
- 'task-move-drag',
743
- 'task-move-end',
744
- 'task-resize-start',
745
- 'task-resize-drag',
746
- 'task-resize-end',
747
- 'task-link-click',
748
- 'task-link-dblclick',
749
- 'task-link-remove'
750
- ]
751
-
752
- /**
753
- * 依赖线枚举类型
754
- */
755
- export enum VxeGanttDependencyType {
756
- /**
757
- * 结束后才开始,表示一个任务必须在另一个任务开始之前完成
758
- */
759
- FinishToStart = 0,
760
- /**
761
- * 开始到结束,表示从某个过程的开始到结束的整个过程
762
- */
763
- StartToFinish = 1,
764
- /**
765
- * 开始后才开始,表示一个活动结束了,另一个活动才能开始,它们之间按先后顺序进行
766
- */
767
- StartToStart = 2,
768
- /**
769
- * 完成到完成,表示一个任务必须在另一个任务完成之后才能完成
770
- */
771
- FinishToFinish = 3
772
- }
773
-
774
- /**
775
- * 任务渲染类型
776
- */
777
- export enum VxeGanttTaskType {
778
- /**
779
- * 里程碑类型,该类型节点不需要结束日期
780
- */
781
- Milestone = 'milestone',
782
- /**
783
- * 子视图类型,该类型会将子任务渲染到一行,无需开始日期和结束日期
784
- */
785
- Subview = 'subview'
786
- }
787
-
788
- export namespace VxeGanttDefines {
789
- export interface GanttEventParams<D = any> extends VxeComponentEventParams {
790
- $gantt: VxeGanttConstructor<D>
791
- }
792
-
793
- export type TaskRenderType = 'default' | 'milestone'
794
-
795
- export type LayoutKey = 'Form' | 'Toolbar' | 'Top' | 'Gantt' | 'Bottom' | 'Pager'
796
-
797
- export interface LinkConfObj<D = any> extends VxeGanttPropTypes.Link<D> {
798
- key: string
799
- leColorKey: string
800
- leStatus: VxeComponentStatusType | undefined
801
- leColor: string | undefined
802
- leType: LineType | undefined
803
- leWidth: string | number | undefined
804
- swArrow: boolean | undefined
805
- }
806
-
807
- export type LineType = 'dashed' | 'solid' | 'flowDashed'
808
-
809
- export interface LinkStyleConfig {
810
- /**
811
- * 线颜色
812
- */
813
- lineColor?: string
814
- /**
815
- * 线状态颜色,如果需要自定义颜色使用 lineColor
816
- */
817
- lineStatus?: VxeComponentStatusType
818
- /**
819
- * 线宽度
820
- */
821
- lineWidth?: number | string
822
- /**
823
- * 线类型
824
- */
825
- lineType?: LineType
826
- /**
827
- * 显示箭头
828
- */
829
- showArrow?: boolean
830
- }
831
-
832
- export interface LinkInfoObj<D = any> {
833
- row: D
834
- rowLinks: VxeGanttPropTypes.Link[]
835
- allLinks: VxeGanttPropTypes.Link[]
836
- allRows: D[]
837
-
838
- /**
839
- * 已废弃
840
- * @deprecated
841
- */
842
- toLinks: VxeGanttPropTypes.Link[]
843
- /**
844
- * 已废弃
845
- * @deprecated
846
- */
847
- fromLinks: VxeGanttPropTypes.Link[]
848
- /**
849
- * 已废弃
850
- * @deprecated
851
- */
852
- toRows: D[]
853
- /**
854
- * 已废弃
855
- * @deprecated
856
- */
857
- fromRows: D[]
858
- }
859
-
860
- export interface BarStyleConfig {
861
- /**
862
- * 圆角
863
- */
864
- round?: boolean
865
- /**
866
- * 任务条的背景颜色
867
- */
868
- bgColor?: string
869
- /**
870
- * 任务条的字体颜色
871
- */
872
- fontColor?: string
873
- /**
874
- * 已完成部分任务条的背景颜色
875
- */
876
- completedBgColor?: string
877
- /**
878
- * 子任务视图概况任务条的背景颜色
879
- */
880
- overviewBgColor?: string
881
- }
882
-
883
- export interface GroupColumn<D = any> {
884
- scaleItem: ColumnScaleObj
885
- columns: ViewColumn<D>[]
886
- }
887
-
888
- export interface ViewColumn<D = any> {
889
- field: string
890
- title: string
891
- dateObj: VxeGanttDefines.ScaleDateObj
892
- childCount?: number
893
- children?: ViewColumn<D>[]
894
- }
895
-
896
- export interface ScaleDateObj {
897
- date: Date
898
- yy: string
899
- yyyy: string
900
- M: string
901
- MM: string
902
- d: string
903
- dd: string
904
- H: string
905
- HH: string
906
- m: string
907
- mm: string
908
- s: string
909
- ss: string
910
- q: number
911
- W: string
912
- WW: string
913
- e: number
914
- E: number
915
- }
916
-
917
- export interface ScaleDefaultOptions {
918
- /**
919
- * 日期跨度间隔
920
- */
921
- step?: number
922
- /**
923
- * 日期绑定值的格式
924
- */
925
- valueFormat?: string
926
- /**
927
- * 自定义时间轴-列头单元格标题
928
- */
929
- titleMethod?: (params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => string | number
930
- /**
931
- * 自定义时间轴-自定义标题日期格式
932
- */
933
- titleFormat?: string
934
- /**
935
- * 自定义时间轴-列头单元格样式
936
- */
937
- headerCellStyle?: CSSStyleDeclaration | ((params: VxeGanttSlotTypes.TaskViewHeaderCellStyleSlotParams) => void | null | Partial<CSSStyleDeclaration>)
938
- /**
939
- * 自定义插槽模板
940
- */
941
- slots?: {
942
- /**
943
- * 自定义标题
944
- */
945
- title?: string | ((params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => VxeComponentSlotType | VxeComponentSlotType[])
946
- }
947
- }
948
-
949
- export interface ScaleWeekOptions extends ScaleDefaultOptions {
950
- /**
951
- * 设置每周的起始日期是星期几
952
- */
953
- startDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6
954
- }
955
-
956
- /**
957
- * 日期轴类型
958
- */
959
- export type ColumnScaleType = 'second' | 'minute' | 'hour' | 'date' | 'day' | 'week' | 'month' | 'quarter' | 'year'
960
-
961
- export interface ColumnScaleConfig extends ScaleDefaultOptions, ScaleWeekOptions {
962
- type: ColumnScaleType
963
- align?: VxeComponentAlignType
964
- }
965
-
966
- export interface ColumnScaleObj extends ScaleDefaultOptions, ScaleWeekOptions {
967
- type: ColumnScaleType
968
- align?: VxeComponentAlignType
969
- level: number
970
- }
971
-
972
- export interface RowCacheItem<D = any> {
973
- row: D
974
- rowid: string
975
- oLeftSize: number
976
- oWidthSize: number
977
- }
978
-
979
- export interface TaskCellClickParams<D = any> {
980
- row: D
981
- column: VxeGanttPropTypes.Column<D>
982
- }
983
- export interface TaskBarClickParams<D = any> {
984
- row: D
985
- }
986
- export interface TaskCellClickEventParams<D = any> extends TaskCellClickParams<D>, GanttEventParams {}
987
- export interface TaskCellDblclickEventParams<D = any> extends TaskCellClickEventParams<D> {}
988
- export interface TaskBarClickEventParams<D = any> extends TaskBarClickParams<D>, GanttEventParams {}
989
- export interface TaskBarDblclickEventParams<D = any> extends TaskBarClickEventParams<D> {}
990
-
991
- export interface TaskBarMouseoverParams<D = any> extends GanttEventParams {
992
- scaleType: VxeGanttDefines.ColumnScaleType
993
- row: D
994
- rowIndex: number
995
- $rowIndex: number
996
- _rowIndex: number
997
- }
998
-
999
- export interface TaskHeaderContextmenuParams<D = any> {
1000
- source: string
1001
- type: string
1002
- column: ViewColumn<D>
1003
- $rowIndex: number
1004
- }
1005
- export interface TaskBodyContextmenuParams<D = any> {
1006
- source: string
1007
- type: string
1008
- row?: D
1009
- rowIndex: number
1010
- $rowIndex: number
1011
- _rowIndex: number
1012
- column?: ViewColumn<D>
1013
- }
1014
- export interface TaskFooterContextmenuParams<D = any> {
1015
- source: string
1016
- type: string
1017
- column?: ViewColumn<D>
1018
- $rowIndex: number
1019
- }
1020
- export interface TaskBarContextmenuParams<D = any> {
1021
- source: string
1022
- type: string
1023
- row: D
1024
- rowIndex: number
1025
- $rowIndex: number
1026
- _rowIndex: number
1027
- }
1028
-
1029
- export interface TaskViewCellClickEventParams<D = any> extends GanttEventParams<D> {
1030
- row: D
1031
- column: ViewColumn<D>
1032
- }
1033
- export interface TaskViewCellDblclickEventParams<D = any> extends TaskViewCellClickEventParams<D> {}
1034
-
1035
- export interface TaskMoveStartEventParams<D = any> extends GanttEventParams<D> {
1036
- $gantt: VxeGanttConstructor<D>
1037
- row: D
1038
- startDate: Date
1039
- endDate: Date
1040
- }
1041
- export interface TaskMoveDragEventParams<D = any> extends TaskMoveStartEventParams<D> {}
1042
- export interface TaskMoveEndEventParams<D = any> extends TaskMoveStartEventParams<D> {
1043
- targetStartDate: Date
1044
- targetEndDate: Date
1045
- }
1046
- export interface TaskResizeStartEventParams<D = any> extends GanttEventParams<D> {
1047
- $gantt: VxeGanttConstructor<D>
1048
- resizeType: 'start' | 'end'
1049
- row: D
1050
- startDate: Date
1051
- endDate: Date
1052
- }
1053
- export interface TaskResizeDragEventParams<D = any> extends TaskResizeStartEventParams<D> {}
1054
- export interface TaskResizeEndEventParams<D = any> extends TaskResizeStartEventParams<D> {
1055
- targetStartDate: Date
1056
- targetEndDate: Date
1057
- }
1058
-
1059
- export interface TaskLinkClickEventParams<D = any> extends GanttEventParams<D> {
1060
- linkItem: VxeGanttDefines.LinkConfObj
1061
- fromRow: D
1062
- toRow: D
1063
- }
1064
- export interface TaskLinkDblclickEventParams<D = any> extends TaskLinkClickEventParams<D> {}
1065
- export interface TaskLinkRemoveEventParams<D = any> extends TaskLinkClickEventParams<D> {}
1066
- }
1067
-
1068
- export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
1069
- onTaskCellClick?: VxeGanttEvents.TaskCellClick<D>
1070
- onTaskCellDblclick?: VxeGanttEvents.TaskCellDblclick<D>
1071
- onTaskBarClick?: VxeGanttEvents.TaskBarClick<D>
1072
- onTaskBarDblclick?: VxeGanttEvents.TaskBarDblclick<D>
1073
- onTaskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
1074
- onTaskViewCellDblclick?: VxeGanttEvents.TaskViewCellDblclick<D>
1075
- onTaskMoveStart?: VxeGanttEvents.TaskMoveStart<D>
1076
- onTaskMoveDrag?: VxeGanttEvents.TaskMoveDrag<D>
1077
- onTaskMoveEnd?: VxeGanttEvents.TaskMoveEnd<D>
1078
- onTaskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
1079
- onTaskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
1080
- onTaskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
1081
- onTaskLinkClick?: VxeGanttEvents.TaskLinkRemove<D>
1082
- onTaskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
1083
- onTaskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
1084
- }
1085
-
1086
- export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
1087
- taskCellClick?: VxeGanttEvents.TaskCellClick<D>
1088
- taskCellDblclick?: VxeGanttEvents.TaskCellDblclick<D>
1089
- taskBarClick?: VxeGanttEvents.TaskBarClick<D>
1090
- taskBarDblclick?: VxeGanttEvents.TaskBarDblclick<D>
1091
- taskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
1092
- taskViewCellDblclick?: VxeGanttEvents.TaskViewCellDblclick<D>
1093
- taskMoveStart?: VxeGanttEvents.TaskMoveStart<D>
1094
- taskMoveDrag?: VxeGanttEvents.TaskMoveDrag<D>
1095
- taskMoveEnd?: VxeGanttEvents.TaskMoveEnd<D>
1096
- taskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
1097
- taskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
1098
- taskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
1099
- taskLinkClick?: VxeGanttEvents.TaskLinkClick<D>
1100
- taskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
1101
- taskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
1102
- }
1103
-
1104
- export namespace VxeGanttEvents {
1105
- export type TaskCellClick<D = any> = (params: VxeGanttDefines.TaskCellClickEventParams<D>) => void
1106
- export type TaskCellDblclick<D = any> = (params: VxeGanttDefines.TaskCellDblclickEventParams<D>) => void
1107
- export type TaskBarClick<D = any> = (params: VxeGanttDefines.TaskBarClickEventParams<D>) => void
1108
- export type TaskBarDblclick<D = any> = (params: VxeGanttDefines.TaskBarDblclickEventParams<D>) => void
1109
- export type TaskViewCellClick<D = any> = (params: VxeGanttDefines.TaskViewCellClickEventParams<D>) => void
1110
- export type TaskViewCellDblclick<D = any> = (params: VxeGanttDefines.TaskViewCellDblclickEventParams<D>) => void
1111
- export type TaskMoveStart<D = any> = (params: VxeGanttDefines.TaskMoveStartEventParams<D>) => void
1112
- export type TaskMoveDrag<D = any> = (params: VxeGanttDefines.TaskMoveDragEventParams<D>) => void
1113
- export type TaskMoveEnd<D = any> = (params: VxeGanttDefines.TaskMoveEndEventParams<D>) => void
1114
- export type TaskResizeStart<D = any> = (params: VxeGanttDefines.TaskResizeStartEventParams<D>) => void
1115
- export type TaskResizeDrag<D = any> = (params: VxeGanttDefines.TaskResizeDragEventParams<D>) => void
1116
- export type TaskResizeEnd<D = any> = (params: VxeGanttDefines.TaskResizeEndEventParams<D>) => void
1117
- export type TaskLinkClick<D = any> = (params: VxeGanttDefines.TaskLinkClickEventParams<D>) => void
1118
- export type TaskLinkDblclick<D = any> = (params: VxeGanttDefines.TaskLinkDblclickEventParams<D>) => void
1119
- export type TaskLinkRemove<D = any> = (params: VxeGanttDefines.TaskLinkRemoveEventParams<D>) => void
1120
- }
1121
-
1122
- export namespace VxeGanttSlotTypes {
1123
- export interface DefaultSlotParams<D = any> {
1124
- $gantt: VxeGanttConstructor<D>
1125
- }
1126
-
1127
- export interface TaskBarSlotParams<D = any> {
1128
- row: D
1129
- }
1130
-
1131
- export interface TaskBarOverviewSlotParams<D = any> {
1132
- row: D
1133
- }
1134
-
1135
- export interface TaskViewCellTitleSlotParams {
1136
- title: string | number
1137
- dateObj: VxeGanttDefines.ScaleDateObj
1138
- scaleObj: VxeGanttDefines.ColumnScaleObj
1139
- $rowIndex: number
1140
- }
1141
- export interface TaskViewHeaderCellStyleSlotParams extends TaskViewCellTitleSlotParams {}
1142
-
1143
- export interface TaskViewCellStyleSlotParams<D = any> {
1144
- source: string
1145
- type: string
1146
- row?: D
1147
- rowIndex: number
1148
- $rowIndex: number
1149
- _rowIndex: number
1150
- column?: VxeGanttDefines.ViewColumn<D>
1151
- }
1152
-
1153
- export interface TaskBarTooltipSlotParams<D = any> {
1154
- row: D
1155
- rowIndex: number
1156
- $rowIndex: number
1157
- _rowIndex: number
1158
- tooltipContent: string
1159
- }
1160
-
1161
- export interface TaskTaskNowLineSlotParams {
1162
- }
1163
- }
1164
-
1165
- export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
1166
- /**
1167
- * 自定义任务条模板
1168
- */
1169
- taskBar?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
1170
- 'task-bar'?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
1171
- /**
1172
- * 自定义任务总览模板
1173
- */
1174
- taskBarOverview?(params: VxeGanttSlotTypes.TaskBarOverviewSlotParams<D>): any
1175
- 'task-bar-overview'?(params: VxeGanttSlotTypes.TaskBarOverviewSlotParams<D>): any
1176
- /**
1177
- * 自定义任务条提示模板
1178
- */
1179
- taskBarTooltip?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
1180
- 'task-bar-tooltip'?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
1181
- /**
1182
- * 自定义任务此刻线模板
1183
- */
1184
- taskNowLine?(params: VxeGanttSlotTypes.TaskTaskNowLineSlotParams): any
1185
- 'task-now-line'?(params: VxeGanttSlotTypes.TaskTaskNowLineSlotParams): any
1186
- }
1187
-
1188
- export * from './gantt-module'
1189
- export * from './gantt-plugins'
1190
-
1191
- export const Gantt: typeof VxeGantt
1192
- export default VxeGantt
1
+ import { CreateElement } from 'vue'
2
+ import { NormalizedScopedSlot } from 'vue/types/vnode'
3
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSlotType, VxeComponentAlignType, VxeComponentStatusType } from '@vxe-ui/core'
4
+ import { GridPrivateRef, VxeGridProps, VxeGridPropTypes, GridPrivateComputed, GridReactData, GridInternalData, GridMethods, GridPrivateMethods, VxeGridEmits, VxeGridSlots, VxeGridListeners, VxeGridEventProps, VxeGridMethods } from './grid'
5
+ import { VxeTablePropTypes } from './table'
6
+ import { VxeTooltipPropTypes } from './tooltip'
7
+
8
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types,@typescript-eslint/no-unused-vars */
9
+
10
+ export declare const VxeGantt: DefineVxeComponentApp<VxeGanttProps, VxeGanttEventProps, VxeGanttSlots, VxeGanttMethods>
11
+ export type VxeGanttComponent = DefineVxeComponentOptions<VxeGanttProps>
12
+
13
+ export type VxeGanttInstance<D = any> = DefineVxeComponentInstance<{
14
+ reactData: GanttReactData<D>
15
+ internalData: GanttInternalData
16
+ }, VxeGanttProps<D>, VxeGanttPrivateComputed<D>, VxeGanttMethods<D>>
17
+
18
+ export type VxeGanttConstructor<D = any> = VxeGanttInstance<D>
19
+
20
+ export interface GanttPrivateRef<D = any> extends GridPrivateRef<D> {
21
+ }
22
+ export interface VxeGanttPrivateRef<D = any> extends GanttPrivateRef<D> { }
23
+
24
+ export namespace VxeGanttPropTypes {
25
+ export type Size = VxeGridPropTypes.Size
26
+ export type Layouts = VxeGanttDefines.LayoutKey[] | VxeGanttDefines.LayoutKey[][]
27
+ export type Column<D = any> = VxeGridPropTypes.Column<D>
28
+ export type Columns<D = any> = Column<D>[]
29
+ export interface Link<D = any> extends VxeGanttDefines.LinkStyleConfig {
30
+ /**
31
+ * 线类型
32
+ */
33
+ type: VxeGanttDependencyType
34
+ /**
35
+ * 从指定行
36
+ */
37
+ from: D | string | number
38
+ /**
39
+ * 到目标行
40
+ */
41
+ to: D | string | number
42
+ }
43
+ export type Links<D = any> = Link<D>[]
44
+ export interface PagerConfig extends VxeGridPropTypes.PagerConfig {}
45
+ export interface ProxyConfig<D = any> extends VxeGridPropTypes.ProxyConfig<D> {}
46
+ export interface ToolbarConfig extends VxeGridPropTypes.ToolbarConfig {}
47
+ export interface FormConfig extends VxeGridPropTypes.FormConfig {}
48
+ export interface ZoomConfig extends VxeGridPropTypes.ZoomConfig {}
49
+
50
+ export interface TaskConfig {
51
+ /**
52
+ * 标题的字段名
53
+ */
54
+ titleField?: string
55
+ /**
56
+ * 开始日期的字段名
57
+ */
58
+ startField?: string
59
+ /**
60
+ * 结束日期的字段名
61
+ */
62
+ endField?: string
63
+ /**
64
+ * 任务类型
65
+ */
66
+ typeField?: string
67
+ /**
68
+ * 进度的字段名
69
+ */
70
+ progressField?: string
71
+ /**
72
+ * 自定义解析日期的格式
73
+ */
74
+ dateFormat?: string
75
+ }
76
+
77
+ export interface TaskViewScaleConfig {
78
+ /**
79
+ * 年配置
80
+ */
81
+ year?: VxeGanttDefines.ScaleDefaultOptions
82
+ /**
83
+ * 季度配置
84
+ */
85
+ quarter?: VxeGanttDefines.ScaleDefaultOptions
86
+ /**
87
+ * 月配置
88
+ */
89
+ month?: VxeGanttDefines.ScaleDefaultOptions
90
+ /**
91
+ * 周配置
92
+ */
93
+ week?: VxeGanttDefines.ScaleWeekOptions
94
+ /**
95
+ * 星期配置
96
+ */
97
+ day?: VxeGanttDefines.ScaleDefaultOptions
98
+ /**
99
+ * 天配置
100
+ */
101
+ date?: VxeGanttDefines.ScaleDefaultOptions
102
+ /**
103
+ * 小时配置
104
+ */
105
+ hour?: VxeGanttDefines.ScaleDefaultOptions
106
+ /**
107
+ * 分钟配置
108
+ */
109
+ minute?: VxeGanttDefines.ScaleDefaultOptions
110
+ /**
111
+ * 秒配置
112
+ */
113
+ second?: VxeGanttDefines.ScaleDefaultOptions
114
+ }
115
+
116
+ export interface TaskNowLineConfig {
117
+ /**
118
+ * 此刻线的显示方式:start(显示到左侧),center(显示居中),end(显示到右侧),progress(显示实际进度)
119
+ */
120
+ mode?: 'start' | 'progress' | 'center' | 'end'
121
+ /**
122
+ * 字体颜色
123
+ */
124
+ fontColor?: string
125
+ /**
126
+ * 线背景颜色
127
+ */
128
+ bgColor?: string
129
+ /**
130
+ * 线宽度
131
+ */
132
+ width?: number | string
133
+ }
134
+
135
+ export interface TaskViewConfig<D = any> {
136
+ /**
137
+ * 高亮此刻线
138
+ */
139
+ showNowLine?: boolean
140
+ /**
141
+ * 日期轴配置项,可以通过 TaskViewScaleConfig.scaleUnit 指定渲染单位
142
+ */
143
+ scales?: VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[]
144
+ /**
145
+ * 表格样式
146
+ */
147
+ tableStyle?: {
148
+ /**
149
+ * 边框
150
+ */
151
+ border?: VxeTablePropTypes.Border
152
+ /**
153
+ * 宽度
154
+ */
155
+ width?: number | string
156
+ minWidth?: number | string
157
+ maxWidth?: number | string
158
+ }
159
+ /**
160
+ * 网格样式
161
+ */
162
+ gridding?: {
163
+ /**
164
+ * 左侧间距多少列
165
+ */
166
+ leftSpacing?: number
167
+ /**
168
+ * 右侧间距多少列
169
+ */
170
+ rightSpacing?: number
171
+ }
172
+ /**
173
+ * 任务视图样式
174
+ */
175
+ viewStyle?: {
176
+ /**
177
+ * 边框
178
+ */
179
+ border?: VxeTablePropTypes.Border
180
+ /**
181
+ * 单元格宽度
182
+ */
183
+ cellWidth?: number | string
184
+ /**
185
+ * 给行附加 className
186
+ */
187
+ rowClassName?: string | ((params: {
188
+ source: string
189
+ type: string
190
+ scaleType: VxeGanttDefines.ColumnScaleType
191
+ row: D
192
+ rowIndex: number
193
+ $rowIndex: number
194
+ _rowIndex: number
195
+ }) => void | null | string | { [key: string]: boolean | null | undefined })
196
+ /**
197
+ * 行样式
198
+ */
199
+ rowStyle?: Partial<CSSStyleDeclaration> | ((params: {
200
+ source: string
201
+ type: string
202
+ scaleType: VxeGanttDefines.ColumnScaleType
203
+ row: D
204
+ rowIndex: number
205
+ $rowIndex: number
206
+ _rowIndex: number
207
+ }) => void | null | Partial<CSSStyleDeclaration>)
208
+ /**
209
+ * 给单元格附加 className
210
+ */
211
+ cellClassName?: string | ((params: {
212
+ source: string
213
+ type: string
214
+ scaleType: VxeGanttDefines.ColumnScaleType
215
+ dateObj: VxeGanttDefines.ScaleDateObj
216
+ column?: VxeGanttDefines.ViewColumn<D>
217
+ row: D
218
+ rowIndex: number
219
+ $rowIndex: number
220
+ _rowIndex: number
221
+ }) => void | null | string | { [key: string]: boolean | null | undefined })
222
+ /**
223
+ * 单元格样式
224
+ */
225
+ cellStyle?: Partial<CSSStyleDeclaration> | ((params: {
226
+ source: string
227
+ type: string
228
+ scaleType: VxeGanttDefines.ColumnScaleType
229
+ dateObj: VxeGanttDefines.ScaleDateObj
230
+ column?: VxeGanttDefines.ViewColumn<D>
231
+ row: D
232
+ rowIndex: number
233
+ $rowIndex: number
234
+ _rowIndex: number
235
+ }) => void | null | Partial<CSSStyleDeclaration>)
236
+ }
237
+ }
238
+
239
+ export interface TaskSplitConfig {
240
+ /**
241
+ * 是否启用
242
+ */
243
+ enabled?: boolean
244
+ /**
245
+ * 是否允许拖拽调整视图宽度
246
+ */
247
+ resize?: boolean
248
+ /**
249
+ * 是否显示左侧表格的折叠按钮
250
+ */
251
+ showCollapseTableButton?: boolean
252
+ /**
253
+ * 是否显示右侧任务的折叠按钮
254
+ */
255
+ showCollapseTaskButton?: boolean
256
+ }
257
+
258
+ export interface TaskLinkConfig<D = any> extends VxeGanttDefines.LinkStyleConfig {
259
+ /**
260
+ * 是否启用
261
+ */
262
+ enabled?: boolean
263
+ /**
264
+ * 当鼠标点击依赖线时,是否要高亮当前依赖线
265
+ */
266
+ isCurrent?: boolean
267
+ /**
268
+ * 当鼠标移到依赖线时,是否要高亮当前依赖线
269
+ */
270
+ isHover?: boolean
271
+ /**
272
+ * 是否允许双击依赖线删除
273
+ */
274
+ isDblclickToRemove?: boolean
275
+ /**
276
+ * 依赖线被删除之前的方法,可以通过返回 false 阻止删除
277
+ */
278
+ beforeRemoveMethod?(params: {
279
+ $gantt: VxeGanttConstructor<D>
280
+ linkItem: VxeGanttDefines.LinkConfObj
281
+ fromRow: D
282
+ toRow: D
283
+ }): Promise<boolean> | boolean
284
+ /**
285
+ * 依赖线删除之后的方法
286
+ */
287
+ afterRemoveMethod?(params: {
288
+ $gantt: VxeGanttConstructor<D>
289
+ linkItem: VxeGanttDefines.LinkConfObj
290
+ fromRow: D
291
+ toRow: D
292
+ }): void
293
+ /**
294
+ * 拖拽开始时是否允许依赖线创建的方法,该方法的返回值用来决定是否允许被拖拽
295
+ */
296
+ createStartMethod?(params: {
297
+ $gantt: VxeGanttConstructor<D>
298
+ fromRow: D
299
+ fromPoint: 'start' | 'end'
300
+ }): boolean
301
+ /**
302
+ * 拖拽依赖线创建结束时的方法,该方法的返回值用来决定是否允依赖线许被创建
303
+ */
304
+ createEndMethod?(params: {
305
+ $gantt: VxeGanttConstructor<D>
306
+ fromRow: D
307
+ fromPoint: 'start' | 'end'
308
+ toRow: D
309
+ toPoint: 'start' | 'end'
310
+ }): Promise<boolean> | boolean
311
+ /**
312
+ * 自定义拖拽结束时依赖线创建被赋值的方法
313
+ */
314
+ createSetMethod?(params: {
315
+ $gantt: VxeGanttConstructor<D>
316
+ fromRow: D
317
+ fromPoint: 'start' | 'end'
318
+ toRow: D
319
+ toPoint: 'start' | 'end'
320
+ link: {
321
+ from: string
322
+ to: string
323
+ type: VxeGanttDependencyType
324
+ }
325
+ }): void
326
+ }
327
+
328
+ export interface TaskBarConfig<D = any> {
329
+ /**
330
+ * 是否显示进度条
331
+ */
332
+ showProgress?: boolean
333
+ /**
334
+ * 是否在任务条显示内容
335
+ */
336
+ showContent?: boolean
337
+ /**
338
+ * 是否在任务条显示提示信息
339
+ */
340
+ showTooltip?: boolean
341
+ /**
342
+ * 自定义任务条内容方法
343
+ */
344
+ contentMethod?(params: {
345
+ scaleType: VxeGanttDefines.ColumnScaleType
346
+ title: string
347
+ progress?: string | number
348
+ row: D
349
+ }): string | number
350
+ /**
351
+ * 任务条样式
352
+ */
353
+ barStyle?: VxeGanttDefines.BarStyleConfig | ((params: {
354
+ scaleType: VxeGanttDefines.ColumnScaleType
355
+ $gantt: VxeGanttConstructor<D>
356
+ row: D
357
+ }) => VxeGanttDefines.BarStyleConfig)
358
+ /**
359
+ * 是否启用拖拽移动日期
360
+ */
361
+ moveable?: boolean
362
+ /**
363
+ * 是否启用拖拽调整日期
364
+ */
365
+ resizable?: boolean
366
+ /**
367
+ * 是否允许自定义创建依赖线
368
+ */
369
+ linkCreatable?: boolean
370
+ }
371
+
372
+ /**
373
+ * 里程碑配置项
374
+ */
375
+ export interface TaskBarMilestoneConfig<D = any> {
376
+ /**
377
+ * 自定义图标
378
+ */
379
+ icon?: string | ((params: {
380
+ $gantt: VxeGanttConstructor<D>
381
+ row: D
382
+ }) => string)
383
+ /**
384
+ * 图标状态颜色
385
+ */
386
+ iconStatus?: VxeComponentStatusType | ((params: {
387
+ $gantt: VxeGanttConstructor<D>
388
+ row: D
389
+ }) => VxeComponentStatusType)
390
+ /**
391
+ * 自定义图标样式
392
+ */
393
+ iconStyle?: CSSStyleDeclaration | ((params: {
394
+ $gantt: VxeGanttConstructor<D>
395
+ row: D
396
+ }) => void | null | Partial<CSSStyleDeclaration>)
397
+ /**
398
+ * 是否显示图标
399
+ */
400
+ showIcon?: boolean
401
+ }
402
+
403
+ /**
404
+ * 子视图类型配置项
405
+ */
406
+ export interface TaskBarSubviewConfig<D = any> {
407
+ /**
408
+ * 是否启用
409
+ */
410
+ enabled?: boolean
411
+ /**
412
+ * 是否显示任务总览
413
+ */
414
+ showOverview?: boolean
415
+ /**
416
+ * 子视图任务条样式
417
+ */
418
+ barStyle?: CSSStyleDeclaration | ((params: {
419
+ $gantt: VxeGanttConstructor<D>
420
+ scaleType: VxeGanttDefines.ColumnScaleType
421
+ row: D
422
+ rowIndex: number
423
+ $rowIndex: number
424
+ _rowIndex: number
425
+ }) => void | null | Partial<CSSStyleDeclaration>)
426
+ }
427
+
428
+ export interface TaskBarTooltipConfig<D = any> {
429
+ theme?: VxeTooltipPropTypes.Theme
430
+ enterable?: VxeTooltipPropTypes.Enterable
431
+ enterDelay?: VxeTooltipPropTypes.EnterDelay
432
+ leaveDelay?: VxeTooltipPropTypes.LeaveDelay
433
+ width?: VxeTooltipPropTypes.Width
434
+ height?: VxeTooltipPropTypes.Height
435
+ minWidth?: VxeTooltipPropTypes.MinWidth
436
+ minHeight?: VxeTooltipPropTypes.MinHeight
437
+ maxWidth?: VxeTooltipPropTypes.MaxWidth
438
+ maxHeight?: VxeTooltipPropTypes.MaxHeight
439
+ useHTML?: VxeTooltipPropTypes.UseHTML
440
+ contentMethod?(params: {
441
+ $gantt: VxeGanttConstructor<D>
442
+ scaleType: VxeGanttDefines.ColumnScaleType
443
+ row: D
444
+ rowIndex: number
445
+ $rowIndex: number
446
+ _rowIndex: number
447
+ }): string | null | void
448
+ }
449
+
450
+ export interface TaskBarResizeConfig<D = any> {
451
+ /**
452
+ * 是否允许拖拽调整任务起始日期
453
+ */
454
+ allowStart?: boolean
455
+ /**
456
+ * 是否允许拖拽调整任务条结束日期
457
+ */
458
+ allowEnd?: boolean
459
+ /**
460
+ * 拖拽开始时是否允许行拖拽调整任务日期的方法,该方法的返回值用来决定是否允许被拖拽
461
+ */
462
+ resizeStartMethod?(params: {
463
+ $gantt: VxeGanttConstructor<D>
464
+ resizeType: 'start' | 'end'
465
+ row: D
466
+ startDate: Date
467
+ endDate: Date
468
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
469
+ }): boolean
470
+ /**
471
+ * 拖拽结束时是否允许行拖拽调整任务日期的方法,该方法的返回值用来决定是否允许被拖拽调整日期范围
472
+ */
473
+ resizeEndMethod?(params: {
474
+ $gantt: VxeGanttConstructor<D>
475
+ resizeType: 'start' | 'end'
476
+ row: D
477
+ startDate: Date
478
+ endDate: Date
479
+ targetStartDate: Date
480
+ targetEndDate: Date
481
+ offsetSize: number
482
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
483
+ }): Promise<boolean> | boolean
484
+ /**
485
+ * 自定义拖拽结束时赋值的方法
486
+ */
487
+ resizeSetMethod?(params: {
488
+ $gantt: VxeGanttConstructor<D>
489
+ resizeType: 'start' | 'end'
490
+ row: D
491
+ startDate: Date
492
+ endDate: Date
493
+ targetStartDate: Date
494
+ targetEndDate: Date
495
+ startValue: any
496
+ endValue: any
497
+ offsetSize: number
498
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
499
+ }): void
500
+ }
501
+
502
+ export interface TaskBarMoveConfig<D = any> {
503
+ /**
504
+ * 拖拽移动任务后自动更新依赖线关联任务的日期
505
+ */
506
+ isSyncLinkTask?: boolean
507
+ /**
508
+ * 拖拽开始时是否允许行拖拽移动任务日期的方法,该方法的返回值用来决定是否允许被拖拽
509
+ */
510
+ moveStartMethod?(params: {
511
+ $gantt: VxeGanttConstructor<D>
512
+ row: D
513
+ startDate: Date
514
+ endDate: Date
515
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
516
+ }): boolean
517
+ /**
518
+ * 拖拽移动任务日期结束时的方法,该方法的返回值用来决定是否允许被拖拽移动到指定日期
519
+ */
520
+ moveEndMethod?(params: {
521
+ $gantt: VxeGanttConstructor<D>
522
+ row: D
523
+ startDate: Date
524
+ endDate: Date
525
+ targetStartDate: Date
526
+ targetEndDate: Date
527
+ offsetSize: number
528
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
529
+ }): Promise<boolean> | boolean
530
+ /**
531
+ * 自定义拖拽结束时任务日期被赋值的方法
532
+ */
533
+ moveSetMethod?(params: {
534
+ $gantt: VxeGanttConstructor<D>
535
+ row: D
536
+ startDate: Date
537
+ endDate: Date
538
+ targetStartDate: Date
539
+ targetEndDate: Date
540
+ startValue: any
541
+ endValue: any
542
+ offsetSize: number
543
+ linkInfo: VxeGanttDefines.LinkInfoObj<D>
544
+ }): void
545
+ }
546
+ }
547
+
548
+ export interface VxeGanttProps<D = any> extends Omit<VxeGridProps<D>, 'layouts'> {
549
+ /**
550
+ * 依赖线
551
+ */
552
+ links?: VxeGanttPropTypes.Links<D>
553
+ layouts?: VxeGanttPropTypes.Layouts
554
+ taskConfig?: VxeGanttPropTypes.TaskConfig
555
+ taskViewScaleConfig?: VxeGanttPropTypes.TaskViewScaleConfig
556
+ taskNowLineConfig?: VxeGanttPropTypes.TaskNowLineConfig
557
+ taskViewConfig?: VxeGanttPropTypes.TaskViewConfig<D>
558
+ taskSplitConfig?: VxeGanttPropTypes.TaskSplitConfig
559
+ taskLinkConfig?: VxeGanttPropTypes.TaskLinkConfig
560
+ taskBarConfig?: VxeGanttPropTypes.TaskBarConfig<D>
561
+ taskBarMilestoneConfig?: VxeGanttPropTypes.TaskBarMilestoneConfig<D>
562
+ taskBarSubviewConfig?: VxeGanttPropTypes.TaskBarSubviewConfig<D>
563
+ taskBarTooltipConfig?: VxeGanttPropTypes.TaskBarTooltipConfig<D>
564
+ taskBarResizeConfig?: VxeGanttPropTypes.TaskBarResizeConfig<D>
565
+ taskBarMoveConfig?: VxeGanttPropTypes.TaskBarMoveConfig<D>
566
+ }
567
+
568
+ export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
569
+ computeTaskOpts: VxeGanttPropTypes.TaskConfig
570
+ computeTaskViewOpts: VxeGanttPropTypes.TaskViewConfig<D>
571
+ computeTaskNowLineOpts: VxeGanttPropTypes.TaskNowLineConfig
572
+ computeTaskViewScaleOpts: VxeGanttPropTypes.TaskViewScaleConfig
573
+ computeTaskBarOpts: VxeGanttPropTypes.TaskBarConfig<D>
574
+ computeTaskBarMoveOpts: VxeGanttPropTypes.TaskBarMoveConfig<D>
575
+ computeTaskBarResizeOpts: VxeGanttPropTypes.TaskBarResizeConfig<D>
576
+ computeTaskSplitOpts: VxeGanttPropTypes.TaskSplitConfig
577
+ computeTaskBarMilestoneOpts: VxeGanttPropTypes.TaskBarMilestoneConfig<D>
578
+ computeTaskBarSubviewOpts: VxeGanttPropTypes.TaskBarSubviewConfig<D>
579
+ computeTaskBarTooltipOpts: VxeGanttPropTypes.TaskBarTooltipConfig
580
+ computeTaskLinkOpts: VxeGanttPropTypes.TaskLinkConfig
581
+ computeTaskViewScales: VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined
582
+ computeScaleUnit: VxeGanttDefines.ColumnScaleType
583
+ computeMinScale: VxeGanttDefines.ColumnScaleObj
584
+ computeWeekScale: VxeGanttDefines.ColumnScaleObj | null | undefined
585
+ computeTitleField: string
586
+ computeStartField: string
587
+ computeEndField: string
588
+ computeTypeField: string
589
+ computeProgressField: string
590
+ computeScrollbarOpts: VxeTablePropTypes.ScrollbarConfig
591
+ computeScrollbarXToTop: boolean
592
+ computeScrollbarYToLeft: boolean
593
+ }
594
+ export interface VxeGanttPrivateComputed<D = any> extends GanttPrivateComputed<D> { }
595
+
596
+ export interface GanttReactData<D = any> extends GridReactData<D> {
597
+ showLeftView: boolean
598
+ showRightView: boolean
599
+ taskScaleList: VxeGanttDefines.ColumnScaleObj[]
600
+ tableLinks: VxeGanttDefines.LinkConfObj[]
601
+
602
+ // 存放 bar tooltip 相关信息
603
+ barTipStore: {
604
+ row: D | null
605
+ content: string
606
+ visible: boolean
607
+ params?: null | {
608
+ row: D | null
609
+ rowIndex: number
610
+ $rowIndex: number
611
+ _rowIndex: number
612
+ }
613
+ }
614
+
615
+ dragLinkFromStore: {
616
+ rowid: string | null
617
+ type: 0 | 1
618
+ }
619
+ activeLink: VxeGanttDefines.LinkConfObj | null
620
+ activeBarRowid: any
621
+ isActiveCeLe: boolean
622
+ linkList: VxeGanttDefines.LinkConfObj[]
623
+ upLinkFlag: number
624
+
625
+ nowTime: number
626
+ currLeftSpacing: number
627
+ currRightSpacing: number
628
+ }
629
+
630
+ export interface GanttInternalData extends GridInternalData {
631
+ linkFromConfMaps: Record<string, VxeGanttDefines.LinkConfObj[]>
632
+ linkToConfMaps: Record<string, VxeGanttDefines.LinkConfObj[]>
633
+ linkUniqueMaps: Record<string, VxeGanttDefines.LinkConfObj>
634
+ resizeTableWidth: number
635
+ barTipTimeout?: any
636
+
637
+ dragBarRow?: any
638
+ dragLineRow?: any
639
+ dragLinkToStore: {
640
+ rowid: string | null
641
+ type: 0 | 1
642
+ }
643
+
644
+ _msTout?: any
645
+ }
646
+
647
+ export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEvent'> {
648
+ dispatchEvent(type: ValueOf<VxeGanttEmits>, params: Record<string, any>, evnt: Event | null): void
649
+ /**
650
+ * 刷新任务视图
651
+ */
652
+ refreshTaskView(): Promise<any>
653
+
654
+ /**
655
+ * 表格视图是否显示
656
+ */
657
+ hasTableViewVisible(): boolean
658
+ /**
659
+ * 显示表格视图
660
+ */
661
+ showTableView(): Promise<void>
662
+ /**
663
+ * 隐藏表格视图
664
+ */
665
+ hideTableView(): Promise<void>
666
+ /**
667
+ * 任务视图是否显示
668
+ */
669
+ hasTaskViewVisible(): boolean
670
+ /**
671
+ * 显示任务视图
672
+ */
673
+ showTaskView(): Promise<void>
674
+ /**
675
+ * 隐藏任务视图
676
+ */
677
+ hideTaskView(): Promise<void>
678
+ /**
679
+ * 手动关闭任务条提示
680
+ */
681
+ closeTaskBarTooltip(): Promise<void>
682
+ /**
683
+ * 如果有滚动条,则滚动到对应的任务视图
684
+ */
685
+ scrollToTaskView(rowOrRowid: any): Promise<any>
686
+ }
687
+ export interface VxeGanttMethods<D = any> extends GanttMethods<D>, Omit<VxeGridMethods<D>, 'dispatchEvent'> { }
688
+
689
+ export interface GanttPrivateMethods<D = any> extends GridPrivateMethods<D> {
690
+ callSlot<T = any>(slotFunc: NormalizedScopedSlot | ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
691
+
692
+ /**
693
+ * @private
694
+ */
695
+ handleTaskCellClickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskCellClickParams): void
696
+ /**
697
+ * @private
698
+ */
699
+ handleTaskCellDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskCellClickParams): void
700
+ /**
701
+ * @private
702
+ */
703
+ handleTaskHeaderContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskHeaderContextmenuParams): void
704
+ /**
705
+ * @private
706
+ */
707
+ handleTaskBodyContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskBodyContextmenuParams): void
708
+ /**
709
+ * @private
710
+ */
711
+ handleTaskFooterContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskFooterContextmenuParams): void
712
+ /**
713
+ * @private
714
+ */
715
+ handleTaskBarContextmenuEvent(evnt: Event, params: VxeGanttDefines.TaskBarContextmenuParams): void
716
+ /**
717
+ * @private
718
+ */
719
+ handleTaskBarClickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
720
+ /**
721
+ * @private
722
+ */
723
+ handleTaskBarDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
724
+ /**
725
+ * @private
726
+ */
727
+ triggerTaskBarTooltipEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
728
+ /**
729
+ * @private
730
+ */
731
+ handleTaskBarTooltipLeaveEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
732
+ }
733
+ export interface VxeGanttPrivateMethods<D = any> extends GanttPrivateMethods<D> {
734
+ handleTaskClickEvent(evnt: MouseEvent, params: {
735
+ row: any
736
+ }): void
737
+ }
738
+
739
+ export type VxeGanttEmits = [
740
+ ...VxeGridEmits,
741
+
742
+ 'task-cell-click',
743
+ 'task-cell-dblclick',
744
+ 'task-bar-mouseenter',
745
+ 'task-bar-mouseleave',
746
+ 'task-bar-click',
747
+ 'task-bar-dblclick',
748
+ 'task-view-cell-click',
749
+ 'task-view-cell-dblclick',
750
+ 'task-move-start',
751
+ 'task-move-drag',
752
+ 'task-move-end',
753
+ 'task-resize-start',
754
+ 'task-resize-drag',
755
+ 'task-resize-end',
756
+ 'task-link-click',
757
+ 'task-link-dblclick',
758
+ 'task-link-remove'
759
+ ]
760
+
761
+ /**
762
+ * 依赖线枚举类型
763
+ */
764
+ export enum VxeGanttDependencyType {
765
+ /**
766
+ * 结束后才开始,表示一个任务必须在另一个任务开始之前完成
767
+ */
768
+ FinishToStart = 0,
769
+ /**
770
+ * 开始到结束,表示从某个过程的开始到结束的整个过程
771
+ */
772
+ StartToFinish = 1,
773
+ /**
774
+ * 开始后才开始,表示一个活动结束了,另一个活动才能开始,它们之间按先后顺序进行
775
+ */
776
+ StartToStart = 2,
777
+ /**
778
+ * 完成到完成,表示一个任务必须在另一个任务完成之后才能完成
779
+ */
780
+ FinishToFinish = 3
781
+ }
782
+
783
+ /**
784
+ * 任务渲染类型
785
+ */
786
+ export enum VxeGanttTaskType {
787
+ /**
788
+ * 里程碑类型,该类型节点不需要结束日期
789
+ */
790
+ Milestone = 'milestone',
791
+ /**
792
+ * 子视图类型,该类型会将子任务渲染到一行,无需开始日期和结束日期
793
+ */
794
+ Subview = 'subview'
795
+ }
796
+
797
+ export namespace VxeGanttDefines {
798
+ export interface GanttEventParams<D = any> extends VxeComponentEventParams {
799
+ $gantt: VxeGanttConstructor<D>
800
+ }
801
+
802
+ export type TaskRenderType = 'default' | 'milestone'
803
+
804
+ export type LayoutKey = 'Form' | 'Toolbar' | 'Top' | 'Gantt' | 'Bottom' | 'Pager'
805
+
806
+ export interface LinkConfObj<D = any> extends VxeGanttPropTypes.Link<D> {
807
+ key: string
808
+ leColorKey: string
809
+ leStatus: VxeComponentStatusType | undefined
810
+ leColor: string | undefined
811
+ leType: LineType | undefined
812
+ leWidth: string | number | undefined
813
+ swArrow: boolean | undefined
814
+ }
815
+
816
+ export type LineType = 'dashed' | 'solid' | 'flowDashed'
817
+
818
+ export interface LinkStyleConfig {
819
+ /**
820
+ * 线颜色
821
+ */
822
+ lineColor?: string
823
+ /**
824
+ * 线状态颜色,如果需要自定义颜色使用 lineColor
825
+ */
826
+ lineStatus?: VxeComponentStatusType
827
+ /**
828
+ * 线宽度
829
+ */
830
+ lineWidth?: number | string
831
+ /**
832
+ * 线类型
833
+ */
834
+ lineType?: LineType
835
+ /**
836
+ * 显示箭头
837
+ */
838
+ showArrow?: boolean
839
+ }
840
+
841
+ export interface LinkInfoObj<D = any> {
842
+ row: D
843
+ rowLinks: VxeGanttPropTypes.Link[]
844
+ allLinks: VxeGanttPropTypes.Link[]
845
+ allRows: D[]
846
+
847
+ /**
848
+ * 已废弃
849
+ * @deprecated
850
+ */
851
+ toLinks: VxeGanttPropTypes.Link[]
852
+ /**
853
+ * 已废弃
854
+ * @deprecated
855
+ */
856
+ fromLinks: VxeGanttPropTypes.Link[]
857
+ /**
858
+ * 已废弃
859
+ * @deprecated
860
+ */
861
+ toRows: D[]
862
+ /**
863
+ * 已废弃
864
+ * @deprecated
865
+ */
866
+ fromRows: D[]
867
+ }
868
+
869
+ export interface BarStyleConfig {
870
+ /**
871
+ * 圆角
872
+ */
873
+ round?: boolean
874
+ /**
875
+ * 任务条的背景颜色
876
+ */
877
+ bgColor?: string
878
+ /**
879
+ * 任务条的字体颜色
880
+ */
881
+ fontColor?: string
882
+ /**
883
+ * 已完成部分任务条的背景颜色
884
+ */
885
+ completedBgColor?: string
886
+ /**
887
+ * 子任务视图概况任务条的背景颜色
888
+ */
889
+ overviewBgColor?: string
890
+ }
891
+
892
+ export interface GroupColumn<D = any> {
893
+ scaleItem: ColumnScaleObj
894
+ columns: ViewColumn<D>[]
895
+ }
896
+
897
+ export interface ViewColumn<D = any> {
898
+ field: string
899
+ title: string
900
+ dateObj: VxeGanttDefines.ScaleDateObj
901
+ childCount?: number
902
+ children?: ViewColumn<D>[]
903
+ }
904
+
905
+ export interface ScaleDateObj {
906
+ date: Date
907
+ yy: string
908
+ yyyy: string
909
+ M: string
910
+ MM: string
911
+ d: string
912
+ dd: string
913
+ H: string
914
+ HH: string
915
+ m: string
916
+ mm: string
917
+ s: string
918
+ ss: string
919
+ q: number
920
+ W: string
921
+ WW: string
922
+ e: number
923
+ E: number
924
+ }
925
+
926
+ export interface ScaleDefaultOptions {
927
+ /**
928
+ * 日期跨度间隔
929
+ */
930
+ step?: number
931
+ /**
932
+ * 日期绑定值的格式
933
+ */
934
+ valueFormat?: string
935
+ /**
936
+ * 自定义时间轴-列头单元格标题
937
+ */
938
+ titleMethod?: (params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => string | number
939
+ /**
940
+ * 自定义时间轴-自定义标题日期格式
941
+ */
942
+ titleFormat?: string
943
+ /**
944
+ * 自定义时间轴-列头单元格样式
945
+ */
946
+ headerCellStyle?: CSSStyleDeclaration | ((params: VxeGanttSlotTypes.TaskViewHeaderCellStyleSlotParams) => void | null | Partial<CSSStyleDeclaration>)
947
+ /**
948
+ * 自定义插槽模板
949
+ */
950
+ slots?: {
951
+ /**
952
+ * 自定义标题
953
+ */
954
+ title?: string | ((params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => VxeComponentSlotType | VxeComponentSlotType[])
955
+ }
956
+ }
957
+
958
+ export interface ScaleWeekOptions extends ScaleDefaultOptions {
959
+ /**
960
+ * 设置每周的起始日期是星期几
961
+ */
962
+ startDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6
963
+ }
964
+
965
+ /**
966
+ * 日期轴类型
967
+ */
968
+ export type ColumnScaleType = 'second' | 'minute' | 'hour' | 'date' | 'day' | 'week' | 'month' | 'quarter' | 'year'
969
+
970
+ export interface ColumnScaleConfig extends ScaleDefaultOptions, ScaleWeekOptions {
971
+ type: ColumnScaleType
972
+ align?: VxeComponentAlignType
973
+ }
974
+
975
+ export interface ColumnScaleObj extends ScaleDefaultOptions, ScaleWeekOptions {
976
+ type: ColumnScaleType
977
+ align?: VxeComponentAlignType
978
+ level: number
979
+ }
980
+
981
+ export interface RowCacheItem<D = any> {
982
+ row: D
983
+ rowid: string
984
+ oLeftSize: number
985
+ oWidthSize: number
986
+ }
987
+
988
+ export interface TaskCellClickParams<D = any> {
989
+ row: D
990
+ column: VxeGanttPropTypes.Column<D>
991
+ }
992
+ export interface TaskBarClickParams<D = any> {
993
+ row: D
994
+ }
995
+ export interface TaskCellClickEventParams<D = any> extends TaskCellClickParams<D>, GanttEventParams {}
996
+ export interface TaskCellDblclickEventParams<D = any> extends TaskCellClickEventParams<D> {}
997
+ export interface TaskBarClickEventParams<D = any> extends TaskBarClickParams<D>, GanttEventParams {}
998
+ export interface TaskBarDblclickEventParams<D = any> extends TaskBarClickEventParams<D> {}
999
+
1000
+ export interface TaskBarMouseoverParams<D = any> extends GanttEventParams {
1001
+ scaleType: VxeGanttDefines.ColumnScaleType
1002
+ row: D
1003
+ rowIndex: number
1004
+ $rowIndex: number
1005
+ _rowIndex: number
1006
+ }
1007
+
1008
+ export interface TaskHeaderContextmenuParams<D = any> {
1009
+ source: string
1010
+ type: string
1011
+ column: ViewColumn<D>
1012
+ $rowIndex: number
1013
+ }
1014
+ export interface TaskBodyContextmenuParams<D = any> {
1015
+ source: string
1016
+ type: string
1017
+ row?: D
1018
+ rowIndex: number
1019
+ $rowIndex: number
1020
+ _rowIndex: number
1021
+ column?: ViewColumn<D>
1022
+ }
1023
+ export interface TaskFooterContextmenuParams<D = any> {
1024
+ source: string
1025
+ type: string
1026
+ column?: ViewColumn<D>
1027
+ $rowIndex: number
1028
+ }
1029
+ export interface TaskBarContextmenuParams<D = any> {
1030
+ source: string
1031
+ type: string
1032
+ row: D
1033
+ rowIndex: number
1034
+ $rowIndex: number
1035
+ _rowIndex: number
1036
+ }
1037
+
1038
+ export interface TaskViewCellClickEventParams<D = any> extends GanttEventParams<D> {
1039
+ row: D
1040
+ column: ViewColumn<D>
1041
+ }
1042
+ export interface TaskViewCellDblclickEventParams<D = any> extends TaskViewCellClickEventParams<D> {}
1043
+
1044
+ export interface TaskMoveStartEventParams<D = any> extends GanttEventParams<D> {
1045
+ $gantt: VxeGanttConstructor<D>
1046
+ row: D
1047
+ startDate: Date
1048
+ endDate: Date
1049
+ }
1050
+ export interface TaskMoveDragEventParams<D = any> extends TaskMoveStartEventParams<D> {}
1051
+ export interface TaskMoveEndEventParams<D = any> extends TaskMoveStartEventParams<D> {
1052
+ targetStartDate: Date
1053
+ targetEndDate: Date
1054
+ }
1055
+ export interface TaskResizeStartEventParams<D = any> extends GanttEventParams<D> {
1056
+ $gantt: VxeGanttConstructor<D>
1057
+ resizeType: 'start' | 'end'
1058
+ row: D
1059
+ startDate: Date
1060
+ endDate: Date
1061
+ }
1062
+ export interface TaskResizeDragEventParams<D = any> extends TaskResizeStartEventParams<D> {}
1063
+ export interface TaskResizeEndEventParams<D = any> extends TaskResizeStartEventParams<D> {
1064
+ targetStartDate: Date
1065
+ targetEndDate: Date
1066
+ }
1067
+
1068
+ export interface TaskLinkClickEventParams<D = any> extends GanttEventParams<D> {
1069
+ linkItem: VxeGanttDefines.LinkConfObj
1070
+ fromRow: D
1071
+ toRow: D
1072
+ }
1073
+ export interface TaskLinkDblclickEventParams<D = any> extends TaskLinkClickEventParams<D> {}
1074
+ export interface TaskLinkRemoveEventParams<D = any> extends TaskLinkClickEventParams<D> {}
1075
+ }
1076
+
1077
+ export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
1078
+ onTaskCellClick?: VxeGanttEvents.TaskCellClick<D>
1079
+ onTaskCellDblclick?: VxeGanttEvents.TaskCellDblclick<D>
1080
+ onTaskBarClick?: VxeGanttEvents.TaskBarClick<D>
1081
+ onTaskBarDblclick?: VxeGanttEvents.TaskBarDblclick<D>
1082
+ onTaskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
1083
+ onTaskViewCellDblclick?: VxeGanttEvents.TaskViewCellDblclick<D>
1084
+ onTaskMoveStart?: VxeGanttEvents.TaskMoveStart<D>
1085
+ onTaskMoveDrag?: VxeGanttEvents.TaskMoveDrag<D>
1086
+ onTaskMoveEnd?: VxeGanttEvents.TaskMoveEnd<D>
1087
+ onTaskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
1088
+ onTaskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
1089
+ onTaskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
1090
+ onTaskLinkClick?: VxeGanttEvents.TaskLinkRemove<D>
1091
+ onTaskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
1092
+ onTaskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
1093
+ }
1094
+
1095
+ export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
1096
+ taskCellClick?: VxeGanttEvents.TaskCellClick<D>
1097
+ taskCellDblclick?: VxeGanttEvents.TaskCellDblclick<D>
1098
+ taskBarClick?: VxeGanttEvents.TaskBarClick<D>
1099
+ taskBarDblclick?: VxeGanttEvents.TaskBarDblclick<D>
1100
+ taskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
1101
+ taskViewCellDblclick?: VxeGanttEvents.TaskViewCellDblclick<D>
1102
+ taskMoveStart?: VxeGanttEvents.TaskMoveStart<D>
1103
+ taskMoveDrag?: VxeGanttEvents.TaskMoveDrag<D>
1104
+ taskMoveEnd?: VxeGanttEvents.TaskMoveEnd<D>
1105
+ taskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
1106
+ taskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
1107
+ taskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
1108
+ taskLinkClick?: VxeGanttEvents.TaskLinkClick<D>
1109
+ taskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
1110
+ taskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
1111
+ }
1112
+
1113
+ export namespace VxeGanttEvents {
1114
+ export type TaskCellClick<D = any> = (params: VxeGanttDefines.TaskCellClickEventParams<D>) => void
1115
+ export type TaskCellDblclick<D = any> = (params: VxeGanttDefines.TaskCellDblclickEventParams<D>) => void
1116
+ export type TaskBarClick<D = any> = (params: VxeGanttDefines.TaskBarClickEventParams<D>) => void
1117
+ export type TaskBarDblclick<D = any> = (params: VxeGanttDefines.TaskBarDblclickEventParams<D>) => void
1118
+ export type TaskViewCellClick<D = any> = (params: VxeGanttDefines.TaskViewCellClickEventParams<D>) => void
1119
+ export type TaskViewCellDblclick<D = any> = (params: VxeGanttDefines.TaskViewCellDblclickEventParams<D>) => void
1120
+ export type TaskMoveStart<D = any> = (params: VxeGanttDefines.TaskMoveStartEventParams<D>) => void
1121
+ export type TaskMoveDrag<D = any> = (params: VxeGanttDefines.TaskMoveDragEventParams<D>) => void
1122
+ export type TaskMoveEnd<D = any> = (params: VxeGanttDefines.TaskMoveEndEventParams<D>) => void
1123
+ export type TaskResizeStart<D = any> = (params: VxeGanttDefines.TaskResizeStartEventParams<D>) => void
1124
+ export type TaskResizeDrag<D = any> = (params: VxeGanttDefines.TaskResizeDragEventParams<D>) => void
1125
+ export type TaskResizeEnd<D = any> = (params: VxeGanttDefines.TaskResizeEndEventParams<D>) => void
1126
+ export type TaskLinkClick<D = any> = (params: VxeGanttDefines.TaskLinkClickEventParams<D>) => void
1127
+ export type TaskLinkDblclick<D = any> = (params: VxeGanttDefines.TaskLinkDblclickEventParams<D>) => void
1128
+ export type TaskLinkRemove<D = any> = (params: VxeGanttDefines.TaskLinkRemoveEventParams<D>) => void
1129
+ }
1130
+
1131
+ export namespace VxeGanttSlotTypes {
1132
+ export interface DefaultSlotParams<D = any> {
1133
+ $gantt: VxeGanttConstructor<D>
1134
+ }
1135
+
1136
+ export interface TaskBarSlotParams<D = any> {
1137
+ row: D
1138
+ }
1139
+
1140
+ export interface TaskBarOverviewSlotParams<D = any> {
1141
+ row: D
1142
+ }
1143
+
1144
+ export interface TaskViewCellTitleSlotParams {
1145
+ title: string | number
1146
+ dateObj: VxeGanttDefines.ScaleDateObj
1147
+ scaleObj: VxeGanttDefines.ColumnScaleObj
1148
+ $rowIndex: number
1149
+ }
1150
+ export interface TaskViewHeaderCellStyleSlotParams extends TaskViewCellTitleSlotParams {}
1151
+
1152
+ export interface TaskViewCellStyleSlotParams<D = any> {
1153
+ source: string
1154
+ type: string
1155
+ row?: D
1156
+ rowIndex: number
1157
+ $rowIndex: number
1158
+ _rowIndex: number
1159
+ column?: VxeGanttDefines.ViewColumn<D>
1160
+ }
1161
+
1162
+ export interface TaskBarTooltipSlotParams<D = any> {
1163
+ row: D
1164
+ rowIndex: number
1165
+ $rowIndex: number
1166
+ _rowIndex: number
1167
+ tooltipContent: string
1168
+ }
1169
+
1170
+ export interface TaskTaskNowLineSlotParams {
1171
+ }
1172
+ }
1173
+
1174
+ export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
1175
+ /**
1176
+ * 自定义任务条模板
1177
+ */
1178
+ taskBar?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
1179
+ 'task-bar'?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
1180
+ /**
1181
+ * 自定义任务总览模板
1182
+ */
1183
+ taskBarOverview?(params: VxeGanttSlotTypes.TaskBarOverviewSlotParams<D>): any
1184
+ 'task-bar-overview'?(params: VxeGanttSlotTypes.TaskBarOverviewSlotParams<D>): any
1185
+ /**
1186
+ * 自定义任务条提示模板
1187
+ */
1188
+ taskBarTooltip?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
1189
+ 'task-bar-tooltip'?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
1190
+ /**
1191
+ * 自定义任务此刻线模板
1192
+ */
1193
+ taskNowLine?(params: VxeGanttSlotTypes.TaskTaskNowLineSlotParams): any
1194
+ 'task-now-line'?(params: VxeGanttSlotTypes.TaskTaskNowLineSlotParams): any
1195
+ }
1196
+
1197
+ export * from './gantt-module'
1198
+ export * from './gantt-plugins'
1199
+
1200
+ export const Gantt: typeof VxeGantt
1201
+ export default VxeGantt