vxe-table 3.17.10 → 3.18.0-beta.1

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 (202) hide show
  1. package/es/grid/src/grid.js +4 -3
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/locale/lang/ar-EG.js +3 -1
  5. package/es/locale/lang/de-DE.js +3 -1
  6. package/es/locale/lang/en-US.js +3 -1
  7. package/es/locale/lang/es-ES.js +3 -1
  8. package/es/locale/lang/fr-FR.js +3 -1
  9. package/es/locale/lang/hu-HU.js +3 -1
  10. package/es/locale/lang/hy-AM.js +3 -1
  11. package/es/locale/lang/id-ID.js +3 -1
  12. package/es/locale/lang/it-IT.js +3 -1
  13. package/es/locale/lang/ja-JP.js +3 -1
  14. package/es/locale/lang/ko-KR.js +3 -1
  15. package/es/locale/lang/ms-MY.js +3 -1
  16. package/es/locale/lang/nb-NO.js +3 -1
  17. package/es/locale/lang/pt-BR.js +3 -1
  18. package/es/locale/lang/ru-RU.js +3 -1
  19. package/es/locale/lang/th-TH.js +3 -1
  20. package/es/locale/lang/ug-CN.js +3 -1
  21. package/es/locale/lang/uk-UA.js +3 -1
  22. package/es/locale/lang/uz-UZ.js +3 -1
  23. package/es/locale/lang/vi-VN.js +3 -1
  24. package/es/locale/lang/zh-CHT.js +3 -1
  25. package/es/locale/lang/zh-CN.js +3 -1
  26. package/es/style.css +1 -1
  27. package/es/style.min.css +1 -1
  28. package/es/table/module/custom/mixin.js +4 -2
  29. package/es/table/module/custom/panel.js +4 -0
  30. package/es/table/module/export/export-panel.js +3 -0
  31. package/es/table/module/export/import-panel.js +3 -0
  32. package/es/table/module/export/mixin.js +41 -22
  33. package/es/table/module/menu/mixin.js +5 -3
  34. package/es/table/src/body.js +6 -1
  35. package/es/table/src/column.js +2 -1
  36. package/es/table/src/columnInfo.js +6 -2
  37. package/es/table/src/footer.js +2 -0
  38. package/es/table/src/group.js +2 -1
  39. package/es/table/src/header.js +2 -0
  40. package/es/table/src/methods.js +84 -37
  41. package/es/table/src/table.js +10 -5
  42. package/es/table/style.css +3 -3
  43. package/es/table/style.min.css +1 -1
  44. package/es/ui/index.js +1 -1
  45. package/es/ui/src/log.js +1 -1
  46. package/es/vxe-table/style.css +3 -3
  47. package/es/vxe-table/style.min.css +1 -1
  48. package/lib/grid/src/grid.js +4 -3
  49. package/lib/grid/src/grid.min.js +1 -1
  50. package/lib/index.css +1 -1
  51. package/lib/index.min.css +1 -1
  52. package/lib/index.umd.js +213 -93
  53. package/lib/index.umd.min.js +1 -1
  54. package/lib/locale/lang/ar-EG.js +3 -1
  55. package/lib/locale/lang/ar-EG.min.js +1 -1
  56. package/lib/locale/lang/ar-EG.umd.js +3 -1
  57. package/lib/locale/lang/de-DE.js +3 -1
  58. package/lib/locale/lang/de-DE.min.js +1 -1
  59. package/lib/locale/lang/de-DE.umd.js +3 -1
  60. package/lib/locale/lang/en-US.js +3 -1
  61. package/lib/locale/lang/en-US.min.js +1 -1
  62. package/lib/locale/lang/en-US.umd.js +3 -1
  63. package/lib/locale/lang/es-ES.js +3 -1
  64. package/lib/locale/lang/es-ES.min.js +1 -1
  65. package/lib/locale/lang/es-ES.umd.js +3 -1
  66. package/lib/locale/lang/fr-FR.js +3 -1
  67. package/lib/locale/lang/fr-FR.min.js +1 -1
  68. package/lib/locale/lang/fr-FR.umd.js +3 -1
  69. package/lib/locale/lang/hu-HU.js +3 -1
  70. package/lib/locale/lang/hu-HU.min.js +1 -1
  71. package/lib/locale/lang/hu-HU.umd.js +3 -1
  72. package/lib/locale/lang/hy-AM.js +3 -1
  73. package/lib/locale/lang/hy-AM.min.js +1 -1
  74. package/lib/locale/lang/hy-AM.umd.js +3 -1
  75. package/lib/locale/lang/id-ID.js +3 -1
  76. package/lib/locale/lang/id-ID.min.js +1 -1
  77. package/lib/locale/lang/id-ID.umd.js +3 -1
  78. package/lib/locale/lang/it-IT.js +3 -1
  79. package/lib/locale/lang/it-IT.min.js +1 -1
  80. package/lib/locale/lang/it-IT.umd.js +3 -1
  81. package/lib/locale/lang/ja-JP.js +3 -1
  82. package/lib/locale/lang/ja-JP.min.js +1 -1
  83. package/lib/locale/lang/ja-JP.umd.js +3 -1
  84. package/lib/locale/lang/ko-KR.js +3 -1
  85. package/lib/locale/lang/ko-KR.min.js +1 -1
  86. package/lib/locale/lang/ko-KR.umd.js +3 -1
  87. package/lib/locale/lang/ms-MY.js +3 -1
  88. package/lib/locale/lang/ms-MY.min.js +1 -1
  89. package/lib/locale/lang/ms-MY.umd.js +3 -1
  90. package/lib/locale/lang/nb-NO.js +3 -1
  91. package/lib/locale/lang/nb-NO.min.js +1 -1
  92. package/lib/locale/lang/nb-NO.umd.js +3 -1
  93. package/lib/locale/lang/pt-BR.js +3 -1
  94. package/lib/locale/lang/pt-BR.min.js +1 -1
  95. package/lib/locale/lang/pt-BR.umd.js +3 -1
  96. package/lib/locale/lang/ru-RU.js +3 -1
  97. package/lib/locale/lang/ru-RU.min.js +1 -1
  98. package/lib/locale/lang/ru-RU.umd.js +3 -1
  99. package/lib/locale/lang/th-TH.js +3 -1
  100. package/lib/locale/lang/th-TH.min.js +1 -1
  101. package/lib/locale/lang/th-TH.umd.js +3 -1
  102. package/lib/locale/lang/ug-CN.js +3 -1
  103. package/lib/locale/lang/ug-CN.min.js +1 -1
  104. package/lib/locale/lang/ug-CN.umd.js +3 -1
  105. package/lib/locale/lang/uk-UA.js +3 -1
  106. package/lib/locale/lang/uk-UA.min.js +1 -1
  107. package/lib/locale/lang/uk-UA.umd.js +3 -1
  108. package/lib/locale/lang/uz-UZ.js +3 -1
  109. package/lib/locale/lang/uz-UZ.min.js +1 -1
  110. package/lib/locale/lang/uz-UZ.umd.js +3 -1
  111. package/lib/locale/lang/vi-VN.js +3 -1
  112. package/lib/locale/lang/vi-VN.min.js +1 -1
  113. package/lib/locale/lang/vi-VN.umd.js +3 -1
  114. package/lib/locale/lang/zh-CHT.js +3 -1
  115. package/lib/locale/lang/zh-CHT.min.js +1 -1
  116. package/lib/locale/lang/zh-CHT.umd.js +3 -1
  117. package/lib/locale/lang/zh-CN.js +3 -1
  118. package/lib/locale/lang/zh-CN.min.js +1 -1
  119. package/lib/locale/lang/zh-CN.umd.js +3 -1
  120. package/lib/style.css +1 -1
  121. package/lib/style.min.css +1 -1
  122. package/lib/table/module/custom/mixin.js +4 -2
  123. package/lib/table/module/custom/mixin.min.js +1 -1
  124. package/lib/table/module/custom/panel.js +4 -0
  125. package/lib/table/module/custom/panel.min.js +1 -1
  126. package/lib/table/module/export/export-panel.js +3 -0
  127. package/lib/table/module/export/export-panel.min.js +1 -1
  128. package/lib/table/module/export/import-panel.js +3 -0
  129. package/lib/table/module/export/import-panel.min.js +1 -1
  130. package/lib/table/module/export/mixin.js +49 -18
  131. package/lib/table/module/export/mixin.min.js +1 -1
  132. package/lib/table/module/menu/mixin.js +8 -3
  133. package/lib/table/module/menu/mixin.min.js +1 -1
  134. package/lib/table/src/body.js +7 -1
  135. package/lib/table/src/body.min.js +1 -1
  136. package/lib/table/src/column.js +2 -1
  137. package/lib/table/src/column.min.js +1 -1
  138. package/lib/table/src/columnInfo.js +11 -5
  139. package/lib/table/src/columnInfo.min.js +1 -1
  140. package/lib/table/src/footer.js +2 -0
  141. package/lib/table/src/footer.min.js +1 -1
  142. package/lib/table/src/group.js +2 -1
  143. package/lib/table/src/group.min.js +1 -1
  144. package/lib/table/src/header.js +2 -0
  145. package/lib/table/src/header.min.js +1 -1
  146. package/lib/table/src/methods.js +89 -47
  147. package/lib/table/src/methods.min.js +1 -1
  148. package/lib/table/src/table.js +12 -3
  149. package/lib/table/src/table.min.js +1 -1
  150. package/lib/table/style/style.css +3 -3
  151. package/lib/table/style/style.min.css +1 -1
  152. package/lib/ui/index.js +1 -1
  153. package/lib/ui/index.min.js +1 -1
  154. package/lib/ui/src/log.js +1 -1
  155. package/lib/ui/src/log.min.js +1 -1
  156. package/lib/vxe-table/style/style.css +3 -3
  157. package/lib/vxe-table/style/style.min.css +1 -1
  158. package/package.json +1 -1
  159. package/packages/grid/src/grid.ts +4 -3
  160. package/packages/locale/lang/ar-EG.ts +3 -1
  161. package/packages/locale/lang/de-DE.ts +3 -1
  162. package/packages/locale/lang/en-US.ts +3 -1
  163. package/packages/locale/lang/es-ES.ts +3 -1
  164. package/packages/locale/lang/fr-FR.ts +3 -1
  165. package/packages/locale/lang/hu-HU.ts +3 -1
  166. package/packages/locale/lang/hy-AM.ts +3 -1
  167. package/packages/locale/lang/id-ID.ts +3 -1
  168. package/packages/locale/lang/it-IT.ts +3 -1
  169. package/packages/locale/lang/ja-JP.ts +3 -1
  170. package/packages/locale/lang/ko-KR.ts +3 -1
  171. package/packages/locale/lang/ms-MY.ts +3 -1
  172. package/packages/locale/lang/nb-NO.ts +3 -1
  173. package/packages/locale/lang/pt-BR.ts +3 -1
  174. package/packages/locale/lang/ru-RU.ts +3 -1
  175. package/packages/locale/lang/th-TH.ts +3 -1
  176. package/packages/locale/lang/ug-CN.ts +3 -1
  177. package/packages/locale/lang/uk-UA.ts +3 -1
  178. package/packages/locale/lang/uz-UZ.ts +3 -1
  179. package/packages/locale/lang/vi-VN.ts +3 -1
  180. package/packages/locale/lang/zh-CHT.ts +3 -1
  181. package/packages/locale/lang/zh-CN.ts +3 -1
  182. package/packages/table/module/custom/mixin.ts +7 -5
  183. package/packages/table/module/custom/panel.ts +4 -0
  184. package/packages/table/module/export/export-panel.ts +3 -0
  185. package/packages/table/module/export/import-panel.ts +3 -0
  186. package/packages/table/module/export/mixin.ts +43 -22
  187. package/packages/table/module/menu/mixin.ts +8 -6
  188. package/packages/table/src/body.ts +6 -1
  189. package/packages/table/src/column.ts +2 -1
  190. package/packages/table/src/columnInfo.ts +8 -4
  191. package/packages/table/src/footer.ts +2 -0
  192. package/packages/table/src/group.ts +2 -1
  193. package/packages/table/src/header.ts +5 -1
  194. package/packages/table/src/methods.ts +99 -48
  195. package/packages/table/src/table.ts +10 -5
  196. package/styles/components/table.scss +7 -3
  197. /package/es/{iconfont.1755133667514.ttf → iconfont.1755232583063.ttf} +0 -0
  198. /package/es/{iconfont.1755133667514.woff → iconfont.1755232583063.woff} +0 -0
  199. /package/es/{iconfont.1755133667514.woff2 → iconfont.1755232583063.woff2} +0 -0
  200. /package/lib/{iconfont.1755133667514.ttf → iconfont.1755232583063.ttf} +0 -0
  201. /package/lib/{iconfont.1755133667514.woff → iconfont.1755232583063.woff} +0 -0
  202. /package/lib/{iconfont.1755133667514.woff2 → iconfont.1755232583063.woff2} +0 -0
