vxe-gantt 4.0.6 → 4.0.7

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.
package/lib/index.umd.js CHANGED
@@ -2780,7 +2780,7 @@ var core_ = __webpack_require__(4345);
2780
2780
  const {
2781
2781
  log
2782
2782
  } = core_.VxeUI;
2783
- const version = `gantt v${"4.0.6"}`;
2783
+ const version = `gantt v${"4.0.7"}`;
2784
2784
  const warnLog = log.create('warn', version);
2785
2785
  const errLog = log.create('error', version);
2786
2786
  ;// ./packages/ui/index.ts
@@ -2791,7 +2791,7 @@ const {
2791
2791
  setIcon,
2792
2792
  checkVersion
2793
2793
  } = core_.VxeUI;
2794
- core_.VxeUI.ganttVersion = "4.0.6";
2794
+ core_.VxeUI.ganttVersion = "4.0.7";
2795
2795
  setConfig({
2796
2796
  gantt: {
2797
2797
  // size: null,
@@ -3335,10 +3335,12 @@ const {
3335
3335
  const refHeaderXSpace = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
3336
3336
  const renderVN = () => {
3337
3337
  const {
3338
- tableColumn,
3339
3338
  headerGroups,
3340
3339
  viewCellWidth
3341
3340
  } = reactData;
3341
+ const {
3342
+ visibleColumn
3343
+ } = internalData;
3342
3344
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
3343
3345
  ref: refElem,
3344
3346
  class: 'vxe-gantt-view--header-wrapper'
@@ -3352,7 +3354,7 @@ const {
3352
3354
  }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
3353
3355
  ref: refHeaderTable,
3354
3356
  class: 'vxe-gantt-view--header-table'
3355
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('colgroup', {}, tableColumn.map((column, cIndex) => {
3357
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('colgroup', {}, visibleColumn.map((column, cIndex) => {
3356
3358
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
3357
3359
  key: cIndex,
3358
3360
  style: {
@@ -3944,6 +3946,7 @@ const {
3944
3946
  function createInternalData() {
3945
3947
  return {
3946
3948
  xeTable: null,
3949
+ visibleColumn: [],
3947
3950
  startMaps: {},
3948
3951
  endMaps: {},
3949
3952
  chartMaps: {},
@@ -3958,16 +3961,9 @@ function createInternalData() {
3958
3961
  startIndex: 0,
3959
3962
  endIndex: 0
3960
3963
  },
3961
- // 存放纵向 Y 虚拟滚动相关信息
3962
- scrollYStore: {
3963
- preloadSize: 0,
3964
- offsetSize: 0,
3965
- visibleSize: 0,
3966
- visibleStartIndex: 0,
3967
- visibleEndIndex: 0,
3968
- startIndex: 0,
3969
- endIndex: 0
3970
- }
3964
+ // 最后滚动位置
3965
+ lastScrollTop: 0,
3966
+ lastScrollLeft: 0
3971
3967
  };
3972
3968
  }
3973
3969
  const maxYHeight = 5e6;
@@ -4012,6 +4008,8 @@ const maxYHeight = 5e6;
4012
4008
  scrollbarWidth: 0,
4013
4009
  // 横向滚动条的高度
4014
4010
  scrollbarHeight: 0,
4011
+ // 最后滚动时间戳
4012
+ lastScrollTime: 0,
4015
4013
  lazScrollLoading: false,
4016
4014
  scrollVMLoading: false,
4017
4015
  scrollYHeight: 0,
@@ -4061,9 +4059,14 @@ const maxYHeight = 5e6;
4061
4059
  minViewDate,
4062
4060
  maxViewDate
4063
4061
  } = reactData;
4062
+ const {
4063
+ scrollXStore
4064
+ } = internalData;
4064
4065
  const minScale = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(taskScaleList);
4065
4066
  const fullCols = [];
4066
4067
  const groupCols = [];
4068
+ scrollXStore.startIndex = 0;
4069
+ scrollXStore.endIndex = 1;
4067
4070
  if (minScale && minViewDate && maxViewDate) {
4068
4071
  const minSType = minScale.type;
4069
4072
  const weekScale = taskScaleList.find(item => item.type === 'week');
@@ -4086,37 +4089,37 @@ const maxYHeight = 5e6;
4086
4089
  const currTime = minViewDate.getTime();
4087
4090
  const diffDayNum = maxViewDate.getTime() - minViewDate.getTime();
4088
4091
  const countSize = Math.max(5, Math.floor(diffDayNum / gapTime) + 1);
4089
- switch (minScale.type) {
4090
- case 'day':
4091
- case 'date':
4092
- if (diffDayNum > 1000 * 60 * 60 * 24 * 366 * 3) {
4093
- reactData.tableColumn = [];
4094
- reactData.headerGroups = [];
4095
- return;
4096
- }
4097
- break;
4098
- case 'hour':
4099
- if (diffDayNum > 1000 * 60 * 60 * 24 * 31 * 3) {
4100
- reactData.tableColumn = [];
4101
- reactData.headerGroups = [];
4102
- return;
4103
- }
4104
- break;
4105
- case 'minute':
4106
- if (diffDayNum > 1000 * 60 * 60 * 24 * 3) {
4107
- reactData.tableColumn = [];
4108
- reactData.headerGroups = [];
4109
- return;
4110
- }
4111
- break;
4112
- case 'second':
4113
- if (diffDayNum > 1000 * 60 * 60 * 3) {
4114
- reactData.tableColumn = [];
4115
- reactData.headerGroups = [];
4116
- return;
4117
- }
4118
- break;
4119
- }
4092
+ // switch (minScale.type) {
4093
+ // case 'day':
4094
+ // case 'date':
4095
+ // if (diffDayNum > (1000 * 60 * 60 * 24 * 366 * 3)) {
4096
+ // reactData.tableColumn = []
4097
+ // reactData.headerGroups = []
4098
+ // return
4099
+ // }
4100
+ // break
4101
+ // case 'hour':
4102
+ // if (diffDayNum > (1000 * 60 * 60 * 24 * 31 * 3)) {
4103
+ // reactData.tableColumn = []
4104
+ // reactData.headerGroups = []
4105
+ // return
4106
+ // }
4107
+ // break
4108
+ // case 'minute':
4109
+ // if (diffDayNum > (1000 * 60 * 60 * 24 * 3)) {
4110
+ // reactData.tableColumn = []
4111
+ // reactData.headerGroups = []
4112
+ // return
4113
+ // }
4114
+ // break
4115
+ // case 'second':
4116
+ // if (diffDayNum > (1000 * 60 * 60 * 3)) {
4117
+ // reactData.tableColumn = []
4118
+ // reactData.headerGroups = []
4119
+ // return
4120
+ // }
4121
+ // break
4122
+ // }
4120
4123
  const renderListMaps = {
4121
4124
  year: [],
4122
4125
  quarter: [],
@@ -4316,8 +4319,10 @@ const maxYHeight = 5e6;
4316
4319
  internalData.chartMaps = ctMaps;
4317
4320
  }
4318
4321
  }
4319
- reactData.tableColumn = fullCols;
4322
+ internalData.visibleColumn = fullCols;
4320
4323
  reactData.headerGroups = groupCols;
4324
+ updateScrollXStatus();
4325
+ handleTableColumn();
4321
4326
  };
4322
4327
  const handleUpdateData = () => {
4323
4328
  const ganttProps = $xeGantt.props;
@@ -4429,11 +4434,12 @@ const maxYHeight = 5e6;
4429
4434
  const {
4430
4435
  scrollbarWidth,
4431
4436
  scrollbarHeight,
4432
- tableColumn,
4433
- headerGroups
4437
+ headerGroups,
4438
+ tableColumn
4434
4439
  } = reactData;
4435
4440
  const {
4436
- elemStore
4441
+ elemStore,
4442
+ visibleColumn
4437
4443
  } = internalData;
4438
4444
  const $xeTable = internalData.xeTable;
4439
4445
  const el = refElem.value;
@@ -4515,37 +4521,230 @@ const maxYHeight = 5e6;
4515
4521
  yBottomCornerEl.style.display = tFooterHeight ? 'block' : '';
4516
4522
  }
4517
4523
  const colInfoElem = refColInfoElem.value;
4524
+ let viewCellWidth = 40;
4518
4525
  if (colInfoElem) {
4519
- reactData.viewCellWidth = colInfoElem.clientWidth || 40;
4526
+ viewCellWidth = colInfoElem.clientWidth || 40;
4520
4527
  }
4521
- let viewTableWidth = reactData.viewCellWidth * tableColumn.length;
4528
+ let viewTableWidth = viewCellWidth * visibleColumn.length;
4522
4529
  if (bodyScrollElem) {
4523
4530
  const viewWidth = bodyScrollElem.clientWidth;
4524
4531
  const remainWidth = viewWidth - viewTableWidth;
4525
4532
  if (remainWidth > 0) {
4526
- reactData.viewCellWidth += Math.floor(remainWidth / tableColumn.length);
4533
+ viewCellWidth += Math.floor(remainWidth / visibleColumn.length);
4527
4534
  viewTableWidth = viewWidth;
4528
4535
  }
4529
4536
  }
4537
+ reactData.viewCellWidth = viewCellWidth;
4530
4538
  const headerTableElem = getRefElem(elemStore['main-header-table']);
4531
4539
  const bodyTableElem = getRefElem(elemStore['main-body-table']);
4540
+ const vmTableWidth = viewCellWidth * tableColumn.length;
4532
4541
  if (headerTableElem) {
4533
4542
  headerTableElem.style.width = `${viewTableWidth}px`;
4534
4543
  }
4535
4544
  if (bodyTableElem) {
4536
- bodyTableElem.style.width = `${viewTableWidth}px`;
4545
+ bodyTableElem.style.width = `${vmTableWidth}px`;
4537
4546
  }
4538
4547
  reactData.scrollXWidth = viewTableWidth;
4539
4548
  return updateChart();
4540
4549
  };
4541
- const handleLazyRecalculate = () => {
4550
+ const handleRecalculateStyle = () => {
4551
+ const el = refElem.value;
4552
+ internalData.rceRunTime = Date.now();
4553
+ if (!el || !el.clientWidth) {
4554
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
4555
+ }
4542
4556
  calcScrollbar();
4543
4557
  updateStyle();
4544
4558
  updateChart();
4559
+ return computeScrollLoad();
4560
+ };
4561
+ const handleLazyRecalculate = () => {
4562
+ return new Promise(resolve => {
4563
+ const {
4564
+ rceTimeout,
4565
+ rceRunTime
4566
+ } = internalData;
4567
+ const $xeTable = internalData.xeTable;
4568
+ let refreshDelay = 50;
4569
+ if ($xeTable) {
4570
+ const {
4571
+ computeResizeOpts
4572
+ } = $xeTable.getComputeMaps();
4573
+ const resizeOpts = computeResizeOpts.value;
4574
+ refreshDelay = resizeOpts.refreshDelay || 50;
4575
+ }
4576
+ if (rceTimeout) {
4577
+ clearTimeout(rceTimeout);
4578
+ if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
4579
+ resolve(handleRecalculateStyle());
4580
+ } else {
4581
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
4582
+ resolve();
4583
+ });
4584
+ }
4585
+ } else {
4586
+ resolve(handleRecalculateStyle());
4587
+ }
4588
+ internalData.rceTimeout = setTimeout(() => {
4589
+ internalData.rceTimeout = undefined;
4590
+ handleRecalculateStyle();
4591
+ }, refreshDelay);
4592
+ });
4593
+ };
4594
+ const computeScrollLoad = () => {
4595
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
4596
+ const {
4597
+ scrollXLoad
4598
+ } = reactData;
4599
+ const {
4600
+ scrollXStore
4601
+ } = internalData;
4602
+ // 计算 X 逻辑
4603
+ if (scrollXLoad) {
4604
+ const {
4605
+ toVisibleIndex: toXVisibleIndex,
4606
+ visibleSize: visibleXSize
4607
+ } = handleVirtualXVisible();
4608
+ const offsetXSize = 2;
4609
+ scrollXStore.preloadSize = 1;
4610
+ scrollXStore.offsetSize = offsetXSize;
4611
+ scrollXStore.visibleSize = visibleXSize;
4612
+ scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
4613
+ scrollXStore.visibleStartIndex = Math.max(scrollXStore.startIndex, toXVisibleIndex);
4614
+ scrollXStore.visibleEndIndex = Math.min(scrollXStore.endIndex, toXVisibleIndex + visibleXSize);
4615
+ updateScrollXData().then(() => {
4616
+ loadScrollXData();
4617
+ });
4618
+ } else {
4619
+ updateScrollXSpace();
4620
+ }
4621
+ });
4622
+ };
4623
+ const handleVirtualXVisible = () => {
4624
+ const {
4625
+ viewCellWidth
4626
+ } = reactData;
4627
+ const {
4628
+ elemStore
4629
+ } = internalData;
4630
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
4631
+ if (bodyScrollElem) {
4632
+ const clientWidth = bodyScrollElem.clientWidth;
4633
+ const scrollLeft = bodyScrollElem.scrollLeft;
4634
+ const toVisibleIndex = Math.floor(scrollLeft / viewCellWidth) - 1;
4635
+ const visibleSize = Math.ceil(clientWidth / viewCellWidth) + 1;
4636
+ return {
4637
+ toVisibleIndex: Math.max(0, toVisibleIndex),
4638
+ visibleSize: Math.max(1, visibleSize)
4639
+ };
4640
+ }
4641
+ return {
4642
+ toVisibleIndex: 0,
4643
+ visibleSize: 6
4644
+ };
4645
+ };
4646
+ const loadScrollXData = () => {
4647
+ const {
4648
+ isScrollXBig
4649
+ } = reactData;
4650
+ const {
4651
+ scrollXStore
4652
+ } = internalData;
4653
+ const {
4654
+ preloadSize,
4655
+ startIndex,
4656
+ endIndex,
4657
+ offsetSize
4658
+ } = scrollXStore;
4659
+ const {
4660
+ toVisibleIndex,
4661
+ visibleSize
4662
+ } = handleVirtualXVisible();
4663
+ const offsetItem = {
4664
+ startIndex: Math.max(0, isScrollXBig ? toVisibleIndex - 1 : toVisibleIndex - 1 - offsetSize - preloadSize),
4665
+ endIndex: isScrollXBig ? toVisibleIndex + visibleSize : toVisibleIndex + visibleSize + offsetSize + preloadSize
4666
+ };
4667
+ scrollXStore.visibleStartIndex = toVisibleIndex - 1;
4668
+ scrollXStore.visibleEndIndex = toVisibleIndex + visibleSize + 1;
4669
+ const {
4670
+ startIndex: offsetStartIndex,
4671
+ endIndex: offsetEndIndex
4672
+ } = offsetItem;
4673
+ if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
4674
+ if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
4675
+ scrollXStore.startIndex = offsetStartIndex;
4676
+ scrollXStore.endIndex = offsetEndIndex;
4677
+ updateScrollXData();
4678
+ }
4679
+ }
4680
+ };
4681
+ const updateScrollXData = () => {
4682
+ handleTableColumn();
4683
+ updateScrollXSpace();
4684
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
4685
+ };
4686
+ const updateScrollXStatus = () => {
4687
+ const scrollXLoad = true;
4688
+ reactData.scrollXLoad = scrollXLoad;
4689
+ return scrollXLoad;
4690
+ };
4691
+ const handleTableColumn = () => {
4692
+ const {
4693
+ scrollXLoad
4694
+ } = reactData;
4695
+ const {
4696
+ visibleColumn,
4697
+ scrollXStore
4698
+ } = internalData;
4699
+ const tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
4700
+ reactData.tableColumn = tableColumn;
4701
+ };
4702
+ const updateScrollXSpace = () => {
4703
+ const {
4704
+ scrollXLoad,
4705
+ scrollXWidth,
4706
+ viewCellWidth
4707
+ } = reactData;
4708
+ const {
4709
+ elemStore,
4710
+ scrollXStore
4711
+ } = internalData;
4712
+ const bodyTableElem = getRefElem(elemStore['main-body-table']);
4713
+ // const headerTableElem = getRefElem(elemStore['main-header-table'])
4714
+ // const footerTableElem = getRefElem(elemStore['main-footer-table'])
4715
+ const {
4716
+ startIndex
4717
+ } = scrollXStore;
4718
+ let xSpaceLeft = 0;
4719
+ if (scrollXLoad) {
4720
+ xSpaceLeft = Math.max(0, startIndex * viewCellWidth);
4721
+ }
4722
+ // if (headerTableElem) {
4723
+ // headerTableElem.style.transform = `translate(${xSpaceLeft}px, 0px)`
4724
+ // }
4725
+ if (bodyTableElem) {
4726
+ bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`;
4727
+ }
4728
+ // if (footerTableElem) {
4729
+ // footerTableElem.style.transform = `translate(${xSpaceLeft}px, 0px)`
4730
+ // }
4731
+ const layoutList = ['header', 'body', 'footer'];
4732
+ layoutList.forEach(layout => {
4733
+ const xSpaceElem = getRefElem(elemStore[`main-${layout}-xSpace`]);
4734
+ if (xSpaceElem) {
4735
+ xSpaceElem.style.width = scrollXLoad ? `${scrollXWidth}px` : '';
4736
+ }
4737
+ });
4738
+ const scrollXSpaceEl = refScrollXSpaceElem.value;
4739
+ if (scrollXSpaceEl) {
4740
+ scrollXSpaceEl.style.width = `${scrollXWidth}px`;
4741
+ }
4742
+ calcScrollbar();
4545
4743
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
4546
4744
  };
4547
- // const updateScrollXSpace = () => {
4548
- // }
4745
+ const triggerScrollXEvent = () => {
4746
+ loadScrollXData();
4747
+ };
4549
4748
  const updateScrollYSpace = () => {
4550
4749
  const {
4551
4750
  elemStore
@@ -4623,6 +4822,13 @@ const maxYHeight = 5e6;
4623
4822
  };
4624
4823
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4625
4824
  const handleScrollEvent = (evnt, isRollY, isRollX, scrollTop, scrollLeft) => {
4825
+ if (isRollX) {
4826
+ internalData.lastScrollLeft = scrollLeft;
4827
+ }
4828
+ if (isRollY) {
4829
+ internalData.lastScrollTop = scrollTop;
4830
+ }
4831
+ reactData.lastScrollTime = Date.now();
4626
4832
  checkLastSyncScroll(isRollX, isRollY);
4627
4833
  };
4628
4834
  const ganttViewMethods = {
@@ -4728,11 +4934,16 @@ const maxYHeight = 5e6;
4728
4934
  }
4729
4935
  },
4730
4936
  triggerBodyScrollEvent(evnt) {
4937
+ const {
4938
+ scrollXLoad
4939
+ } = reactData;
4731
4940
  const {
4732
4941
  elemStore,
4733
4942
  inVirtualScroll,
4734
4943
  inHeaderScroll,
4735
- inFooterScroll
4944
+ inFooterScroll,
4945
+ lastScrollLeft,
4946
+ lastScrollTop
4736
4947
  } = internalData;
4737
4948
  if (inVirtualScroll) {
4738
4949
  return;
@@ -4744,40 +4955,46 @@ const maxYHeight = 5e6;
4744
4955
  const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
4745
4956
  const xHandleEl = refScrollXHandleElem.value;
4746
4957
  const yHandleEl = refScrollYHandleElem.value;
4747
- if (headerScrollElem && wrapperEl) {
4748
- const isRollX = true;
4749
- const isRollY = true;
4750
- const currLeftNum = wrapperEl.scrollLeft;
4751
- const currTopNum = wrapperEl.scrollTop;
4752
- internalData.inBodyScroll = true;
4753
- setScrollLeft(xHandleEl, currLeftNum);
4754
- setScrollLeft(headerScrollElem, currLeftNum);
4755
- setScrollTop(yHandleEl, currTopNum);
4756
- syncTableScrollTop(currTopNum);
4757
- handleScrollEvent(evnt, isRollY, isRollX, wrapperEl.scrollTop, currLeftNum);
4958
+ const scrollLeft = wrapperEl.scrollLeft;
4959
+ const scrollTop = wrapperEl.scrollTop;
4960
+ const isRollX = scrollLeft !== lastScrollLeft;
4961
+ const isRollY = scrollTop !== lastScrollTop;
4962
+ internalData.inBodyScroll = true;
4963
+ internalData.scrollRenderType = '';
4964
+ if (isRollY) {
4965
+ setScrollTop(yHandleEl, scrollTop);
4966
+ syncTableScrollTop(scrollTop);
4758
4967
  }
4759
- },
4760
- triggerFooterScrollEvent(evnt) {
4761
- const {
4762
- inVirtualScroll,
4763
- inHeaderScroll,
4764
- inBodyScroll
4765
- } = internalData;
4766
- if (inVirtualScroll) {
4767
- return;
4768
- }
4769
- if (inHeaderScroll || inBodyScroll) {
4770
- return;
4771
- }
4772
- const wrapperEl = evnt.currentTarget;
4773
- if (wrapperEl) {
4774
- const isRollX = true;
4775
- const isRollY = false;
4776
- const currLeftNum = wrapperEl.scrollLeft;
4777
- handleScrollEvent(evnt, isRollY, isRollX, wrapperEl.scrollTop, currLeftNum);
4968
+ if (isRollX) {
4969
+ internalData.inBodyScroll = true;
4970
+ setScrollLeft(xHandleEl, scrollLeft);
4971
+ setScrollLeft(headerScrollElem, scrollLeft);
4972
+ if (scrollXLoad) {
4973
+ triggerScrollXEvent();
4974
+ }
4778
4975
  }
4976
+ handleScrollEvent(evnt, isRollY, isRollX, wrapperEl.scrollTop, scrollLeft);
4779
4977
  },
4978
+ // triggerFooterScrollEvent (evnt) {
4979
+ // const { inVirtualScroll, inHeaderScroll, inBodyScroll } = internalData
4980
+ // if (inVirtualScroll) {
4981
+ // return
4982
+ // }
4983
+ // if (inHeaderScroll || inBodyScroll) {
4984
+ // return
4985
+ // }
4986
+ // const wrapperEl = evnt.currentTarget as HTMLDivElement
4987
+ // if (wrapperEl) {
4988
+ // const isRollX = true
4989
+ // const isRollY = false
4990
+ // const currLeftNum = wrapperEl.scrollLeft
4991
+ // handleScrollEvent(evnt, isRollY, isRollX, wrapperEl.scrollTop, currLeftNum)
4992
+ // }
4993
+ // },
4780
4994
  triggerVirtualScrollXEvent(evnt) {
4995
+ const {
4996
+ scrollXLoad
4997
+ } = reactData;
4781
4998
  const {
4782
4999
  elemStore,
4783
5000
  inHeaderScroll,
@@ -4796,6 +5013,9 @@ const maxYHeight = 5e6;
4796
5013
  internalData.inVirtualScroll = true;
4797
5014
  setScrollLeft(headerScrollElem, currLeftNum);
4798
5015
  setScrollLeft(bodyScrollElem, currLeftNum);
5016
+ if (scrollXLoad) {
5017
+ triggerScrollXEvent();
5018
+ }
4799
5019
  handleScrollEvent(evnt, isRollY, isRollX, wrapperEl.scrollTop, currLeftNum);
4800
5020
  }
4801
5021
  },
@@ -4821,28 +5041,11 @@ const maxYHeight = 5e6;
4821
5041
  }
4822
5042
  },
4823
5043
  handleUpdateSXSpace() {
4824
- const {
4825
- scrollXLoad,
4826
- scrollXWidth
4827
- } = reactData;
4828
- const {
4829
- elemStore
4830
- } = internalData;
4831
- const layoutList = ['header', 'body', 'footer'];
4832
- layoutList.forEach(layout => {
4833
- const xSpaceElem = getRefElem(elemStore[`main-${layout}-xSpace`]);
4834
- if (xSpaceElem) {
4835
- xSpaceElem.style.width = scrollXLoad ? `${scrollXWidth}px` : '';
4836
- }
4837
- });
4838
- const scrollXSpaceEl = refScrollXSpaceElem.value;
4839
- if (scrollXSpaceEl) {
4840
- scrollXSpaceEl.style.width = `${scrollXWidth}px`;
4841
- }
4842
- calcScrollbar();
4843
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
5044
+ return updateScrollXSpace();
5045
+ },
5046
+ handleUpdateSYSpace() {
5047
+ return updateScrollYSpace();
4844
5048
  },
4845
- handleUpdateSYSpace: updateScrollYSpace,
4846
5049
  handleUpdateSYStatus(sYLoad) {
4847
5050
  reactData.scrollYLoad = sYLoad;
4848
5051
  }
@@ -5792,20 +5995,20 @@ function getViewTypeLevel(type) {
5792
5995
  let tipHeight = 0;
5793
5996
  if (rsNumLeftEl) {
5794
5997
  if (offsetLeft < 0) {
5998
+ rsNumLeftEl.style.display = 'none';
5999
+ } else {
5795
6000
  rsNumLeftEl.textContent = `${targetTableWidth}px`;
5796
6001
  rsNumLeftEl.style.display = 'block';
5797
6002
  tipHeight = rsNumLeftEl.offsetHeight;
5798
- } else {
5799
- rsNumLeftEl.style.display = 'none';
5800
6003
  }
5801
6004
  }
5802
6005
  if (rsNumRightEl) {
5803
6006
  if (offsetLeft < 0) {
5804
- rsNumRightEl.style.display = 'none';
5805
- } else {
5806
6007
  rsNumRightEl.textContent = `${Math.floor(containerRect.width - targetTableWidth)}px`;
5807
6008
  rsNumRightEl.style.display = 'block';
5808
6009
  tipHeight = rsNumRightEl.offsetHeight;
6010
+ } else {
6011
+ rsNumRightEl.style.display = 'none';
5809
6012
  }
5810
6013
  }
5811
6014
  const tipTop = evnt.clientY - containerRect.top - tipHeight / 2;
@@ -7069,9 +7272,9 @@ function getViewTypeLevel(type) {
7069
7272
  class: 'vxe-gantt--resizable-split-tip-number'
7070
7273
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7071
7274
  class: 'vxe-gantt--resizable-split-number-left'
7072
- }, '10px'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7275
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7073
7276
  class: 'vxe-gantt--resizable-split-number-right'
7074
- }, '20px')])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7277
+ })])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7075
7278
  class: 'vxe-gantt--border-line'
7076
7279
  })]));
7077
7280
  break;