vxe-table 3.17.7 → 3.17.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 (47) hide show
  1. package/es/grid/src/grid.js +47 -29
  2. package/es/style.css +1 -1
  3. package/es/table/module/export/mixin.js +3 -1
  4. package/es/table/src/methods.js +109 -42
  5. package/es/table/src/props.js +1 -1
  6. package/es/table/src/table.js +7 -1
  7. package/es/table/src/util.js +0 -4
  8. package/es/toolbar/src/toolbar.js +2 -2
  9. package/es/ui/index.js +13 -4
  10. package/es/ui/src/log.js +1 -1
  11. package/lib/grid/src/grid.js +49 -26
  12. package/lib/grid/src/grid.min.js +1 -1
  13. package/lib/index.umd.js +13411 -13299
  14. package/lib/index.umd.min.js +1 -1
  15. package/lib/style.css +1 -1
  16. package/lib/table/module/export/mixin.js +5 -1
  17. package/lib/table/module/export/mixin.min.js +1 -1
  18. package/lib/table/src/methods.js +114 -43
  19. package/lib/table/src/methods.min.js +1 -1
  20. package/lib/table/src/props.js +2 -2
  21. package/lib/table/src/props.min.js +1 -1
  22. package/lib/table/src/table.js +8 -2
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/table/src/util.js +0 -4
  25. package/lib/table/src/util.min.js +1 -1
  26. package/lib/toolbar/src/toolbar.js +2 -0
  27. package/lib/toolbar/src/toolbar.min.js +1 -1
  28. package/lib/ui/index.js +12 -3
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/package.json +1 -1
  33. package/packages/grid/src/grid.ts +49 -30
  34. package/packages/table/module/export/mixin.ts +5 -3
  35. package/packages/table/src/methods.ts +118 -46
  36. package/packages/table/src/props.ts +1 -1
  37. package/packages/table/src/table.ts +7 -1
  38. package/packages/table/src/util.ts +0 -4
  39. package/packages/toolbar/src/toolbar.ts +2 -2
  40. package/packages/ui/index.ts +12 -2
  41. package/packages/ui/src/dom.ts +1 -1
  42. /package/es/{iconfont.1754614978390.ttf → iconfont.1754905462391.ttf} +0 -0
  43. /package/es/{iconfont.1754614978390.woff → iconfont.1754905462391.woff} +0 -0
  44. /package/es/{iconfont.1754614978390.woff2 → iconfont.1754905462391.woff2} +0 -0
  45. /package/lib/{iconfont.1754614978390.ttf → iconfont.1754905462391.ttf} +0 -0
  46. /package/lib/{iconfont.1754614978390.woff → iconfont.1754905462391.woff} +0 -0
  47. /package/lib/{iconfont.1754614978390.woff2 → iconfont.1754905462391.woff2} +0 -0
@@ -1110,6 +1110,7 @@ export default {
1110
1110
  const reactData = $xeTable;
1111
1111
  const internalData = $xeTable;
1112
1112
  const $xeGrid = $xeTable.$xeGrid;
1113
+ const $xeGantt = $xeTable.$xeGantt;
1113
1114
  const { treeConfig, showHeader, showFooter } = props;
1114
1115
  const { isGroup } = reactData;
1115
1116
  const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData;
@@ -1316,6 +1317,7 @@ export default {
1316
1317
  const params = {
1317
1318
  $table: $xeTable,
1318
1319
  $grid: $xeGrid,
1320
+ $gantt: $xeGantt,
1319
1321
  sort: sortData.length ? sortData[0] : {},
1320
1322
  sorts: sortData,
1321
1323
  filters: gridReactData.filterData,
@@ -1325,7 +1327,7 @@ export default {
1325
1327
  return Promise.resolve((beforeQueryAll || ajaxMethods)(params))
1326
1328
  .then(rest => {
1327
1329
  const listProp = resConfigs.list;
1328
- handleOptions.data = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $grid: $xeGrid }) : XEUtils.get(rest, listProp)) : rest) || [];
1330
+ handleOptions.data = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : XEUtils.get(rest, listProp)) : rest) || [];
1329
1331
  if (afterQueryAll) {
1330
1332
  afterQueryAll(params);
1331
1333
  }