@@ -8,7 +8,7 @@ import { getSlotVNs } from '../../ui/src/vn'
8
8
  import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
9
9
  import { warnLog, errLog } from '../../ui/src/log'
10
10
 
11
- import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor, GridPrivateMethods, VxeTablePrivateMethods, VxeTooltipInstance, VxeTablePropTypes } from '../../../types'
11
+ import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor, VxeTablePrivateMethods, VxeTooltipInstance, VxeTablePropTypes, VxeGridPrivateMethods } from '../../../types'
12
12
 
13
13
  const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI
14
14
 
@@ -304,8 +304,11 @@ function cacheColumnMap ($xeTable: VxeTableConstructor & VxeTablePrivateMethods)
304
304
  }
305
305
  fullColFieldData[field] = rest
306
306
  } else {
307
- if ((storage && !type) || (columnOpts.drag && (isCrossDrag || isSelfToChildDrag))) {
308
- errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`])
307
+ if (storage && !type) {
308
+ errLog('vxe.error.reqSupportProp', ['storage', `${column.getTitle() || type || ''} -> field=?`])
309
+ }
310
+ if (columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
311
+ errLog('vxe.error.reqSupportProp', ['column-drag-config.isCrossDrag | column-drag-config.isSelfToChildDrag', `${column.getTitle() || type || ''} -> field=?`])
309
312
  }
310
313
  }
311
314
  if (!hasFixed && fixed) {
@@ -3907,11 +3910,13 @@ const Methods = {
3907
3910
  callSlot (slotFunc: any, params: any, h: any, vNodes: any) {
3908
3911
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
3909
3912
  // const slots = $xeTable.$scopedSlots
3910
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
3913
+ const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
3914
+ const $xeGantt = $xeTable.$xeGantt
3915
+ const $xeGGWrapper = $xeGrid || $xeGantt
3911
3916
 
3912
3917
  if (slotFunc) {
3913
- if ($xeGrid) {
3914
- return $xeGrid.callSlot(slotFunc, params, h, vNodes)
3918
+ if ($xeGGWrapper) {
3919
+ return $xeGGWrapper.callSlot(slotFunc, params, h, vNodes)
3915
3920
  }
3916
3921
  // if (XEUtils.isString(slotFunc)) {
3917
3922
  // slotFunc = slots[slotFunc] || null
@@ -3932,17 +3937,21 @@ const Methods = {
3932
3937
  */
3933
3938
  getParentElem () {
3934
3939
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
3935
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
3940
+ const $xeGrid = $xeTable.$xeGrid
3941
+ const $xeGantt = $xeTable.$xeGantt
3942
+ const $xeGGWrapper = $xeGrid || $xeGantt
3936
3943
 
3937
3944
  const { $el } = this
3938
- return $xeGrid ? $xeGrid.$el.parentNode : $el.parentNode
3945
+ return $xeGGWrapper ? $xeGGWrapper.$el.parentNode : $el.parentNode
3939
3946
  },
3940
3947
  /**
3941
3948
  * 获取父容器的高度
3942
3949
  */
3943
3950
  getParentHeight () {
3944
3951
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
3945
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
3952
+ const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
3953
+ const $xeGantt = $xeTable.$xeGantt
3954
+ const $xeGGWrapper = $xeGrid || $xeGantt
3946
3955
  const props = $xeTable
3947
3956
 
3948
3957
  const { height } = props
@@ -3952,8 +3961,8 @@ const Methods = {
3952
3961
  const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0
3953
3962
  let parentWrapperHeight = 0
3954
3963
  if (parentElem) {
3955
- if ($xeGrid && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
3956
- parentWrapperHeight = $xeGrid.getParentHeight()
3964
+ if ($xeGGWrapper && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
3965
+ parentWrapperHeight = $xeGGWrapper.getParentHeight()
3957
3966
  } else {
3958
3967
  parentWrapperHeight = parentElem.clientHeight
3959
3968
  }
@@ -3969,9 +3978,11 @@ const Methods = {
3969
3978
  */
3970
3979
  getExcludeHeight () {
3971
3980
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
3972
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
3981
+ const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
3982
+ const $xeGantt = $xeTable.$xeGantt
3983
+ const $xeGGWrapper = $xeGrid || $xeGantt
3973
3984
 
3974
- return $xeGrid ? $xeGrid.getExcludeHeight() : 0
3985
+ return $xeGGWrapper ? $xeGGWrapper.getExcludeHeight() : 0
3975
3986
  },
3976
3987
  /**
3977
3988
  * 重置表格的一切数据状态
@@ -6218,7 +6229,8 @@ const Methods = {
6218
6229
  },
6219
6230
  preventEvent (evnt: any, type: any, args: any, next: any, end: any) {
6220
6231
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
6221
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
6232
+ const $xeGrid = $xeTable.$xeGrid
6233
+ const $xeGantt = $xeTable.$xeGantt
6222
6234
 
6223
6235
  let evntList = interceptor.get(type)
6224
6236
 
@@ -6235,7 +6247,7 @@ const Methods = {
6235
6247
  let isStop = false
6236
6248
  for (let i = 0; i < evntList.length; i++) {
6237
6249
  const func = evntList[i]
6238
- const fnRest = func(Object.assign({ $grid: $xeGrid, $table: $xeTable, $event: evnt }, args))
6250
+ const fnRest = func(Object.assign({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }, args))
6239
6251
  if (fnRest === false) {
6240
6252
  isStop = true
6241
6253
  break
@@ -6260,7 +6272,9 @@ const Methods = {
6260
6272
  */
6261
6273
  handleGlobalMousedownEvent (evnt: any) {
6262
6274
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
6263
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
6275
+ const $xeGrid = $xeTable.$xeGrid
6276
+ const $xeGantt = $xeTable.$xeGantt
6277
+ const $xeGGWrapper = $xeGrid || $xeGantt
6264
6278
 
6265
6279
  const { $el, $refs, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this
6266
6280
  const { actived } = editStore
@@ -6349,7 +6363,7 @@ const Methods = {
6349
6363
  }
6350
6364
  }
6351
6365
  } else if (mouseConfig) {
6352
- if (!getEventTargetNode(evnt, $el).flag && !($xeGrid && getEventTargetNode(evnt, $xeGrid.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
6366
+ if (!getEventTargetNode(evnt, $el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
6353
6367
  if (this.clearSelected) {
6354
6368
  this.clearSelected()
6355
6369
  }
@@ -6371,7 +6385,7 @@ const Methods = {
6371
6385
  if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
6372
6386
  this.closeMenu()
6373
6387
  }
6374
- const isActivated = getEventTargetNode(evnt, ($xeGrid || this).$el).flag
6388
+ const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag
6375
6389
  // 如果存在校验,点击了表格之外则清除
6376
6390
  if (!isActivated && editRules && validOpts.autoClear) {
6377
6391
  this.validErrorMaps = {}
@@ -6436,7 +6450,8 @@ const Methods = {
6436
6450
  const props = $xeTable
6437
6451
  const internalData = $xeTable as unknown as TableInternalData
6438
6452
  const reactData = $xeTable as unknown as TableReactData
6439
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
6453
+ const $xeGrid = $xeTable.$xeGrid
6454
+ const $xeGantt = $xeTable.$xeGantt
6440
6455
 
6441
6456
  // 该行为只对当前激活的表格有效
6442
6457
  if (internalData.isActivated) {
@@ -6637,7 +6652,8 @@ const Methods = {
6637
6652
  column: selected.column,
6638
6653
  columnIndex: $xeTable.getColumnIndex(selected.column),
6639
6654
  $table: $xeTable,
6640
- $grid: $xeGrid
6655
+ $grid: $xeGrid,
6656
+ $gantt: $xeGantt
6641
6657
  }
6642
6658
  // 是否被禁用
6643
6659
  if (!beforeEditMethod || beforeEditMethod(params)) {
@@ -6662,7 +6678,8 @@ const Methods = {
6662
6678
  column: selected.column,
6663
6679
  columnIndex: $xeTable.getColumnIndex(selected.column),
6664
6680
  $table: $xeTable,
6665
- $grid: $xeGrid
6681
+ $grid: $xeGrid,
6682
+ $gantt: $xeGantt
6666
6683
  }
6667
6684
  // 是否被禁用
6668
6685
  if (!beforeEditMethod || beforeEditMethod(params)) {
@@ -6689,7 +6706,8 @@ const Methods = {
6689
6706
  rowIndex: $xeTable.getRowIndex(parentRow),
6690
6707
  $rowIndex: $xeTable.getVMRowIndex(parentRow),
6691
6708
  $table: $xeTable,
6692
- $grid: $xeGrid
6709
+ $grid: $xeGrid,
6710
+ $gantt: $xeGantt
6693
6711
  }
6694
6712
  $xeTable.setTreeExpand(parentRow, false)
6695
6713
  .then(() => $xeTable.scrollToRow(parentRow))
@@ -6710,7 +6728,8 @@ const Methods = {
6710
6728
  column: selected.column,
6711
6729
  columnIndex: $xeTable.getColumnIndex(selected.column),
6712
6730
  $table: $xeTable,
6713
- $grid: $xeGrid
6731
+ $grid: $xeGrid,
6732
+ $gantt: $xeGantt
6714
6733
  }
6715
6734
  if (!beforeEditMethod || beforeEditMethod(params)) {
6716
6735
  if (editMethod) {
@@ -7765,15 +7784,23 @@ const Methods = {
7765
7784
  * @param {Row} row 行对象
7766
7785
  */
7767
7786
  setCurrentRow (row: any) {
7768
- const { $el, rowOpts } = this
7787
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
7788
+ const internalData = $xeTable as unknown as TableInternalData
7789
+
7790
+ const $xeGanttView = internalData.xeGanttView
7791
+ const el = $xeTable.$refs.refElem as HTMLDivElement
7792
+ const rowOpts = $xeTable.computeRowOpts
7769
7793
  this.clearCurrentRow()
7770
7794
  // this.clearCurrentColumn()
7771
7795
  this.currentRow = row
7772
7796
  if (rowOpts.isCurrent || this.highlightCurrentRow) {
7773
- if ($el) {
7774
- XEUtils.arrayEach($el.querySelectorAll(`[rowid="${getRowid(this, row)}"]`), elem => addClass(elem, 'row--current'))
7797
+ if (el) {
7798
+ XEUtils.arrayEach(el.querySelectorAll(`[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--current'))
7775
7799
  }
7776
7800
  }
7801
+ if ($xeGanttView) {
7802
+ $xeGanttView.handleUpdateCurrentRow(row)
7803
+ }
7777
7804
  return this.$nextTick()
7778
7805
  },
