vxe-table 4.15.8 → 4.16.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 (206) hide show
  1. package/es/grid/src/grid.js +5 -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/hook.js +2 -1
  29. package/es/table/module/custom/panel.js +4 -0
  30. package/es/table/module/edit/hook.js +3 -2
  31. package/es/table/module/export/export-panel.js +3 -0
  32. package/es/table/module/export/hook.js +45 -24
  33. package/es/table/module/export/import-panel.js +3 -0
  34. package/es/table/module/menu/hook.js +2 -1
  35. package/es/table/module/validator/hook.js +3 -1
  36. package/es/table/src/body.js +7 -2
  37. package/es/table/src/column.js +1 -0
  38. package/es/table/src/columnInfo.js +5 -3
  39. package/es/table/src/footer.js +2 -0
  40. package/es/table/src/group.js +1 -0
  41. package/es/table/src/header.js +2 -0
  42. package/es/table/src/table.js +49 -24
  43. package/es/table/style.css +3 -3
  44. package/es/table/style.min.css +1 -1
  45. package/es/ui/index.js +1 -1
  46. package/es/ui/src/log.js +1 -1
  47. package/es/vxe-table/style.css +3 -3
  48. package/es/vxe-table/style.min.css +1 -1
  49. package/lib/grid/src/grid.js +5 -3
  50. package/lib/grid/src/grid.min.js +1 -1
  51. package/lib/index.css +1 -1
  52. package/lib/index.min.css +1 -1
  53. package/lib/index.umd.js +125 -54
  54. package/lib/index.umd.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.js +3 -1
  56. package/lib/locale/lang/ar-EG.min.js +1 -1
  57. package/lib/locale/lang/ar-EG.umd.js +3 -1
  58. package/lib/locale/lang/de-DE.js +3 -1
  59. package/lib/locale/lang/de-DE.min.js +1 -1
  60. package/lib/locale/lang/de-DE.umd.js +3 -1
  61. package/lib/locale/lang/en-US.js +3 -1
  62. package/lib/locale/lang/en-US.min.js +1 -1
  63. package/lib/locale/lang/en-US.umd.js +3 -1
  64. package/lib/locale/lang/es-ES.js +3 -1
  65. package/lib/locale/lang/es-ES.min.js +1 -1
  66. package/lib/locale/lang/es-ES.umd.js +3 -1
  67. package/lib/locale/lang/fr-FR.js +3 -1
  68. package/lib/locale/lang/fr-FR.min.js +1 -1
  69. package/lib/locale/lang/fr-FR.umd.js +3 -1
  70. package/lib/locale/lang/hu-HU.js +3 -1
  71. package/lib/locale/lang/hu-HU.min.js +1 -1
  72. package/lib/locale/lang/hu-HU.umd.js +3 -1
  73. package/lib/locale/lang/hy-AM.js +3 -1
  74. package/lib/locale/lang/hy-AM.min.js +1 -1
  75. package/lib/locale/lang/hy-AM.umd.js +3 -1
  76. package/lib/locale/lang/id-ID.js +3 -1
  77. package/lib/locale/lang/id-ID.min.js +1 -1
  78. package/lib/locale/lang/id-ID.umd.js +3 -1
  79. package/lib/locale/lang/it-IT.js +3 -1
  80. package/lib/locale/lang/it-IT.min.js +1 -1
  81. package/lib/locale/lang/it-IT.umd.js +3 -1
  82. package/lib/locale/lang/ja-JP.js +3 -1
  83. package/lib/locale/lang/ja-JP.min.js +1 -1
  84. package/lib/locale/lang/ja-JP.umd.js +3 -1
  85. package/lib/locale/lang/ko-KR.js +3 -1
  86. package/lib/locale/lang/ko-KR.min.js +1 -1
  87. package/lib/locale/lang/ko-KR.umd.js +3 -1
  88. package/lib/locale/lang/ms-MY.js +3 -1
  89. package/lib/locale/lang/ms-MY.min.js +1 -1
  90. package/lib/locale/lang/ms-MY.umd.js +3 -1
  91. package/lib/locale/lang/nb-NO.js +3 -1
  92. package/lib/locale/lang/nb-NO.min.js +1 -1
  93. package/lib/locale/lang/nb-NO.umd.js +3 -1
  94. package/lib/locale/lang/pt-BR.js +3 -1
  95. package/lib/locale/lang/pt-BR.min.js +1 -1
  96. package/lib/locale/lang/pt-BR.umd.js +3 -1
  97. package/lib/locale/lang/ru-RU.js +3 -1
  98. package/lib/locale/lang/ru-RU.min.js +1 -1
  99. package/lib/locale/lang/ru-RU.umd.js +3 -1
  100. package/lib/locale/lang/th-TH.js +3 -1
  101. package/lib/locale/lang/th-TH.min.js +1 -1
  102. package/lib/locale/lang/th-TH.umd.js +3 -1
  103. package/lib/locale/lang/ug-CN.js +3 -1
  104. package/lib/locale/lang/ug-CN.min.js +1 -1
  105. package/lib/locale/lang/ug-CN.umd.js +3 -1
  106. package/lib/locale/lang/uk-UA.js +3 -1
  107. package/lib/locale/lang/uk-UA.min.js +1 -1
  108. package/lib/locale/lang/uk-UA.umd.js +3 -1
  109. package/lib/locale/lang/uz-UZ.js +3 -1
  110. package/lib/locale/lang/uz-UZ.min.js +1 -1
  111. package/lib/locale/lang/uz-UZ.umd.js +3 -1
  112. package/lib/locale/lang/vi-VN.js +3 -1
  113. package/lib/locale/lang/vi-VN.min.js +1 -1
  114. package/lib/locale/lang/vi-VN.umd.js +3 -1
  115. package/lib/locale/lang/zh-CHT.js +3 -1
  116. package/lib/locale/lang/zh-CHT.min.js +1 -1
  117. package/lib/locale/lang/zh-CHT.umd.js +3 -1
  118. package/lib/locale/lang/zh-CN.js +3 -1
  119. package/lib/locale/lang/zh-CN.min.js +1 -1
  120. package/lib/locale/lang/zh-CN.umd.js +3 -1
  121. package/lib/style.css +1 -1
  122. package/lib/style.min.css +1 -1
  123. package/lib/table/module/custom/hook.js +2 -1
  124. package/lib/table/module/custom/hook.min.js +1 -1
  125. package/lib/table/module/custom/panel.js +4 -0
  126. package/lib/table/module/custom/panel.min.js +1 -1
  127. package/lib/table/module/edit/hook.js +5 -2
  128. package/lib/table/module/edit/hook.min.js +1 -1
  129. package/lib/table/module/export/export-panel.js +3 -0
  130. package/lib/table/module/export/export-panel.min.js +1 -1
  131. package/lib/table/module/export/hook.js +52 -19
  132. package/lib/table/module/export/hook.min.js +1 -1
  133. package/lib/table/module/export/import-panel.js +3 -0
  134. package/lib/table/module/export/import-panel.min.js +1 -1
  135. package/lib/table/module/menu/hook.js +2 -0
  136. package/lib/table/module/menu/hook.min.js +1 -1
  137. package/lib/table/module/validator/hook.js +3 -1
  138. package/lib/table/module/validator/hook.min.js +1 -1
  139. package/lib/table/src/body.js +8 -2
  140. package/lib/table/src/body.min.js +1 -1
  141. package/lib/table/src/column.js +1 -0
  142. package/lib/table/src/column.min.js +1 -1
  143. package/lib/table/src/columnInfo.js +6 -2
  144. package/lib/table/src/columnInfo.min.js +1 -1
  145. package/lib/table/src/footer.js +2 -0
  146. package/lib/table/src/footer.min.js +1 -1
  147. package/lib/table/src/group.js +1 -0
  148. package/lib/table/src/group.min.js +1 -1
  149. package/lib/table/src/header.js +2 -0
  150. package/lib/table/src/header.min.js +1 -1
  151. package/lib/table/src/table.js +21 -21
  152. package/lib/table/src/table.min.js +1 -1
  153. package/lib/table/style/style.css +3 -3
  154. package/lib/table/style/style.min.css +1 -1
  155. package/lib/ui/index.js +1 -1
  156. package/lib/ui/index.min.js +1 -1
  157. package/lib/ui/src/log.js +1 -1
  158. package/lib/ui/src/log.min.js +1 -1
  159. package/lib/vxe-table/style/style.css +3 -3
  160. package/lib/vxe-table/style/style.min.css +1 -1
  161. package/package.json +1 -1
  162. package/packages/grid/src/grid.ts +5 -3
  163. package/packages/locale/lang/ar-EG.ts +3 -1
  164. package/packages/locale/lang/de-DE.ts +3 -1
  165. package/packages/locale/lang/en-US.ts +3 -1
  166. package/packages/locale/lang/es-ES.ts +3 -1
  167. package/packages/locale/lang/fr-FR.ts +3 -1
  168. package/packages/locale/lang/hu-HU.ts +3 -1
  169. package/packages/locale/lang/hy-AM.ts +3 -1
  170. package/packages/locale/lang/id-ID.ts +3 -1
  171. package/packages/locale/lang/it-IT.ts +3 -1
  172. package/packages/locale/lang/ja-JP.ts +3 -1
  173. package/packages/locale/lang/ko-KR.ts +3 -1
  174. package/packages/locale/lang/ms-MY.ts +3 -1
  175. package/packages/locale/lang/nb-NO.ts +3 -1
  176. package/packages/locale/lang/pt-BR.ts +3 -1
  177. package/packages/locale/lang/ru-RU.ts +3 -1
  178. package/packages/locale/lang/th-TH.ts +3 -1
  179. package/packages/locale/lang/ug-CN.ts +3 -1
  180. package/packages/locale/lang/uk-UA.ts +3 -1
  181. package/packages/locale/lang/uz-UZ.ts +3 -1
  182. package/packages/locale/lang/vi-VN.ts +3 -1
  183. package/packages/locale/lang/zh-CHT.ts +3 -1
  184. package/packages/locale/lang/zh-CN.ts +3 -1
  185. package/packages/table/module/custom/hook.ts +2 -1
  186. package/packages/table/module/custom/panel.ts +4 -0
  187. package/packages/table/module/edit/hook.ts +3 -2
  188. package/packages/table/module/export/export-panel.ts +3 -0
  189. package/packages/table/module/export/hook.ts +52 -26
  190. package/packages/table/module/export/import-panel.ts +3 -0
  191. package/packages/table/module/menu/hook.ts +2 -1
  192. package/packages/table/module/validator/hook.ts +3 -1
  193. package/packages/table/src/body.ts +7 -2
  194. package/packages/table/src/column.ts +1 -0
  195. package/packages/table/src/columnInfo.ts +5 -3
  196. package/packages/table/src/footer.ts +2 -0
  197. package/packages/table/src/group.ts +1 -0
  198. package/packages/table/src/header.ts +2 -0
  199. package/packages/table/src/table.ts +50 -24
  200. package/styles/components/table.scss +7 -3
  201. /package/es/{iconfont.1755133696364.ttf → iconfont.1755232625112.ttf} +0 -0
  202. /package/es/{iconfont.1755133696364.woff → iconfont.1755232625112.woff} +0 -0
  203. /package/es/{iconfont.1755133696364.woff2 → iconfont.1755232625112.woff2} +0 -0
  204. /package/lib/{iconfont.1755133696364.ttf → iconfont.1755232625112.ttf} +0 -0
  205. /package/lib/{iconfont.1755133696364.woff → iconfont.1755232625112.woff} +0 -0
  206. /package/lib/{iconfont.1755133696364.woff2 → iconfont.1755232625112.woff2} +0 -0