@@ -931,14 +931,15 @@ function updateStyle($xeTable) {
931
931
  const reactData = $xeTable;
932
932
  const internalData = $xeTable;
933
933
  const { showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
934
- const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading } = reactData;
935
- const { visibleColumn, tableHeight, headerHeight, footerHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
934
+ const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading, tHeaderHeight, tFooterHeight } = reactData;
935
+ const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
936
+ const $xeGanttView = internalData.xeGanttView;
936
937
  const el = $xeTable.$refs.refElem;
937
- if (!el) {
938
+ if (!el || !el.clientHeight) {
938
939
  return;
939
940
  }
940
941
  const containerList = ['main', 'left', 'right'];
941
- const osbWidth = overflowY ? scrollbarWidth : 0;
942
+ let osbWidth = overflowY ? scrollbarWidth : 0;
942
943
  const osbHeight = overflowX ? scrollbarHeight : 0;
943
944
  const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
944
945
  const mouseOpts = $xeTable.computeMouseOpts;
@@ -946,36 +947,45 @@ function updateStyle($xeTable) {
946
947
  const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
947
948
  const bodyTableElem = getRefElem(elemStore['main-body-table']);
948
949
  if (emptyPlaceholderElem) {
949
- emptyPlaceholderElem.style.top = `${headerHeight}px`;
950
+ emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
950
951
  emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
951
952
  }
952
- let bodyHeight = 0;
953
+ const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
954
+ const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
955
+ const xScrollbarVisible = overflowX ? 'visible' : 'hidden';
956
+ let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
957
+ if ($xeGanttView) {
958
+ if (!scrollbarYToLeft) {
959
+ osbWidth = 0;
960
+ yScrollbarVisible = 'hidden';
961
+ }
962
+ }
963
+ let tbHeight = 0;
953
964
  let bodyMaxHeight = 0;
954
- const bodyMinHeight = customMinHeight - headerHeight - footerHeight - osbHeight;
965
+ const bodyMinHeight = customMinHeight - tHeaderHeight - tFooterHeight - osbHeight;
955
966
  if (customMaxHeight) {
956
- bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - headerHeight - footerHeight - osbHeight);
967
+ bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - tHeaderHeight - tFooterHeight - osbHeight);
957
968
  }
958
969
  if (customHeight) {
959
- bodyHeight = customHeight - headerHeight - footerHeight - osbHeight;
970
+ tbHeight = customHeight - tHeaderHeight - tFooterHeight - osbHeight;
960
971
  }
961
- if (!bodyHeight) {
972
+ if (!tbHeight) {
962
973
  if (bodyTableElem) {
963
- bodyHeight = bodyTableElem.clientHeight;
974
+ tbHeight = bodyTableElem.clientHeight;
964
975
  }
965
976
  }
966
- if (bodyHeight) {
977
+ if (tbHeight) {
967
978
  if (bodyMaxHeight) {
968
- bodyHeight = Math.min(bodyMaxHeight, bodyHeight);
979
+ tbHeight = Math.min(bodyMaxHeight, tbHeight);
969
980
  }
970
- bodyHeight = Math.max(bodyMinHeight, bodyHeight);
981
+ tbHeight = Math.max(bodyMinHeight, tbHeight);
971
982
  }
972
- const scrollbarXToTop = $xeTable.$refs.computeScrollbarXToTop;
973
983
  const xLeftCornerEl = $xeTable.$refs.refScrollXLeftCornerElem;
974
984
  const xRightCornerEl = $xeTable.$refs.refScrollXRightCornerElem;
975
985
  const scrollXVirtualEl = $xeTable.$refs.refScrollXVirtualElem;
976
986
  if (scrollXVirtualEl) {
977
987
  scrollXVirtualEl.style.height = `${osbHeight}px`;
978
- scrollXVirtualEl.style.visibility = overflowX ? 'visible' : 'hidden';
988
+ scrollXVirtualEl.style.visibility = xScrollbarVisible;
979
989
  }
980
990
  const xWrapperEl = $xeTable.$refs.refScrollXWrapperElem;
981
991
  if (xWrapperEl) {
@@ -993,30 +1003,31 @@ function updateStyle($xeTable) {
993
1003
  const scrollYVirtualEl = $xeTable.$refs.refScrollYVirtualElem;
994
1004
  if (scrollYVirtualEl) {
995
1005
  scrollYVirtualEl.style.width = `${osbWidth}px`;
996
- scrollYVirtualEl.style.height = `${bodyHeight + headerHeight + footerHeight}px`;
997
- scrollYVirtualEl.style.visibility = overflowY ? 'visible' : 'hidden';
1006
+ scrollYVirtualEl.style.height = `${tbHeight + tHeaderHeight + tFooterHeight}px`;
1007
+ scrollYVirtualEl.style.visibility = yScrollbarVisible;
998
1008
  }
999
1009
  const yTopCornerEl = $xeTable.$refs.refScrollYTopCornerElem;
1000
1010
  if (yTopCornerEl) {
1001
- yTopCornerEl.style.height = `${headerHeight}px`;
1002
- yTopCornerEl.style.display = overflowY && headerHeight ? 'block' : '';
1011
+ yTopCornerEl.style.height = `${tHeaderHeight}px`;
1012
+ yTopCornerEl.style.display = overflowY && tHeaderHeight ? 'block' : '';
1003
1013
  }
1004
1014
  const yWrapperEl = $xeTable.$refs.refScrollYWrapperElem;
1005
1015
  if (yWrapperEl) {
1006
- yWrapperEl.style.height = `${bodyHeight}px`;
1007
- yWrapperEl.style.top = `${headerHeight}px`;
1016
+ yWrapperEl.style.height = `${tbHeight}px`;
1017
+ yWrapperEl.style.top = `${tHeaderHeight}px`;
1008
1018
  }
1009
1019
  const yBottomCornerEl = $xeTable.$refs.refScrollYBottomCornerElem;
1010
1020
  if (yBottomCornerEl) {
1011
- yBottomCornerEl.style.height = `${footerHeight}px`;
1012
- yBottomCornerEl.style.top = `${headerHeight + bodyHeight}px`;
1013
- yBottomCornerEl.style.display = overflowY && footerHeight ? 'block' : '';
1021
+ yBottomCornerEl.style.height = `${tFooterHeight}px`;
1022
+ yBottomCornerEl.style.top = `${tHeaderHeight + tbHeight}px`;
1023
+ yBottomCornerEl.style.display = overflowY && tFooterHeight ? 'block' : '';
1014
1024
  }
1015
1025
  const rowExpandEl = $xeTable.$refs.refRowExpandElem;
1016
1026
  if (rowExpandEl) {
1017
- rowExpandEl.style.height = `${bodyHeight}px`;
1018
- rowExpandEl.style.top = `${headerHeight}px`;
1027
+ rowExpandEl.style.height = `${tbHeight}px`;
1028
+ rowExpandEl.style.top = `${tHeaderHeight}px`;
1019
1029
  }
1030
+ reactData.tBodyHeight = tbHeight;
1020
1031
  containerList.forEach((name, index) => {
1021
1032
  const fixedType = index > 0 ? name : '';
1022
1033
  const layoutList = ['header', 'body', 'footer'];
@@ -1080,7 +1091,7 @@ function updateStyle($xeTable) {
1080
1091
  }
1081
1092
  }
1082
1093
  if (currScrollElem) {
1083
- currScrollElem.style.height = `${headerHeight}px`;
1094
+ currScrollElem.style.height = `${tHeaderHeight}px`;
1084
1095
  }
1085
1096
  if (tableElem) {
1086
1097
  tableElem.style.width = tWidth ? `${tWidth}px` : '';
@@ -1089,15 +1100,15 @@ function updateStyle($xeTable) {
1089
1100
  else if (layout === 'body') {
1090
1101
  if (currScrollElem) {
1091
1102
  currScrollElem.style.maxHeight = customMaxHeight ? `${bodyMaxHeight}px` : '';
1092
- currScrollElem.style.height = customHeight ? `${bodyHeight}px` : '';
1103
+ currScrollElem.style.height = customHeight ? `${tbHeight}px` : '';
1093
1104
  currScrollElem.style.minHeight = `${bodyMinHeight}px`;
1094
1105
  }
1095
1106
  // 如果是固定列
1096
1107
  if (fixedWrapperElem) {
1097
1108
  if (wrapperElem) {
1098
- wrapperElem.style.top = `${headerHeight}px`;
1109
+ wrapperElem.style.top = `${tHeaderHeight}px`;
1099
1110
  }
1100
- fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight + headerHeight + footerHeight + osbHeight)}px`;
1111
+ fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight + tHeaderHeight + tFooterHeight + osbHeight)}px`;
1101
1112
  fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
1102
1113
  }
1103
1114
  let renderColumnList = tableColumn;
@@ -1174,11 +1185,11 @@ function updateStyle($xeTable) {
1174
1185
  }
1175
1186
  }
1176
1187
  if (currScrollElem) {
1177
- currScrollElem.style.height = `${footerHeight}px`;
1188
+ currScrollElem.style.height = `${tFooterHeight}px`;
1178
1189
  // 如果是固定列
1179
1190
  if (fixedWrapperElem) {
1180
1191
  if (wrapperElem) {
1181
- wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight - osbHeight : tableHeight + headerHeight}px`;
1192
+ wrapperElem.style.top = `${customHeight > 0 ? customHeight - tFooterHeight - osbHeight : tableHeight + tHeaderHeight}px`;
1182
1193
  }
1183
1194
  }
1184
1195
  }
@@ -1194,6 +1205,9 @@ function updateStyle($xeTable) {
1194
1205
  if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
1195
1206
  $xeTable.addCellSelectedClass();
1196
1207
  }
1208
+ if ($xeGanttView) {
1209
+ $xeGanttView.handleUpdateStyle();
1210
+ }
1197
1211
  return $xeTable.$nextTick();
1198
1212
  }
1199
1213
  function checkValidate($xeTable, type) {
@@ -2656,12 +2670,13 @@ function calcScrollbar($xeTable) {
2656
2670
  reactData.scrollbarHeight = scrollbarOpts.height || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
2657
2671
  }
2658
2672
  reactData.overflowX = overflowX;
2659
- const headerHeight = headerTableElem ? headerTableElem.clientHeight : 0;
2660
- const footerHeight = footerTableElem ? footerTableElem.clientHeight : 0;
2673
+ const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
2674
+ const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
2661
2675
  internalData.tableHeight = bodyWrapperElem.offsetHeight;
2662
- internalData.headerHeight = headerHeight;
2663
- internalData.footerHeight = footerHeight;
2664
- reactData.parentHeight = Math.max(internalData.headerHeight + footerHeight + 20, $xeTable.getParentHeight());
2676
+ reactData.tHeaderHeight = hHeight;
2677
+ reactData.tFooterHeight = fHeight;
2678
+ reactData.overflowX = overflowX;
2679
+ reactData.parentHeight = Math.max(hHeight + fHeight + 20, $xeTable.getParentHeight());
2665
2680
  }
2666
2681
  if (overflowX) {
2667
2682
  $xeTable.checkScrolling();
@@ -2717,6 +2732,7 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
2717
2732
  const internalData = $xeTable;
2718
2733
  return new Promise(resolve => {
2719
2734
  const { rceTimeout, rceRunTime } = internalData;
2735
+ const $xeGanttView = internalData.xeGanttView;
2720
2736
  const resizeOpts = $xeTable.computeResizeOpts;
2721
2737
  const refreshDelay = resizeOpts.refreshDelay || 20;
2722
2738
  const el = $xeTable.$refs.refElem;
@@ -2738,6 +2754,9 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
2738
2754
  else {
2739
2755
  resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
2740
2756
  }
2757
+ if ($xeGanttView) {
2758
+ $xeGanttView.handleLazyRecalculate();
2759
+ }
2741
2760
  internalData.rceTimeout = setTimeout(() => {
2742
2761
  internalData.rceTimeout = undefined;
2743
2762
  handleRecalculateStyle($xeTable, reFull, reWidth, reHeight);
@@ -3515,6 +3534,18 @@ const wheelScrollTopTo = (diffNum, cb) => {
3515
3534
  };
3516
3535
  requestAnimationFrame(step);
3517
3536
  };
3537
+ const syncGanttScrollTop = ($xeTable, scrollTop) => {
3538
+ const internalData = $xeTable;
3539
+ const $xeGanttView = internalData.xeGanttView;
3540
+ if ($xeGanttView) {
3541
+ const ganttInternalData = $xeGanttView.internalData;
3542
+ const { elemStore: ganttElemStore } = ganttInternalData;
3543
+ const ganttBodyScrollElem = getRefElem(ganttElemStore['main-body-scroll']);
3544
+ if (ganttBodyScrollElem) {
3545
+ ganttBodyScrollElem.scrollTop = scrollTop;
3546
+ }
3547
+ }
3548
+ };
3518
3549
  function updateHeight($xeTable) {
3519
3550
  const reactData = $xeTable;
3520
3551
  const internalData = $xeTable;
@@ -3821,6 +3852,7 @@ const Methods = {
3821
3852
  const internalData = $xeTable;
3822
3853
  const { scrollYLoad } = reactData;
3823
3854
  const { scrollYStore, fullDataRowIdData } = internalData;
3855
+ const $xeGanttView = internalData.xeGanttView;
3824
3856
  let fullList = internalData.afterFullData;
3825
3857
  // 是否进行数据处理
3826
3858
  if (force) {
@@ -3841,6 +3873,9 @@ const Methods = {
3841
3873
  });
3842
3874
  reactData.tableData = tableData;
3843
3875
  internalData.visibleDataRowIdData = visibleDataRowIdMaps;
3876
+ if ($xeGanttView) {
3877
+ $xeGanttView.updateViewData();
3878
+ }
3844
3879
  return $xeTable.$nextTick();
3845
3880
  },
3846
3881
  /**
@@ -9966,6 +10001,7 @@ const Methods = {
9966
10001
  }
9967
10002
  setScrollTop(yHandleEl, scrollTop);
9968
10003
  setScrollTop(rowExpandEl, scrollTop);
10004
+ syncGanttScrollTop($xeTable, scrollTop);
9969
10005
  if (scrollYLoad) {
9970
10006
  $xeTable.triggerScrollYEvent(evnt);
9971
10007
  }
@@ -10162,6 +10198,7 @@ const Methods = {
10162
10198
  setScrollTop(leftScrollElem, currTopNum);
10163
10199
  setScrollTop(rightScrollElem, currTopNum);
10164
10200
  setScrollTop(rowExpandEl, currTopNum);
10201
+ syncGanttScrollTop($xeTable, currTopNum);
10165
10202
  if (scrollYLoad) {
10166
10203
  $xeTable.triggerScrollYEvent(evnt);
10167
10204
  }
@@ -10179,6 +10216,7 @@ const Methods = {
10179
10216
  setScrollTop(leftScrollElem, currTopNum);
10180
10217
  setScrollTop(rightScrollElem, currTopNum);
10181
10218
  setScrollTop(rowExpandEl, currTopNum);
10219
+ syncGanttScrollTop($xeTable, currTopNum);
10182
10220
  if (scrollYLoad) {
10183
10221
  $xeTable.triggerScrollYEvent(evnt);
10184
10222
  }
@@ -10258,6 +10296,7 @@ const Methods = {
10258
10296
  setScrollTop(leftScrollElem, scrollTop);
10259
10297
  setScrollTop(rightScrollElem, scrollTop);
10260
10298
  setScrollTop(rowExpandEl, scrollTop);
10299
+ syncGanttScrollTop($xeTable, scrollTop);
10261
10300
  if (scrollYLoad) {
10262
10301
  $xeTable.triggerScrollYEvent(evnt);
10263
10302
  }
@@ -10287,6 +10326,7 @@ const Methods = {
10287
10326
  const internalData = $xeTable;
10288
10327
  const { scrollXLoad, overflowX, scrollXWidth } = reactData;
10289
10328
  const { visibleColumn, scrollXStore, elemStore, fullColumnIdData } = internalData;
10329
+ const $xeGanttView = internalData.xeGanttView;
10290
10330
  const mouseOpts = $xeTable.computeMouseOpts;
10291
10331
  const tableBody = $xeTable.$refs.refTableBody;
10292
10332
  const tableBodyElem = tableBody ? tableBody.$el : null;
@@ -10348,10 +10388,13 @@ const Methods = {
10348
10388
  if (scrollXSpaceEl) {
10349
10389
  scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
10350
10390
  }
10391
+ calcScrollbar($xeTable);
10351
10392
  if (isScrollXBig && mouseOpts.area) {
10352
10393
  errLog('vxe.error.notProp', ['mouse-config.area']);
10353
10394
  }
10354
- calcScrollbar($xeTable);
10395
+ if ($xeGanttView) {
10396
+ $xeGanttView.updateScrollXSpace();
10397
+ }
10355
10398
  return $xeTable.$nextTick(() => {
10356
10399
  updateStyle($xeTable);
10357
10400
  });
@@ -10373,6 +10416,7 @@ const Methods = {
10373
10416
  const internalData = $xeTable;
10374
10417
  const { isAllOverflow, scrollYLoad, expandColumn } = reactData;
10375
10418
  const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData;
10419
+ const $xeGanttView = internalData.xeGanttView;
10376
10420
  const { startIndex } = scrollYStore;
10377
10421
  const mouseOpts = $xeTable.computeMouseOpts;
10378
10422
  const expandOpts = $xeTable.computeExpandOpts;
@@ -10465,10 +10509,13 @@ const Methods = {
10465
10509
  reactData.scrollYTop = scrollYTop;
10466
10510
  reactData.scrollYHeight = scrollYHeight;
10467
10511
  reactData.isScrollYBig = isScrollYBig;
10512
+ calcScrollbar($xeTable);
10468
10513
  if (isScrollYBig && mouseOpts.area) {
10469
10514
  errLog('vxe.error.notProp', ['mouse-config.area']);
10470
10515
  }
10471
- calcScrollbar($xeTable);
10516
+ if ($xeGanttView) {
10517
+ $xeGanttView.updateScrollYSpace();
10518
+ }
10472
10519
  return $xeTable.$nextTick().then(() => {
10473
10520
  updateStyle($xeTable);
10474
10521
  });
@@ -10824,10 +10871,21 @@ const Methods = {
10824
10871
  this.isActivated = false;
10825
10872
  return this.$nextTick();
10826
10873
  },
10827
- // 连接工具栏
10874
+ /**
10875
+ * 已废弃,被 connectToolbar 替换
10876
+ * @deprecated
10877
+ */
10828
10878
  connect($toolbar) {
10879
+ return this.connectToolbar($toolbar);
10880
+ },
10881
+ /**
10882
+ * 连接工具栏
10883
+ * @param $toolbar
10884
+ */
10885
+ connectToolbar($toolbar) {
10886
+ const $xeTable = this;
10829
10887
  if ($toolbar && $toolbar.syncUpdate) {
10830
- $toolbar.syncUpdate({ collectColumn: this.collectColumn, $table: this });
10888
+ $toolbar.syncUpdate({ collectColumn: this.collectColumn, $table: $xeTable });
10831
10889
  this.$toolbar = $toolbar;
10832
10890
  }
10833
10891
  else {
@@ -10835,6 +10893,15 @@ const Methods = {
10835
10893
  }
10836
10894
  return this.$nextTick();
10837
10895
  },
10896
+ handleConnectGanttView($ganttView) {
10897
+ const $xeTable = this;
10898
+ const internalData = $xeTable;
10899
+ if ($ganttView && $ganttView.connectUpdate) {
10900
+ $ganttView.connectUpdate({ $table: $xeTable });
10901
+ internalData.xeGanttView = $ganttView;
10902
+ }
10903
+ return $xeTable.$nextTick();
10904
+ },
10838
10905
  /*************************
10839
10906
  * Publish methods
10840
10907
  *************************/
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '../../ui';
2
2
  const { getConfig } = VxeUI;
3
- export default {
3
+ export const tableProps = {
4
4
  /** 基本属性 */
5
5
  id: [String, Function],
6
6
  // 数据
@@ -7,7 +7,7 @@ import methods from './methods';
7
7
  import TableBodyComponent from './body';
8
8
  import TableHeaderComponent from './header';
9
9
  import TableFooterComponent from './footer';
10
- import tableProps from './props';
10
+ import { tableProps } from './props';
11
11
  import { getSlotVNs } from '../../ui/src/vn';
12
12
  import { warnLog, errLog } from '../../ui/src/log';
13
13
  import TableCustomPanelComponent from '../module/custom/panel';
@@ -489,6 +489,12 @@ export default {
489
489
  scrollbarHeight: 0,
490
490
  // 行高
491
491
  rowHeight: 0,
492
+ // 表头高度
493
+ tHeaderHeight: 0,
494
+ // 表体高度
495
+ tBodyHeight: 0,
496
+ // 表尾高度
497
+ tFooterHeight: 0,
492
498
  // 表格父容器的高度
493
499
  parentHeight: 0,
494
500
  // 是否使用分组表头
@@ -33,10 +33,6 @@ export function createInternalData() {
33
33
  tableWidth: 0,
34
34
  // 表格高度
35
35
  tableHeight: 0,
36
- // 表头高度
37
- headerHeight: 0,
38
- // 表尾高度
39
- footerHeight: 0,
40
36
  customHeight: 0,
41
37
  customMinHeight: 0,
42
38
  customMaxHeight: 0,
@@ -332,7 +332,7 @@ export default {
332
332
  }
333
333
  else {
334
334
  const gCommandOpts = commands.get(code);
335
- const params = { code, button: item, $table: $table, $grid: $xeGrid, $event };
335
+ const params = { code, button: item, $table: $table, $grid: $xeGrid, $gantt: null, $event };
336
336
  if (gCommandOpts) {
337
337
  const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
338
338
  if (tCommandMethod) {
@@ -362,7 +362,7 @@ export default {
362
362
  }
363
363
  else {
364
364
  const gCommandOpts = commands.get(code);
365
- const params = { code, button: null, tool: item, $table: $table, $grid: $xeGrid, $event };
365
+ const params = { code, button: null, tool: item, $table: $table, $grid: $xeGrid, $gantt: null, $event };
366
366
  if (gCommandOpts) {
367
367
  const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
368
368
  if (tCommandMethod) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.17.7";
3
+ export const version = "3.17.8";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -227,8 +227,16 @@ VxeUI.setConfig({
227
227
  oSize: 0
228
228
  },
229
229
  scrollbarConfig: {
230
- // width: 14,
231
- // height: 14
230
+ // width: 14,
231
+ // height: 14,
232
+ x: {
233
+ // position: 'bottom',
234
+ visible: true
235
+ },
236
+ y: {
237
+ // position: 'right',
238
+ visible: true
239
+ }
232
240
  }
233
241
  },
234
242
  // export: {
@@ -281,7 +289,8 @@ VxeUI.setConfig({
281
289
  // types: ['csv', 'html', 'xml', 'txt']
282
290
  // },
283
291
  // buttons: []
284
- }
292
+ },
293
+ gantt: {}
285
294
  });
286
295
  const iconPrefix = 'vxe-table-icon-';
287
296
  VxeUI.setIcon({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.17.7"}`;
3
+ const version = `table v${"3.17.8"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);