7779
7806
  isCheckedByRadioRow (row: any) {
@@ -7824,13 +7851,21 @@ const Methods = {
7824
7851
  * 用于当前行,手动清空当前高亮的状态
7825
7852
  */
7826
7853
  clearCurrentRow () {
7827
- const { $el } = this
7828
- this.currentRow = null
7829
- this.hoverRow = null
7830
- if ($el) {
7831
- XEUtils.arrayEach($el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'))
7854
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
7855
+ const reactData = $xeTable as unknown as TableReactData
7856
+ const internalData = $xeTable as unknown as TableInternalData
7857
+
7858
+ const $xeGanttView = internalData.xeGanttView
7859
+ const el = $xeTable.$refs.refElem as HTMLDivElement
7860
+ reactData.currentRow = null
7861
+ internalData.hoverRow = null
7862
+ if (el) {
7863
+ XEUtils.arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'))
7832
7864
  }
7833
- return this.$nextTick()
7865
+ if ($xeGanttView) {
7866
+ $xeGanttView.handleUpdateCurrentRow()
7867
+ }
7868
+ return $xeTable.$nextTick()
7834
7869
  },
7835
7870
  /**
7836
7871
  * 用于单选行,手动清空用户的选择
@@ -7891,20 +7926,33 @@ const Methods = {
7891
7926
  this.setHoverRow(row)
7892
7927
  },
7893
7928
  setHoverRow (row: any) {
7894
- const { $el } = this
7895
- const rowid = getRowid(this, row)
7896
- this.clearHoverRow()
7897
- if ($el) {
7898
- XEUtils.arrayEach($el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), elem => addClass(elem, 'row--hover'))
7929
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
7930
+ const internalData = $xeTable as unknown as TableInternalData
7931
+
7932
+ const $xeGanttView = internalData.xeGanttView
7933
+ const el = $xeTable.$refs.refElem as HTMLDivElement
7934
+ $xeTable.clearHoverRow()
7935
+ if (el) {
7936
+ XEUtils.arrayEach(el.querySelectorAll(`.vxe-body--row[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--hover'))
7937
+ }
7938
+ internalData.hoverRow = row
7939
+ if ($xeGanttView) {
7940
+ $xeGanttView.handleUpdateHoverRow(row)
7899
7941
  }
7900
- this.hoverRow = row
7901
7942
  },
7902
7943
  clearHoverRow () {
7903
- const { $el } = this
7904
- if ($el) {
7905
- XEUtils.arrayEach($el.querySelectorAll('.vxe-body--row.row--hover'), elem => removeClass(elem, 'row--hover'))
7944
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
7945
+ const internalData = $xeTable as unknown as TableInternalData
7946
+
7947
+ const $xeGanttView = internalData.xeGanttView
7948
+ const el = $xeTable.$refs.refElem as HTMLDivElement
7949
+ if (el) {
7950
+ XEUtils.arrayEach(el.querySelectorAll('.vxe-body--row.row--hover'), elem => removeClass(elem, 'row--hover'))
7951
+ }
7952
+ internalData.hoverRow = null
7953
+ if ($xeGanttView) {
7954
+ $xeGanttView.handleUpdateHoverRow()
7906
7955
  }
7907
- this.hoverRow = null
7908
7956
  },
7909
7957
  triggerHeaderCellClickEvent (evnt: MouseEvent, params: VxeTableDefines.CellRenderHeaderParams) {
7910
7958
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -11065,7 +11113,8 @@ const Methods = {
11065
11113
  const props = $xeTable
11066
11114
  const reactData = $xeTable as unknown as TableReactData
11067
11115
  const internalData = $xeTable as unknown as TableInternalData
11068
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
11116
+ const $xeGrid = $xeTable.$xeGrid
11117
+ const $xeGantt = $xeTable.$xeGantt
11069
11118
 
11070
11119
  const { showFooter, footerData, footerMethod } = props
11071
11120
  const { visibleColumn, afterFullData } = internalData
@@ -11073,7 +11122,7 @@ const Methods = {
11073
11122
  if (showFooter && footerData && footerData.length) {
11074
11123
  footData = footerData.slice(0)
11075
11124
  } else if (showFooter && footerMethod) {
11076
- footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid }) : []
11125
+ footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : []
11077
11126
  }
11078
11127
  reactData.footerTableData = footData
11079
11128
  $xeTable.handleUpdateFooterMerge()
@@ -11242,16 +11291,18 @@ const Methods = {
11242
11291
  },
11243
11292
  dispatchEvent (type: ValueOf<VxeTableEmits>, params: Record<string, any>, evnt: Event | null) {
11244
11293
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
11245
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
11294
+ const $xeGrid = $xeTable.$xeGrid
11295
+ const $xeGantt = $xeTable.$xeGantt
11246
11296
 
11247
- $xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid }, params))
11297
+ $xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }, params))
11248
11298
  },
11249
11299
  // 已废弃,使用 dispatchEvent
11250
11300
  emitEvent (type: any, params: any, evnt: any) {
11251
11301
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
11252
- const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
11302
+ const $xeGrid = $xeTable.$xeGrid
11303
+ const $xeGantt = $xeTable.$xeGantt
11253
11304
 
11254
- this.$emit(type, Object.assign({ $table: $xeTable, $grid: $xeGrid, $event: evnt }, params))
11305
+ $xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }))
11255
11306
  },
11256
11307
  focus () {
11257
11308
  this.isActivated = true
@@ -111,11 +111,12 @@ function renderFixed (h: CreateElement, $xeTable: VxeTableConstructor & VxeTable
111
111
  function renderEmptyBody (h: CreateElement, $xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
112
112
  const slots = $xeTable.$scopedSlots
113
113
  const $xeGrid = $xeTable.$xeGrid
114
+ const $xeGantt = $xeTable.$xeGantt
114
115
 
115
116
  const emptyOpts = $xeTable.computeEmptyOpts
116
117
  const emptySlot = slots.empty
117
118
  let emptyContent: any = ''
118
- const emptyParams = { $table: $xeTable, $grid: $xeGrid }
119
+ const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }
119
120
  if (emptySlot) {
120
121
  emptyContent = emptySlot.call($xeTable, emptyParams)
121
122
  } else {
@@ -221,6 +222,7 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
221
222
  const reactData = $xeTable as unknown as TableReactData
222
223
  const internalData = $xeTable as unknown as TableInternalData
223
224
  const $xeGrid = $xeTable.$xeGrid
225
+ const $xeGantt = $xeTable.$xeGantt
224
226
 
225
227
  const { treeConfig } = props
226
228
  const { expandColumn, isRowGroupStatus } = reactData
@@ -282,8 +284,9 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
282
284
  _columnIndex = colRest._index
283
285
  }
284
286
  const expandParams: VxeTableDefines.CellRenderDataParams = {
285
- $grid: $xeGrid,
286
287
  $table: $xeTable,
288
+ $grid: $xeGrid,
289
+ $gantt: $xeGantt,
287
290
  seq,
288
291
  column: expandColumn,
289
292
  columnIndex,
@@ -760,11 +763,12 @@ export default {
760
763
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
761
764
  const props = $xeTable
762
765
  const $xeGrid = $xeTable.$xeGrid
766
+ const $xeGantt = $xeTable.$xeGantt
763
767
 
764
768
  const { id } = props
765
769
  if (id) {
766
770
  if (XEUtils.isFunction(id)) {
767
- return `${id({ $table: $xeTable, $grid: $xeGrid }) || ''}`
771
+ return `${id({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) || ''}`
768
772
  }
769
773
  return `${id}`
770
774
  }
@@ -1900,6 +1904,7 @@ export default {
1900
1904
 
1901
1905
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
1902
1906
  const $xeGrid = $xeTable.$xeGrid
1907
+ const $xeGantt = $xeTable.$xeGantt
1903
1908
  const props = $xeTable
1904
1909
  const slots = $xeTable.$scopedSlots
1905
1910
  const reactData = $xeTable as unknown as TableReactData
@@ -2067,7 +2072,7 @@ export default {
2067
2072
  },
2068
2073
  scopedSlots: loadingSlot
2069
2074
  ? {
2070
- default: () => $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, loading: currLoading }, h)
2075
+ default: () => $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h)
2071
2076
  }
2072
2077
  : {}
2073
2078
  })
@@ -2076,7 +2081,7 @@ export default {
2076
2081
  class: ['vxe-loading--custom-wrapper', {
2077
2082
  'is--visible': currLoading
2078
2083
  }]
2079
- }, $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, loading: currLoading }, h))
2084
+ }, $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h))
2080
2085
  : renderEmptyElement($xeTable),
2081
2086
  /**
2082
2087
  * 自定义列
@@ -1223,9 +1223,6 @@ $btnThemeList: (
1223
1223
  // }
1224
1224
 
1225
1225
  /*边框*/
1226
- .vxe-table--footer-wrapper {
1227
- border-top: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
1228
- }
1229
1226
  &.border--default,
1230
1227
  &.border--full,
1231
1228
  &.border--outer,
@@ -1323,6 +1320,13 @@ $btnThemeList: (
1323
1320
  }
1324
1321
  }
1325
1322
  &.border--default,
1323
+ &.border--full,
1324
+ &.border--inner {
1325
+ .vxe-table--footer-wrapper {
1326
+ border-top: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
1327
+ }
1328
+ }
1329
+ &.border--default,
1326
1330
  &.border--full {
1327
1331
  .vxe-table--scroll-y-top-corner {
1328
1332
  &::before {