vxe-pc-ui 3.14.6 → 3.14.8

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 (605) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +134 -134
  3. package/es/checkbox/src/button.js +25 -4
  4. package/es/checkbox/src/checkbox.js +25 -4
  5. package/es/checkbox/src/group.js +25 -3
  6. package/es/checkbox/style.css +6 -3
  7. package/es/checkbox/style.min.css +1 -1
  8. package/es/language/ar-EG.js +4 -0
  9. package/es/language/de-DE.js +4 -0
  10. package/es/language/en-US.js +4 -0
  11. package/es/language/es-ES.js +4 -0
  12. package/es/language/fr-FR.js +4 -0
  13. package/es/language/hu-HU.js +4 -0
  14. package/es/language/hy-AM.js +4 -0
  15. package/es/language/id-ID.js +4 -0
  16. package/es/language/it-IT.js +4 -0
  17. package/es/language/ja-JP.js +4 -0
  18. package/es/language/ko-KR.js +4 -0
  19. package/es/language/ms-MY.js +4 -0
  20. package/es/language/nb-NO.js +4 -0
  21. package/es/language/pt-BR.js +4 -0
  22. package/es/language/ru-RU.js +4 -0
  23. package/es/language/th-TH.js +4 -0
  24. package/es/language/ug-CN.js +4 -0
  25. package/es/language/uk-UA.js +4 -0
  26. package/es/language/uz-UZ.js +4 -0
  27. package/es/language/vi-VN.js +4 -0
  28. package/es/language/zh-CHT.js +4 -0
  29. package/es/language/zh-CN.js +4 -0
  30. package/es/radio/src/button.js +26 -5
  31. package/es/radio/src/group.js +19 -2
  32. package/es/radio/src/radio.js +26 -5
  33. package/es/radio/style.css +5 -3
  34. package/es/radio/style.min.css +1 -1
  35. package/es/style.css +1 -1
  36. package/es/style.min.css +1 -1
  37. package/es/switch/src/switch.js +19 -11
  38. package/es/tree/style.css +11 -6
  39. package/es/tree/style.min.css +1 -1
  40. package/es/ui/index.js +1 -1
  41. package/es/ui/src/log.js +1 -1
  42. package/es/vxe-checkbox/style.css +6 -3
  43. package/es/vxe-checkbox/style.min.css +1 -1
  44. package/es/vxe-radio/style.css +5 -3
  45. package/es/vxe-radio/style.min.css +1 -1
  46. package/es/vxe-tree/style.css +11 -6
  47. package/es/vxe-tree/style.min.css +1 -1
  48. package/lib/checkbox/src/button.js +20 -3
  49. package/lib/checkbox/src/button.min.js +1 -1
  50. package/lib/checkbox/src/checkbox.js +20 -3
  51. package/lib/checkbox/src/checkbox.min.js +1 -1
  52. package/lib/checkbox/src/group.js +24 -2
  53. package/lib/checkbox/src/group.min.js +1 -1
  54. package/lib/checkbox/style/style.css +6 -3
  55. package/lib/checkbox/style/style.min.css +1 -1
  56. package/lib/index.umd.js +8817 -8594
  57. package/lib/index.umd.min.js +1 -1
  58. package/lib/language/ar-EG.js +4 -0
  59. package/lib/language/ar-EG.min.js +1 -1
  60. package/lib/language/ar-EG.umd.js +4 -0
  61. package/lib/language/de-DE.js +4 -0
  62. package/lib/language/de-DE.min.js +1 -1
  63. package/lib/language/de-DE.umd.js +4 -0
  64. package/lib/language/en-US.js +4 -0
  65. package/lib/language/en-US.min.js +1 -1
  66. package/lib/language/en-US.umd.js +4 -0
  67. package/lib/language/es-ES.js +4 -0
  68. package/lib/language/es-ES.min.js +1 -1
  69. package/lib/language/es-ES.umd.js +4 -0
  70. package/lib/language/fr-FR.js +4 -0
  71. package/lib/language/fr-FR.min.js +1 -1
  72. package/lib/language/fr-FR.umd.js +4 -0
  73. package/lib/language/hu-HU.js +4 -0
  74. package/lib/language/hu-HU.min.js +1 -1
  75. package/lib/language/hu-HU.umd.js +4 -0
  76. package/lib/language/hy-AM.js +4 -0
  77. package/lib/language/hy-AM.min.js +1 -1
  78. package/lib/language/hy-AM.umd.js +4 -0
  79. package/lib/language/id-ID.js +4 -0
  80. package/lib/language/id-ID.min.js +1 -1
  81. package/lib/language/id-ID.umd.js +4 -0
  82. package/lib/language/it-IT.js +4 -0
  83. package/lib/language/it-IT.min.js +1 -1
  84. package/lib/language/it-IT.umd.js +4 -0
  85. package/lib/language/ja-JP.js +4 -0
  86. package/lib/language/ja-JP.min.js +1 -1
  87. package/lib/language/ja-JP.umd.js +4 -0
  88. package/lib/language/ko-KR.js +4 -0
  89. package/lib/language/ko-KR.min.js +1 -1
  90. package/lib/language/ko-KR.umd.js +4 -0
  91. package/lib/language/ms-MY.js +4 -0
  92. package/lib/language/ms-MY.min.js +1 -1
  93. package/lib/language/ms-MY.umd.js +4 -0
  94. package/lib/language/nb-NO.js +4 -0
  95. package/lib/language/nb-NO.min.js +1 -1
  96. package/lib/language/nb-NO.umd.js +4 -0
  97. package/lib/language/pt-BR.js +4 -0
  98. package/lib/language/pt-BR.min.js +1 -1
  99. package/lib/language/pt-BR.umd.js +4 -0
  100. package/lib/language/ru-RU.js +4 -0
  101. package/lib/language/ru-RU.min.js +1 -1
  102. package/lib/language/ru-RU.umd.js +4 -0
  103. package/lib/language/th-TH.js +4 -0
  104. package/lib/language/th-TH.min.js +1 -1
  105. package/lib/language/th-TH.umd.js +4 -0
  106. package/lib/language/ug-CN.js +4 -0
  107. package/lib/language/ug-CN.min.js +1 -1
  108. package/lib/language/ug-CN.umd.js +4 -0
  109. package/lib/language/uk-UA.js +4 -0
  110. package/lib/language/uk-UA.min.js +1 -1
  111. package/lib/language/uk-UA.umd.js +4 -0
  112. package/lib/language/uz-UZ.js +4 -0
  113. package/lib/language/uz-UZ.min.js +1 -1
  114. package/lib/language/uz-UZ.umd.js +4 -0
  115. package/lib/language/vi-VN.js +4 -0
  116. package/lib/language/vi-VN.min.js +1 -1
  117. package/lib/language/vi-VN.umd.js +4 -0
  118. package/lib/language/zh-CHT.js +4 -0
  119. package/lib/language/zh-CHT.min.js +1 -1
  120. package/lib/language/zh-CHT.umd.js +4 -0
  121. package/lib/language/zh-CN.js +4 -0
  122. package/lib/language/zh-CN.min.js +1 -1
  123. package/lib/language/zh-CN.umd.js +4 -0
  124. package/lib/radio/src/button.js +20 -3
  125. package/lib/radio/src/button.min.js +1 -1
  126. package/lib/radio/src/group.js +18 -1
  127. package/lib/radio/src/group.min.js +1 -1
  128. package/lib/radio/src/radio.js +20 -3
  129. package/lib/radio/src/radio.min.js +1 -1
  130. package/lib/radio/style/style.css +5 -3
  131. package/lib/radio/style/style.min.css +1 -1
  132. package/lib/style.css +1 -1
  133. package/lib/style.min.css +1 -1
  134. package/lib/switch/src/switch.js +15 -10
  135. package/lib/switch/src/switch.min.js +1 -1
  136. package/lib/tree/style/style.css +11 -6
  137. package/lib/tree/style/style.min.css +1 -1
  138. package/lib/ui/index.js +1 -1
  139. package/lib/ui/index.min.js +1 -1
  140. package/lib/ui/src/log.js +1 -1
  141. package/lib/ui/src/log.min.js +1 -1
  142. package/lib/vxe-checkbox/style/style.css +6 -3
  143. package/lib/vxe-checkbox/style/style.min.css +1 -1
  144. package/lib/vxe-radio/style/style.css +5 -3
  145. package/lib/vxe-radio/style/style.min.css +1 -1
  146. package/lib/vxe-tree/style/style.css +11 -6
  147. package/lib/vxe-tree/style/style.min.css +1 -1
  148. package/package.json +89 -89
  149. package/packages/alert/index.ts +16 -16
  150. package/packages/alert/src/alert.ts +106 -106
  151. package/packages/anchor/index.ts +16 -16
  152. package/packages/anchor/src/anchor-link.ts +158 -158
  153. package/packages/anchor/src/anchor.ts +267 -267
  154. package/packages/anchor/src/util.ts +23 -23
  155. package/packages/anchor-link/index.ts +16 -16
  156. package/packages/avatar/index.ts +16 -16
  157. package/packages/avatar/src/avatar.ts +141 -141
  158. package/packages/backtop/index.ts +16 -16
  159. package/packages/backtop/src/backtop.ts +330 -330
  160. package/packages/badge/index.ts +16 -16
  161. package/packages/badge/src/badge.ts +87 -87
  162. package/packages/breadcrumb/index.ts +16 -16
  163. package/packages/breadcrumb/src/breadcrumb-item.ts +118 -118
  164. package/packages/breadcrumb/src/breadcrumb.ts +89 -89
  165. package/packages/breadcrumb-item/index.ts +16 -16
  166. package/packages/button/index.ts +16 -16
  167. package/packages/button/src/button-group.ts +113 -113
  168. package/packages/button/src/button.ts +956 -956
  169. package/packages/button-group/index.ts +16 -16
  170. package/packages/calendar/index.ts +16 -16
  171. package/packages/calendar/src/calendar.ts +1527 -1527
  172. package/packages/card/index.ts +16 -16
  173. package/packages/card/src/card.ts +162 -162
  174. package/packages/carousel/index.ts +16 -16
  175. package/packages/carousel/src/carousel-item.ts +117 -117
  176. package/packages/carousel/src/carousel.ts +460 -460
  177. package/packages/carousel/src/util.ts +21 -21
  178. package/packages/carousel-item/index.ts +16 -16
  179. package/packages/cascader/index.ts +16 -16
  180. package/packages/cascader/src/cascader.ts +943 -943
  181. package/packages/checkbox/index.ts +16 -16
  182. package/packages/checkbox/src/button.ts +206 -185
  183. package/packages/checkbox/src/checkbox.ts +211 -189
  184. package/packages/checkbox/src/group.ts +282 -259
  185. package/packages/checkbox-button/index.ts +16 -16
  186. package/packages/checkbox-group/index.ts +16 -16
  187. package/packages/col/index.ts +16 -16
  188. package/packages/collapse/index.ts +16 -16
  189. package/packages/collapse/src/collapse-pane.ts +136 -136
  190. package/packages/collapse/src/collapse.ts +259 -259
  191. package/packages/collapse/src/util.ts +21 -21
  192. package/packages/collapse-pane/index.ts +16 -16
  193. package/packages/color-picker/index.ts +16 -16
  194. package/packages/color-picker/src/color-picker.ts +1286 -1286
  195. package/packages/color-picker/src/util.ts +198 -198
  196. package/packages/components.ts +307 -307
  197. package/packages/context-menu/index.ts +54 -54
  198. package/packages/context-menu/src/context-menu.ts +727 -727
  199. package/packages/countdown/index.ts +16 -16
  200. package/packages/countdown/src/countdown.ts +276 -276
  201. package/packages/date-panel/index.ts +16 -16
  202. package/packages/date-panel/src/date-panel.ts +2024 -2024
  203. package/packages/date-panel/src/util.ts +244 -244
  204. package/packages/date-picker/index.ts +17 -17
  205. package/packages/date-picker/src/date-picker.ts +1249 -1249
  206. package/packages/date-range-picker/index.ts +16 -16
  207. package/packages/date-range-picker/src/date-range-picker.ts +1480 -1480
  208. package/packages/drawer/index.ts +87 -87
  209. package/packages/drawer/src/drawer.ts +767 -767
  210. package/packages/dynamics/index.ts +127 -127
  211. package/packages/empty/index.ts +16 -16
  212. package/packages/empty/src/empty.ts +80 -80
  213. package/packages/form/index.ts +16 -16
  214. package/packages/form/render/index.ts +617 -617
  215. package/packages/form/src/form-config-item.ts +84 -84
  216. package/packages/form/src/form-group.ts +125 -125
  217. package/packages/form/src/form-item.ts +217 -217
  218. package/packages/form/src/form.ts +1032 -1032
  219. package/packages/form/src/itemInfo.ts +80 -80
  220. package/packages/form/src/render.ts +398 -398
  221. package/packages/form/src/util.ts +92 -92
  222. package/packages/form-gather/index.ts +18 -18
  223. package/packages/form-group/index.ts +16 -16
  224. package/packages/form-item/index.ts +16 -16
  225. package/packages/icon/index.ts +16 -16
  226. package/packages/icon/src/icon.ts +75 -75
  227. package/packages/icon-picker/index.ts +16 -16
  228. package/packages/icon-picker/src/icon-picker.ts +753 -753
  229. package/packages/image/index.ts +16 -16
  230. package/packages/image/src/group.ts +162 -162
  231. package/packages/image/src/image.ts +303 -303
  232. package/packages/image/src/preview.ts +737 -737
  233. package/packages/image/src/util.ts +62 -62
  234. package/packages/image-group/index.ts +16 -16
  235. package/packages/image-preview/index.ts +19 -19
  236. package/packages/index.ts +8 -8
  237. package/packages/input/index.ts +16 -16
  238. package/packages/input/src/input.ts +3187 -3187
  239. package/packages/language/ar-EG.ts +844 -840
  240. package/packages/language/de-DE.ts +844 -840
  241. package/packages/language/en-US.ts +844 -840
  242. package/packages/language/es-ES.ts +844 -840
  243. package/packages/language/fr-FR.ts +844 -840
  244. package/packages/language/hu-HU.ts +844 -840
  245. package/packages/language/hy-AM.ts +844 -840
  246. package/packages/language/id-ID.ts +844 -840
  247. package/packages/language/it-IT.ts +844 -840
  248. package/packages/language/ja-JP.ts +844 -840
  249. package/packages/language/ko-KR.ts +844 -840
  250. package/packages/language/ms-MY.ts +844 -840
  251. package/packages/language/nb-NO.ts +844 -840
  252. package/packages/language/pt-BR.ts +844 -840
  253. package/packages/language/ru-RU.ts +844 -840
  254. package/packages/language/th-TH.ts +844 -840
  255. package/packages/language/ug-CN.ts +844 -840
  256. package/packages/language/uk-UA.ts +844 -840
  257. package/packages/language/uz-UZ.ts +844 -840
  258. package/packages/language/vi-VN.ts +844 -840
  259. package/packages/language/zh-CHT.ts +844 -840
  260. package/packages/language/zh-CN.ts +844 -840
  261. package/packages/language/zh-HK.ts +3 -3
  262. package/packages/language/zh-MO.ts +3 -3
  263. package/packages/language/zh-TC.ts +3 -3
  264. package/packages/language/zh-TW.ts +3 -3
  265. package/packages/layout-aside/index.ts +16 -16
  266. package/packages/layout-aside/src/layout-aside.ts +115 -115
  267. package/packages/layout-body/index.ts +16 -16
  268. package/packages/layout-body/src/layout-body.ts +137 -137
  269. package/packages/layout-container/index.ts +16 -16
  270. package/packages/layout-container/src/layout-container.ts +65 -65
  271. package/packages/layout-footer/index.ts +16 -16
  272. package/packages/layout-footer/src/layout-footer.ts +53 -53
  273. package/packages/layout-header/index.ts +16 -16
  274. package/packages/layout-header/src/layout-header.ts +49 -49
  275. package/packages/link/index.ts +16 -16
  276. package/packages/link/src/link.ts +153 -153
  277. package/packages/list/index.ts +16 -16
  278. package/packages/list/src/list.ts +492 -492
  279. package/packages/loading/index.ts +34 -34
  280. package/packages/loading/src/loading.ts +162 -162
  281. package/packages/mention/index.ts +16 -16
  282. package/packages/mention/src/mention.ts +54 -54
  283. package/packages/menu/index.ts +16 -16
  284. package/packages/menu/src/menu.ts +632 -632
  285. package/packages/modal/index.ts +150 -150
  286. package/packages/modal/src/modal.ts +1668 -1668
  287. package/packages/notice-bar/index.ts +16 -16
  288. package/packages/notice-bar/src/notice-bar.ts +182 -182
  289. package/packages/number-input/index.ts +16 -16
  290. package/packages/number-input/src/number-input.ts +1255 -1255
  291. package/packages/number-input/src/util.ts +12 -12
  292. package/packages/optgroup/index.ts +16 -16
  293. package/packages/option/index.ts +16 -16
  294. package/packages/pager/index.ts +16 -16
  295. package/packages/pager/src/pager.ts +913 -913
  296. package/packages/password-input/index.ts +16 -16
  297. package/packages/password-input/src/password-input.ts +466 -466
  298. package/packages/print/index.ts +18 -18
  299. package/packages/print/src/page-break.ts +78 -78
  300. package/packages/print/src/print.ts +266 -266
  301. package/packages/print/src/util.ts +284 -284
  302. package/packages/print-page-break/index.ts +14 -14
  303. package/packages/pulldown/index.ts +16 -16
  304. package/packages/pulldown/src/pulldown.ts +533 -533
  305. package/packages/radio/index.ts +16 -16
  306. package/packages/radio/src/button.ts +242 -221
  307. package/packages/radio/src/group.ts +270 -252
  308. package/packages/radio/src/radio.ts +249 -228
  309. package/packages/radio-button/index.ts +16 -16
  310. package/packages/radio-group/index.ts +16 -16
  311. package/packages/rate/index.ts +16 -16
  312. package/packages/rate/src/rate.ts +199 -199
  313. package/packages/result/index.ts +16 -16
  314. package/packages/result/src/result.ts +93 -93
  315. package/packages/row/index.ts +16 -16
  316. package/packages/row/src/col.ts +130 -130
  317. package/packages/row/src/row.ts +106 -106
  318. package/packages/segmented/index.ts +16 -16
  319. package/packages/segmented/src/segmented.ts +281 -281
  320. package/packages/select/index.ts +16 -16
  321. package/packages/select/src/optgroup.ts +107 -107
  322. package/packages/select/src/option-info.ts +20 -20
  323. package/packages/select/src/option.ts +103 -103
  324. package/packages/select/src/select.ts +2001 -2001
  325. package/packages/select/src/util.ts +47 -47
  326. package/packages/slider/index.ts +16 -16
  327. package/packages/slider/src/slider.ts +332 -332
  328. package/packages/split/index.ts +16 -16
  329. package/packages/split-pane/index.ts +17 -17
  330. package/packages/splitter/index.ts +16 -16
  331. package/packages/splitter/src/splitter-panel.ts +171 -171
  332. package/packages/splitter/src/splitter.ts +1032 -1032
  333. package/packages/splitter/src/util.ts +21 -21
  334. package/packages/splitter-panel/index.ts +16 -16
  335. package/packages/steps/index.ts +16 -16
  336. package/packages/steps/src/steps.ts +57 -57
  337. package/packages/switch/index.ts +16 -16
  338. package/packages/switch/src/switch.ts +287 -279
  339. package/packages/tab-pane/index.ts +16 -16
  340. package/packages/table-select/index.ts +16 -16
  341. package/packages/table-select/src/table-select.ts +904 -904
  342. package/packages/tabs/index.ts +16 -16
  343. package/packages/tabs/src/tab-pane.ts +137 -137
  344. package/packages/tabs/src/tabs.ts +1014 -1014
  345. package/packages/tabs/src/util.ts +21 -21
  346. package/packages/tag/index.ts +16 -16
  347. package/packages/tag/src/tag.ts +195 -195
  348. package/packages/text/index.ts +16 -16
  349. package/packages/text/src/text.ts +267 -267
  350. package/packages/text-ellipsis/index.ts +16 -16
  351. package/packages/text-ellipsis/src/text-ellipsis.ts +291 -291
  352. package/packages/textarea/index.ts +16 -16
  353. package/packages/textarea/src/textarea.ts +436 -436
  354. package/packages/timeline/index.ts +16 -16
  355. package/packages/timeline/src/timeline-item.ts +41 -41
  356. package/packages/timeline/src/timeline.ts +54 -54
  357. package/packages/timeline-item/index.ts +16 -16
  358. package/packages/tip/index.ts +19 -19
  359. package/packages/tip/src/tip.ts +112 -112
  360. package/packages/tooltip/index.ts +16 -16
  361. package/packages/tooltip/src/tooltip.ts +669 -669
  362. package/packages/tour/index.ts +16 -16
  363. package/packages/tour/src/tour.ts +54 -54
  364. package/packages/tree/index.ts +16 -16
  365. package/packages/tree/src/store.ts +15 -15
  366. package/packages/tree/src/tree.ts +3122 -3122
  367. package/packages/tree/src/util.ts +44 -44
  368. package/packages/tree-select/index.ts +16 -16
  369. package/packages/tree-select/src/tree-select.ts +1118 -1118
  370. package/packages/ui/index.ts +697 -697
  371. package/packages/ui/src/anime.ts +52 -52
  372. package/packages/ui/src/comp.ts +3 -3
  373. package/packages/ui/src/dom.ts +279 -279
  374. package/packages/ui/src/log.ts +6 -6
  375. package/packages/ui/src/utils.ts +49 -49
  376. package/packages/ui/src/vn.ts +60 -60
  377. package/packages/upload/index.ts +20 -20
  378. package/packages/upload/src/upload.ts +2129 -2129
  379. package/packages/upload/src/util.ts +109 -109
  380. package/packages/vxe-u-i/index.ts +4 -4
  381. package/packages/watermark/index.ts +31 -31
  382. package/packages/watermark/src/util.ts +176 -176
  383. package/packages/watermark/src/watermark.ts +166 -166
  384. package/styles/all.scss +90 -90
  385. package/styles/base.scss +16 -16
  386. package/styles/components/alert.scss +101 -101
  387. package/styles/components/anchor.scss +44 -44
  388. package/styles/components/avatar.scss +115 -115
  389. package/styles/components/backtop.scss +82 -82
  390. package/styles/components/badge.scss +45 -45
  391. package/styles/components/breadcrumb.scss +29 -29
  392. package/styles/components/button-group.scss +30 -30
  393. package/styles/components/button.scss +415 -415
  394. package/styles/components/calendar.scss +471 -471
  395. package/styles/components/card.scss +121 -121
  396. package/styles/components/carousel.scss +184 -184
  397. package/styles/components/cascader.scss +140 -140
  398. package/styles/components/checkbox-button.scss +57 -57
  399. package/styles/components/checkbox.scss +81 -81
  400. package/styles/components/collapse.scss +56 -56
  401. package/styles/components/color-picker.scss +409 -409
  402. package/styles/components/context-menu.scss +102 -102
  403. package/styles/components/countdown.scss +35 -35
  404. package/styles/components/date-panel.scss +505 -505
  405. package/styles/components/date-picker.scss +247 -247
  406. package/styles/components/date-range-picker.scss +252 -252
  407. package/styles/components/drawer.scss +298 -298
  408. package/styles/components/empty.scss +79 -79
  409. package/styles/components/form.scss +668 -668
  410. package/styles/components/icon-picker.scss +211 -211
  411. package/styles/components/icon.scss +1048 -1048
  412. package/styles/components/image-group.scss +2 -2
  413. package/styles/components/image-preview.scss +215 -215
  414. package/styles/components/image.scss +16 -16
  415. package/styles/components/input.scss +846 -846
  416. package/styles/components/layout-aside.scss +22 -22
  417. package/styles/components/layout-body.scss +14 -14
  418. package/styles/components/layout-container.scss +13 -13
  419. package/styles/components/layout-footer.scss +14 -14
  420. package/styles/components/layout-header.scss +11 -11
  421. package/styles/components/link.scss +115 -115
  422. package/styles/components/list.scss +40 -40
  423. package/styles/components/loading.scss +137 -137
  424. package/styles/components/menu.scss +150 -150
  425. package/styles/components/modal.scss +480 -480
  426. package/styles/components/notice-bar.scss +91 -91
  427. package/styles/components/number-input.scss +283 -283
  428. package/styles/components/old-icon.scss +4 -4
  429. package/styles/components/pager.scss +282 -282
  430. package/styles/components/password-input.scss +374 -374
  431. package/styles/components/print.scss +3 -3
  432. package/styles/components/pulldown.scss +75 -75
  433. package/styles/components/radio-button.scss +57 -57
  434. package/styles/components/radio.scss +79 -79
  435. package/styles/components/rate.scss +76 -76
  436. package/styles/components/result.scss +91 -91
  437. package/styles/components/row.scss +69 -69
  438. package/styles/components/segmented.scss +215 -215
  439. package/styles/components/select.scss +244 -244
  440. package/styles/components/slider.scss +139 -139
  441. package/styles/components/split.scss +1 -1
  442. package/styles/components/splitter.scss +318 -318
  443. package/styles/components/switch.scss +128 -128
  444. package/styles/components/table-select.scss +105 -105
  445. package/styles/components/tabs.scss +745 -745
  446. package/styles/components/tag.scss +184 -184
  447. package/styles/components/text-ellipsis.scss +130 -130
  448. package/styles/components/text.scss +123 -123
  449. package/styles/components/textarea.scss +106 -106
  450. package/styles/components/tip.scss +97 -97
  451. package/styles/components/tooltip.scss +141 -141
  452. package/styles/components/tree-select.scss +166 -166
  453. package/styles/components/tree.scss +294 -294
  454. package/styles/components/upload.scss +497 -497
  455. package/styles/components/watermark.scss +26 -26
  456. package/styles/helpers/baseMixin.scss +104 -95
  457. package/styles/helpers/baseVar.scss +3 -3
  458. package/styles/helpers/placement.scss +38 -38
  459. package/styles/theme/base.scss +214 -214
  460. package/styles/theme/dark.scss +119 -119
  461. package/styles/theme/light.scss +118 -118
  462. package/styles/variable.scss +111 -111
  463. package/types/all.d.ts +328 -328
  464. package/types/components/alert.d.ts +80 -80
  465. package/types/components/anchor-link.d.ts +84 -84
  466. package/types/components/anchor.d.ts +84 -84
  467. package/types/components/avatar.d.ts +81 -81
  468. package/types/components/backtop.d.ts +115 -115
  469. package/types/components/badge.d.ts +69 -69
  470. package/types/components/breadcrumb-item.d.ts +73 -73
  471. package/types/components/breadcrumb.d.ts +80 -80
  472. package/types/components/button-group.d.ts +113 -113
  473. package/types/components/button.d.ts +314 -314
  474. package/types/components/calendar.d.ts +254 -254
  475. package/types/components/card.d.ts +86 -86
  476. package/types/components/carousel-item.d.ts +68 -68
  477. package/types/components/carousel.d.ts +126 -126
  478. package/types/components/cascader.d.ts +250 -250
  479. package/types/components/checkbox-button.d.ts +93 -93
  480. package/types/components/checkbox-group.d.ts +138 -135
  481. package/types/components/checkbox.d.ts +115 -115
  482. package/types/components/col.d.ts +73 -73
  483. package/types/components/colgroup.d.ts +131 -131
  484. package/types/components/collapse-pane.d.ts +82 -82
  485. package/types/components/collapse.d.ts +115 -115
  486. package/types/components/color-picker.d.ts +164 -164
  487. package/types/components/column.d.ts +852 -852
  488. package/types/components/context-menu.d.ts +301 -301
  489. package/types/components/countdown.d.ts +99 -99
  490. package/types/components/date-panel.d.ts +269 -269
  491. package/types/components/date-picker.d.ts +322 -322
  492. package/types/components/date-range-picker.d.ts +336 -336
  493. package/types/components/drawer.d.ts +295 -295
  494. package/types/components/empty.d.ts +71 -71
  495. package/types/components/flow-design.d.ts +78 -78
  496. package/types/components/flow-view.d.ts +78 -78
  497. package/types/components/form-design.d.ts +364 -364
  498. package/types/components/form-gather.d.ts +72 -72
  499. package/types/components/form-group.d.ts +63 -63
  500. package/types/components/form-item.d.ts +405 -405
  501. package/types/components/form-view.d.ts +175 -175
  502. package/types/components/form.d.ts +463 -463
  503. package/types/components/gantt-module/gantt-view.d.ts +171 -171
  504. package/types/components/gantt-module/index.d.ts +1 -1
  505. package/types/components/gantt-plugins/extend-gantt-chart.d.ts +132 -132
  506. package/types/components/gantt-plugins/index.d.ts +1 -1
  507. package/types/components/gantt.d.ts +1201 -1201
  508. package/types/components/grid.d.ts +1038 -1038
  509. package/types/components/icon-picker.d.ts +185 -185
  510. package/types/components/icon.d.ts +80 -80
  511. package/types/components/image-group.d.ts +120 -120
  512. package/types/components/image-preview.d.ts +159 -159
  513. package/types/components/image.d.ts +166 -166
  514. package/types/components/input.d.ts +425 -425
  515. package/types/components/layout-aside.d.ts +73 -73
  516. package/types/components/layout-body.d.ts +84 -84
  517. package/types/components/layout-container.d.ts +66 -66
  518. package/types/components/layout-footer.d.ts +66 -66
  519. package/types/components/layout-header.d.ts +64 -64
  520. package/types/components/link.d.ts +104 -104
  521. package/types/components/list-design.d.ts +177 -177
  522. package/types/components/list-view.d.ts +190 -190
  523. package/types/components/list.d.ts +196 -196
  524. package/types/components/loading.d.ts +96 -96
  525. package/types/components/mention.d.ts +70 -70
  526. package/types/components/menu.d.ts +203 -203
  527. package/types/components/modal.d.ts +540 -540
  528. package/types/components/notice-bar.d.ts +95 -95
  529. package/types/components/number-input.d.ts +300 -300
  530. package/types/components/optgroup.d.ts +81 -81
  531. package/types/components/option.d.ts +95 -95
  532. package/types/components/pager.d.ts +322 -322
  533. package/types/components/password-input.d.ts +129 -129
  534. package/types/components/print-page-break.d.ts +62 -62
  535. package/types/components/print.d.ts +199 -199
  536. package/types/components/pulldown.d.ts +226 -226
  537. package/types/components/radio-button.d.ts +104 -104
  538. package/types/components/radio-group.d.ts +139 -136
  539. package/types/components/radio.d.ts +121 -121
  540. package/types/components/rate.d.ts +75 -75
  541. package/types/components/result.d.ts +77 -77
  542. package/types/components/row.d.ts +72 -72
  543. package/types/components/segmented.d.ts +117 -117
  544. package/types/components/select.d.ts +519 -519
  545. package/types/components/slider.d.ts +117 -117
  546. package/types/components/split-pane.d.ts +135 -135
  547. package/types/components/split.d.ts +318 -318
  548. package/types/components/splitter-panel.d.ts +98 -98
  549. package/types/components/splitter.d.ts +283 -283
  550. package/types/components/steps.d.ts +61 -61
  551. package/types/components/switch.d.ts +124 -124
  552. package/types/components/tab-pane.d.ts +107 -107
  553. package/types/components/table-module/custom.d.ts +115 -115
  554. package/types/components/table-module/edit.d.ts +245 -245
  555. package/types/components/table-module/export.d.ts +96 -96
  556. package/types/components/table-module/filter.d.ts +140 -140
  557. package/types/components/table-module/index.d.ts +7 -7
  558. package/types/components/table-module/keyboard.d.ts +26 -26
  559. package/types/components/table-module/menu.d.ts +26 -26
  560. package/types/components/table-module/validator.d.ts +53 -53
  561. package/types/components/table-plugins/extend-cell-area.d.ts +768 -768
  562. package/types/components/table-plugins/extend-pivot-table.d.ts +68 -68
  563. package/types/components/table-plugins/filters-combination.d.ts +15 -15
  564. package/types/components/table-plugins/filters-complex-input.d.ts +9 -9
  565. package/types/components/table-plugins/index.d.ts +4 -4
  566. package/types/components/table-select.d.ts +216 -216
  567. package/types/components/table.d.ts +7499 -7496
  568. package/types/components/tabs.d.ts +324 -324
  569. package/types/components/tag.d.ts +107 -107
  570. package/types/components/text-ellipsis.d.ts +105 -105
  571. package/types/components/text.d.ts +115 -115
  572. package/types/components/textarea.d.ts +237 -237
  573. package/types/components/timeline-item.d.ts +68 -68
  574. package/types/components/timeline.d.ts +70 -70
  575. package/types/components/tip.d.ts +76 -76
  576. package/types/components/toolbar.d.ts +329 -329
  577. package/types/components/tooltip.d.ts +169 -169
  578. package/types/components/tour.d.ts +70 -70
  579. package/types/components/tree-select.d.ts +299 -299
  580. package/types/components/tree.d.ts +836 -836
  581. package/types/components/upload.d.ts +432 -432
  582. package/types/components/watermark.d.ts +113 -113
  583. package/types/index.d.ts +4 -4
  584. package/types/ui/commands.d.ts +57 -57
  585. package/types/ui/formats.d.ts +62 -62
  586. package/types/ui/global-config.d.ts +254 -254
  587. package/types/ui/global-icon.d.ts +292 -292
  588. package/types/ui/hooks.d.ts +11 -11
  589. package/types/ui/index.d.ts +95 -95
  590. package/types/ui/interceptor.d.ts +54 -54
  591. package/types/ui/menus.d.ts +77 -77
  592. package/types/ui/renderer.d.ts +1042 -1042
  593. package/types/ui/validators.d.ts +38 -38
  594. /package/es/icon/{iconfont.1778317204332.ttf → iconfont.1778552562258.ttf} +0 -0
  595. /package/es/icon/{iconfont.1778317204332.woff → iconfont.1778552562258.woff} +0 -0
  596. /package/es/icon/{iconfont.1778317204332.woff2 → iconfont.1778552562258.woff2} +0 -0
  597. /package/es/{iconfont.1778317204332.ttf → iconfont.1778552562258.ttf} +0 -0
  598. /package/es/{iconfont.1778317204332.woff → iconfont.1778552562258.woff} +0 -0
  599. /package/es/{iconfont.1778317204332.woff2 → iconfont.1778552562258.woff2} +0 -0
  600. /package/lib/icon/style/{iconfont.1778317204332.ttf → iconfont.1778552562258.ttf} +0 -0
  601. /package/lib/icon/style/{iconfont.1778317204332.woff → iconfont.1778552562258.woff} +0 -0
  602. /package/lib/icon/style/{iconfont.1778317204332.woff2 → iconfont.1778552562258.woff2} +0 -0
  603. /package/lib/{iconfont.1778317204332.ttf → iconfont.1778552562258.ttf} +0 -0
  604. /package/lib/{iconfont.1778317204332.woff → iconfont.1778552562258.woff} +0 -0
  605. /package/lib/{iconfont.1778317204332.woff2 → iconfont.1778552562258.woff2} +0 -0
@@ -1,1201 +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
- 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
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