@@ -556,6 +556,7 @@ export default defineVxeComponent({
556
556
  };
557
557
  const renderSimplePanel = () => {
558
558
  const $xeGrid = $xeTable.xeGrid;
559
+ const $xeGantt = $xeTable.xeGantt;
559
560
  const tableProps = $xeTable.props;
560
561
  const { customStore } = props;
561
562
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
@@ -585,6 +586,7 @@ export default defineVxeComponent({
585
586
  const params = {
586
587
  $table: $xeTable,
587
588
  $grid: $xeGrid,
589
+ $gantt: $xeGantt,
588
590
  columns: customColumnList,
589
591
  isAllChecked,
590
592
  isAllIndeterminate,
@@ -827,6 +829,7 @@ export default defineVxeComponent({
827
829
  };
828
830
  const renderPopupPanel = () => {
829
831
  const $xeGrid = $xeTable.xeGrid;
832
+ const $xeGantt = $xeTable.xeGantt;
830
833
  const { customStore } = props;
831
834
  const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
832
835
  const { isCustomStatus, customColumnList } = tableReactData;
@@ -854,6 +857,7 @@ export default defineVxeComponent({
854
857
  const params = {
855
858
  $table: $xeTable,
856
859
  $grid: $xeGrid,
860
+ $gantt: $xeGantt,
857
861
  columns: customColumnList,
858
862
  isAllChecked,
859
863
  isAllIndeterminate,
@@ -335,6 +335,7 @@ hooks.add('tableEditModule', {
335
335
  };
336
336
  const handleEditActive = (params, evnt, isFocus, isPos) => {
337
337
  const $xeGrid = $xeTable.xeGrid;
338
+ const $xeGantt = $xeTable.xeGantt;
338
339
  const { editConfig, mouseConfig } = props;
339
340
  const { editStore, tableColumn } = reactData;
340
341
  const editOpts = computeEditOpts.value;
@@ -351,7 +352,7 @@ hooks.add('tableEditModule', {
351
352
  if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
352
353
  // 判断是否禁用编辑
353
354
  let type = 'edit-disabled';
354
- if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }))) {
355
+ if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }))) {
355
356
  if (mouseConfig) {
356
357
  $xeTable.clearSelected();
357
358
  if ($xeTable.clearCellAreas) {
@@ -380,7 +381,7 @@ hooks.add('tableEditModule', {
380
381
  $xeTable.handleFocus(params, evnt);
381
382
  }
382
383
  if (afterEditMethod) {
383
- afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }));
384
+ afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }));
384
385
  }
385
386
  });
386
387
  }
@@ -141,6 +141,7 @@ export default defineVxeComponent({
141
141
  };
142
142
  const renderVN = () => {
143
143
  const $xeGrid = $xeTable.xeGrid;
144
+ const $xeGantt = $xeTable.xeGantt;
144
145
  const { defaultOptions, storeData } = props;
145
146
  const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
146
147
  const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
@@ -219,6 +220,7 @@ export default defineVxeComponent({
219
220
  const params = {
220
221
  $table: $xeTable,
221
222
  $grid: $xeGrid,
223
+ $gantt: $xeGantt,
222
224
  options: defaultOptions,
223
225
  columns,
224
226
  params: defaultOptions.params
@@ -475,6 +477,7 @@ export default defineVxeComponent({
475
477
  const params = {
476
478
  $table: $xeTable,
477
479
  $grid: $xeGrid,
480
+ $gantt: $xeGantt,
478
481
  options: defaultOptions,
479
482
  columns,
480
483
  params: defaultOptions.params
@@ -1,4 +1,4 @@
1
- import { inject, nextTick } from 'vue';
1
+ import { nextTick } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { VxeUI } from '../../../ui';
4
4
  import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util';
@@ -80,8 +80,10 @@ function getBooleanValue(cellValue) {
80
80
  return cellValue === 'TRUE' || cellValue === 'true' || cellValue === true;
81
81
  }
82
82
  function getFooterData($xeTable, opts, footerTableData) {
83
+ const $xeGrid = $xeTable.xeGrid;
84
+ const $xeGantt = $xeTable.xeGantt;
83
85
  const { footerFilterMethod } = opts;
84
- return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, items, $rowIndex: index })) : footerTableData;
86
+ return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, items, $rowIndex: index })) : footerTableData;
85
87
  }
86
88
  function getCsvCellTypeLabel(column, cellValue) {
87
89
  if (cellValue) {
@@ -255,8 +257,6 @@ hooks.add('tableExportModule', {
255
257
  setupTable($xeTable) {
256
258
  const { props, reactData, internalData } = $xeTable;
257
259
  const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts } = $xeTable.getComputeMaps();
258
- const $xeGrid = inject('$xeGrid', null);
259
- const $xeGantt = inject('$xeGantt', null);
260
260
  const hasTreeChildren = (row) => {
261
261
  const treeOpts = computeTreeOpts.value;
262
262
  const childrenField = treeOpts.children || treeOpts.childrenField;
@@ -444,10 +444,12 @@ hooks.add('tableExportModule', {
444
444
  });
445
445
  };
446
446
  const getExportData = (opts) => {
447
+ const $xeGrid = $xeTable.xeGrid;
448
+ const $xeGantt = $xeTable.xeGantt;
447
449
  const { columns, dataFilterMethod } = opts;
448
450
  let datas = opts.data;
449
451
  if (dataFilterMethod) {
450
- datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, row, $rowIndex: index }));
452
+ datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, row, $rowIndex: index }));
451
453
  }
452
454
  return getBodyLabelData(opts, columns, datas);
453
455
  };
@@ -749,10 +751,12 @@ hooks.add('tableExportModule', {
749
751
  }
750
752
  };
751
753
  const handleExport = (opts) => {
754
+ const $xeGrid = $xeTable.xeGrid;
755
+ const $xeGantt = $xeTable.xeGantt;
752
756
  const { remote, columns, colgroups, exportMethod, afterExportMethod } = opts;
753
757
  return new Promise(resolve => {
754
758
  if (remote) {
755
- const params = { options: opts, $table: $xeTable, $grid: $xeGrid };
759
+ const params = { options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
756
760
  resolve(exportMethod ? exportMethod(params) : params);
757
761
  }
758
762
  else {
@@ -765,7 +769,7 @@ hooks.add('tableExportModule', {
765
769
  clearColumnConvert(columns);
766
770
  if (!opts.print) {
767
771
  if (afterExportMethod) {
768
- afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid });
772
+ afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
769
773
  }
770
774
  }
771
775
  return Object.assign({ status: true }, params);
@@ -773,7 +777,7 @@ hooks.add('tableExportModule', {
773
777
  clearColumnConvert(columns);
774
778
  if (!opts.print) {
775
779
  if (afterExportMethod) {
776
- afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid });
780
+ afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
777
781
  }
778
782
  }
779
783
  const params = { status: false };
@@ -965,6 +969,9 @@ hooks.add('tableExportModule', {
965
969
  return exportOpts.original ? !!column.field : defaultFilterExportColumn(column);
966
970
  };
967
971
  const handleExportAndPrint = (options, isPrint) => {
972
+ const $xeGrid = $xeTable.xeGrid;
973
+ const $xeGantt = $xeTable.xeGantt;
974
+ const $xeGGWrapper = $xeGrid || $xeGantt;
968
975
  const { treeConfig, showHeader, showFooter } = props;
969
976
  const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData;
970
977
  const { collectColumn, mergeBodyList, mergeFooterList } = internalData;
@@ -972,7 +979,7 @@ hooks.add('tableExportModule', {
972
979
  const hasTree = treeConfig;
973
980
  const customOpts = computeCustomOpts.value;
974
981
  const selectRecords = $xeTable.getCheckboxRecords();
975
- const proxyOpts = $xeGrid ? $xeGrid.getComputeMaps().computeProxyOpts.value : {};
982
+ const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
976
983
  const hasFooter = !!footerTableData.length;
977
984
  const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
978
985
  const defOpts = Object.assign({
@@ -1049,7 +1056,8 @@ hooks.add('tableExportModule', {
1049
1056
  exportParams.filename = filename({
1050
1057
  options: defOpts,
1051
1058
  $table: $xeTable,
1052
- $grid: $xeGrid
1059
+ $grid: $xeGrid,
1060
+ $gantt: $xeGantt
1053
1061
  });
1054
1062
  }
1055
1063
  else {
@@ -1061,7 +1069,8 @@ hooks.add('tableExportModule', {
1061
1069
  exportParams.sheetName = sheetName({
1062
1070
  options: defOpts,
1063
1071
  $table: $xeTable,
1064
- $grid: $xeGrid
1072
+ $grid: $xeGrid,
1073
+ $gantt: $xeGantt
1065
1074
  });
1066
1075
  }
1067
1076
  else {
@@ -1091,12 +1100,15 @@ hooks.add('tableExportModule', {
1091
1100
  * @param {Object} options 参数
1092
1101
  */
1093
1102
  exportData(options) {
1103
+ const $xeGrid = $xeTable.xeGrid;
1104
+ const $xeGantt = $xeTable.xeGantt;
1105
+ const $xeGGWrapper = $xeGrid || $xeGantt;
1094
1106
  const { treeConfig, showHeader, showFooter } = props;
1095
1107
  const { isGroup } = reactData;
1096
1108
  const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData;
1097
1109
  const exportOpts = computeExportOpts.value;
1098
1110
  const treeOpts = computeTreeOpts.value;
1099
- const proxyOpts = $xeGrid ? $xeGrid.getComputeMaps().computeProxyOpts.value : {};
1111
+ const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
1100
1112
  const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
1101
1113
  const opts = Object.assign({
1102
1114
  message: true,
@@ -1203,14 +1215,14 @@ hooks.add('tableExportModule', {
1203
1215
  }, {
1204
1216
  children: 'childNodes',
1205
1217
  mapChildren: '_children'
1206
- }), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column: column, $columnIndex: index })), {
1218
+ }), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: column, $columnIndex: index })), {
1207
1219
  children: '_children',
1208
1220
  mapChildren: 'childNodes',
1209
1221
  original: true
1210
1222
  });
1211
1223
  }
1212
1224
  else {
1213
- groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true });
1225
+ groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true });
1214
1226
  }
1215
1227
  // 获取所有列
1216
1228
  const cols = [];
@@ -1228,7 +1240,8 @@ hooks.add('tableExportModule', {
1228
1240
  handleOptions.filename = filename({
1229
1241
  options: opts,
1230
1242
  $table: $xeTable,
1231
- $grid: $xeGrid
1243
+ $grid: $xeGrid,
1244
+ $gantt: $xeGantt
1232
1245
  });
1233
1246
  }
1234
1247
  else {
@@ -1243,7 +1256,8 @@ hooks.add('tableExportModule', {
1243
1256
  handleOptions.sheetName = sheetName({
1244
1257
  options: opts,
1245
1258
  $table: $xeTable,
1246
- $grid: $xeGrid
1259
+ $grid: $xeGrid,
1260
+ $gantt: $xeGantt
1247
1261
  });
1248
1262
  }
1249
1263
  else {
@@ -1264,7 +1278,7 @@ hooks.add('tableExportModule', {
1264
1278
  }
1265
1279
  if (!handleOptions.print) {
1266
1280
  if (beforeExportMethod) {
1267
- beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid });
1281
+ beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
1268
1282
  }
1269
1283
  }
1270
1284
  if (!handleOptions.data) {
@@ -1278,12 +1292,12 @@ hooks.add('tableExportModule', {
1278
1292
  }
1279
1293
  }
1280
1294
  else if (mode === 'all') {
1281
- if (!$xeGrid) {
1295
+ if (!$xeGGWrapper) {
1282
1296
  errLog('vxe.error.errProp', ['all', 'mode=current,selected']);
1283
1297
  }
1284
- if ($xeGrid && !handleOptions.remote) {
1285
- const gridReactData = $xeGrid.reactData;
1286
- const { computeProxyOpts } = $xeGrid.getComputeMaps();
1298
+ if ($xeGGWrapper && !handleOptions.remote) {
1299
+ const gridReactData = $xeGGWrapper.reactData;
1300
+ const { computeProxyOpts } = $xeGGWrapper.getComputeMaps();
1287
1301
  const proxyOpts = computeProxyOpts.value;
1288
1302
  const { sortData } = gridReactData;
1289
1303
  const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts;
@@ -1370,6 +1384,8 @@ hooks.add('tableExportModule', {
1370
1384
  return VxeUI.readFile(options);
1371
1385
  },
1372
1386
  print(options) {
1387
+ const $xeGrid = $xeTable.xeGrid;
1388
+ const $xeGantt = $xeTable.xeGantt;
1373
1389
  const printOpts = computePrintOpts.value;
1374
1390
  const opts = Object.assign({
1375
1391
  original: false
@@ -1387,7 +1403,8 @@ hooks.add('tableExportModule', {
1387
1403
  printTitle = sheetName({
1388
1404
  options: opts,
1389
1405
  $table: $xeTable,
1390
- $grid: $xeGrid
1406
+ $grid: $xeGrid,
1407
+ $gantt: $xeGantt
1391
1408
  });
1392
1409
  }
1393
1410
  else {
@@ -1412,7 +1429,9 @@ hooks.add('tableExportModule', {
1412
1429
  html,
1413
1430
  content: html,
1414
1431
  options: opts,
1415
- $table: $xeTable
1432
+ $table: $xeTable,
1433
+ $grid: $xeGrid,
1434
+ $gantt: $xeGantt
1416
1435
  });
1417
1436
  }
1418
1437
  : undefined
@@ -1430,7 +1449,9 @@ hooks.add('tableExportModule', {
1430
1449
  html,
1431
1450
  content: html,
1432
1451
  options: opts,
1433
- $table: $xeTable
1452
+ $table: $xeTable,
1453
+ $grid: $xeGrid,
1454
+ $gantt: $xeGantt
1434
1455
  });
1435
1456
  }
1436
1457
  : undefined
@@ -78,6 +78,7 @@ export default defineVxeComponent({
78
78
  };
79
79
  const renderVN = () => {
80
80
  const $xeGrid = $xeTable.xeGrid;
81
+ const $xeGantt = $xeTable.xeGantt;
81
82
  const { defaultOptions, storeData } = props;
82
83
  const selectName = computeSelectName.value;
83
84
  const hasFile = computeHasFile.value;
@@ -113,6 +114,7 @@ export default defineVxeComponent({
113
114
  const params = {
114
115
  $table: $xeTable,
115
116
  $grid: $xeGrid,
117
+ $gantt: $xeGantt,
116
118
  options: defaultOptions,
117
119
  params: defaultOptions.params
118
120
  };
@@ -189,6 +191,7 @@ export default defineVxeComponent({
189
191
  const params = {
190
192
  $table: $xeTable,
191
193
  $grid: $xeGrid,
194
+ $gantt: $xeGantt,
192
195
  options: defaultOptions,
193
196
  params: defaultOptions.params
194
197
  };
@@ -281,10 +281,11 @@ hooks.add('tableMenuModule', {
281
281
  */
282
282
  ctxMenuLinkEvent(evnt, menu) {
283
283
  const $xeGrid = $xeTable.xeGrid;
284
+ const $xeGantt = $xeTable.xeGantt;
284
285
  // 如果一级菜单有配置 code 则允许点击,否则不能点击
285
286
  if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
286
287
  const gMenuOpts = menus.get(menu.code);
287
- const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $event: evnt });
288
+ const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt });
288
289
  const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null;
289
290
  if (tmMethod) {
290
291
  tmMethod(params, evnt);
@@ -434,6 +434,7 @@ hooks.add('tableValidatorModule', {
434
434
  */
435
435
  validCellRules(validType, row, column, val) {
436
436
  const $xeGrid = $xeTable.xeGrid;
437
+ const $xeGantt = $xeTable.xeGantt;
437
438
  const { editRules } = props;
438
439
  const { field } = column;
439
440
  const errorRules = [];
@@ -456,7 +457,8 @@ hooks.add('tableValidatorModule', {
456
457
  columnIndex: $xeTable.getColumnIndex(column),
457
458
  field: column.field,
458
459
  $table: $xeTable,
459
- $grid: $xeGrid
460
+ $grid: $xeGrid,
461
+ $gantt: $xeGantt
460
462
  };
461
463
  let customValid;
462
464
  if (XEUtils.isString(validator)) {
@@ -78,6 +78,7 @@ export default defineVxeComponent({
78
78
  */
79
79
  const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
80
80
  const $xeGrid = $xeTable.xeGrid;
81
+ const $xeGantt = $xeTable.xeGantt;
81
82
  const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
82
83
  const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
83
84
  const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
@@ -135,6 +136,7 @@ export default defineVxeComponent({
135
136
  const cellParams = {
136
137
  $table: $xeTable,
137
138
  $grid: $xeGrid,
139
+ $gantt: $xeGantt,
138
140
  isEdit: false,
139
141
  seq,
140
142
  rowid,
@@ -419,6 +421,7 @@ export default defineVxeComponent({
419
421
  };
420
422
  const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
421
423
  const $xeGrid = $xeTable.xeGrid;
424
+ const $xeGantt = $xeTable.xeGantt;
422
425
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
423
426
  const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
424
427
  const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
@@ -549,8 +552,9 @@ export default defineVxeComponent({
549
552
  _columnIndex = colRest._index;
550
553
  }
551
554
  const expandParams = {
552
- $grid: $xeGrid,
553
555
  $table: $xeTable,
556
+ $grid: $xeGrid,
557
+ $gantt: $xeGantt,
554
558
  seq,
555
559
  column: expandColumn,
556
560
  columnIndex,
@@ -633,6 +637,7 @@ export default defineVxeComponent({
633
637
  const renderVN = () => {
634
638
  const { slots } = tableContext;
635
639
  const $xeGrid = $xeTable.xeGrid;
640
+ const $xeGantt = $xeTable.xeGantt;
636
641
  const { fixedColumn, fixedType, tableColumn } = props;
637
642
  const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
638
643
  const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, expandColumn, dragRow, dragCol } = tableReactData;
@@ -710,7 +715,7 @@ export default defineVxeComponent({
710
715
  }
711
716
  let emptyContent;
712
717
  const emptySlot = slots ? slots.empty : null;
713
- const emptyParams = { $table: $xeTable, $grid: $xeGrid };
718
+ const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
714
719
  if (emptySlot) {
715
720
  emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
716
721
  }
@@ -160,6 +160,7 @@ export default defineVxeComponent({
160
160
  });
161
161
  provide('$xeColumn', $xeColumn);
162
162
  provide('$xeGrid', null);
163
+ provide('$xeGantt', null);
163
164
  return renderVN;
164
165
  }
165
166
  });
@@ -9,6 +9,8 @@ export class ColumnInfo {
9
9
  constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
10
10
  const tableProps = $xeTable.props;
11
11
  const $xeGrid = $xeTable.xeGrid;
12
+ const $xeGantt = $xeTable.xeGantt;
13
+ const $xeGGWrapper = $xeGrid || $xeGantt;
12
14
  const { field, editRender } = _vm;
13
15
  const formatter = _vm.formatter;
14
16
  const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
@@ -151,11 +153,11 @@ export class ColumnInfo {
151
153
  // 单元格插槽,只对 grid 有效
152
154
  slots: _vm.slots
153
155
  });
154
- if ($xeGrid) {
155
- const { computeProxyOpts } = $xeGrid.getComputeMaps();
156
+ if ($xeGGWrapper) {
157
+ const { computeProxyOpts } = $xeGGWrapper.getComputeMaps();
156
158
  const proxyOpts = computeProxyOpts.value;
157
159
  if (proxyOpts.beforeColumn) {
158
- proxyOpts.beforeColumn({ $grid: $xeGrid, column: this });
160
+ proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this });
159
161
  }
160
162
  }
161
163
  }
@@ -38,6 +38,7 @@ export default defineVxeComponent({
38
38
  const refFooterXSpace = ref();
39
39
  const renderRows = (isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
40
40
  const $xeGrid = $xeTable.xeGrid;
41
+ const $xeGantt = $xeTable.xeGantt;
41
42
  const { fixedType } = props;
42
43
  const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
43
44
  const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFootFlag } = tableReactData;
@@ -75,6 +76,7 @@ export default defineVxeComponent({
75
76
  const cellParams = {
76
77
  $table: $xeTable,
77
78
  $grid: $xeGrid,
79
+ $gantt: $xeGantt,
78
80
  row,
79
81
  rowIndex: _rowIndex,
80
82
  _rowIndex,
@@ -38,6 +38,7 @@ export default defineVxeComponent({
38
38
  const $xeColgroup = { columnConfig };
39
39
  provide('$xeColgroup', $xeColgroup);
40
40
  provide('$xeGrid', null);
41
+ provide('$xeGantt', null);
41
42
  return renderVN;
42
43
  }
43
44
  });
@@ -35,6 +35,7 @@ export default defineVxeComponent({
35
35
  };
36
36
  const renderRows = (isGroup, isOptimizeMode, cols, $rowIndex) => {
37
37
  const $xeGrid = $xeTable.xeGrid;
38
+ const $xeGantt = $xeTable.xeGantt;
38
39
  const { fixedType } = props;
39
40
  const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
40
41
  const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX, tableColumn } = tableReactData;
@@ -73,6 +74,7 @@ export default defineVxeComponent({
73
74
  const cellParams = {
74
75
  $table: $xeTable,
75
76
  $grid: $xeGrid,
77
+ $gantt: $xeGantt,
76
78
  $rowIndex,
77
79
  column,
78
80
  columnIndex,