vxe-table 3.11.4 → 3.11.6-beta.0

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 (58) hide show
  1. package/es/index.css +1 -0
  2. package/es/index.min.css +1 -0
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/filter/mixin.js +23 -2
  6. package/es/table/module/filter/panel.js +3 -6
  7. package/es/table/src/body.js +55 -30
  8. package/es/table/src/footer.js +30 -22
  9. package/es/table/src/methods.js +253 -109
  10. package/es/table/src/table.js +11 -3
  11. package/es/table/style.css +48 -3
  12. package/es/table/style.min.css +1 -1
  13. package/es/ui/index.js +2 -2
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-table/style.css +48 -3
  16. package/es/vxe-table/style.min.css +1 -1
  17. package/lib/index.css +1 -0
  18. package/lib/index.min.css +1 -0
  19. package/lib/index.umd.js +436 -196
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/style.css +1 -1
  22. package/lib/style.min.css +1 -1
  23. package/lib/table/module/filter/mixin.js +25 -2
  24. package/lib/table/module/filter/mixin.min.js +1 -1
  25. package/lib/table/module/filter/panel.js +3 -7
  26. package/lib/table/module/filter/panel.min.js +1 -1
  27. package/lib/table/src/body.js +65 -32
  28. package/lib/table/src/body.min.js +1 -1
  29. package/lib/table/src/footer.js +32 -23
  30. package/lib/table/src/footer.min.js +1 -1
  31. package/lib/table/src/methods.js +293 -127
  32. package/lib/table/src/methods.min.js +1 -1
  33. package/lib/table/src/table.js +16 -2
  34. package/lib/table/src/table.min.js +1 -1
  35. package/lib/table/style/style.css +48 -3
  36. package/lib/table/style/style.min.css +1 -1
  37. package/lib/ui/index.js +2 -2
  38. package/lib/ui/index.min.js +1 -1
  39. package/lib/ui/src/log.js +1 -1
  40. package/lib/ui/src/log.min.js +1 -1
  41. package/lib/vxe-table/style/style.css +48 -3
  42. package/lib/vxe-table/style/style.min.css +1 -1
  43. package/package.json +2 -2
  44. package/packages/table/module/filter/mixin.ts +26 -2
  45. package/packages/table/module/filter/panel.ts +3 -6
  46. package/packages/table/src/body.ts +66 -27
  47. package/packages/table/src/footer.ts +33 -21
  48. package/packages/table/src/methods.ts +266 -112
  49. package/packages/table/src/table.ts +11 -3
  50. package/packages/ui/index.ts +1 -1
  51. package/packages/ui/src/dom.ts +2 -2
  52. package/styles/components/table.scss +38 -3
  53. /package/es/{iconfont.1732091003142.ttf → iconfont.1732505453169.ttf} +0 -0
  54. /package/es/{iconfont.1732091003142.woff → iconfont.1732505453169.woff} +0 -0
  55. /package/es/{iconfont.1732091003142.woff2 → iconfont.1732505453169.woff2} +0 -0
  56. /package/lib/{iconfont.1732091003142.ttf → iconfont.1732505453169.ttf} +0 -0
  57. /package/lib/{iconfont.1732091003142.woff → iconfont.1732505453169.woff} +0 -0
  58. /package/lib/{iconfont.1732091003142.woff2 → iconfont.1732505453169.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.11.4";
2223
+ const version = "3.11.6-beta.0";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2251,7 +2251,7 @@ core_.VxeUI.setConfig({
2251
2251
  // keyField: '_X_ROW_KEY' // 行数据的唯一主键字段名
2252
2252
  // },
2253
2253
  resizeConfig: {
2254
- refreshDelay: 250
2254
+ // refreshDelay: 250
2255
2255
  },
2256
2256
  radioConfig: {
2257
2257
  // trigger: 'default'
@@ -2774,7 +2774,7 @@ function isNodeElement(elem) {
2774
2774
  const {
2775
2775
  log: log_log
2776
2776
  } = core_.VxeUI;
2777
- const log_version = `table v${"3.11.4"}`;
2777
+ const log_version = `table v${"3.11.6-beta.0"}`;
2778
2778
  const warnLog = log_log.create('warn', log_version);
2779
2779
  const errLog = log_log.create('error', log_version);
2780
2780
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4844,8 +4844,8 @@ const {
4844
4844
  interceptor: methods_interceptor,
4845
4845
  createEvent
4846
4846
  } = core_.VxeUI;
4847
- const isWebkit = browse['-webkit'] && !browse.edge;
4848
- const debounceScrollYDuration = browse.msie ? 80 : 20;
4847
+ // const isWebkit = browse['-webkit'] && !browse.edge
4848
+ // const debounceScrollYDuration = browse.msie ? 80 : 20
4849
4849
  const customStorageKey = 'VXE_CUSTOM_STORE';
4850
4850
  // 获取所有的列,排除分组
4851
4851
  const getColumnList = columns => {
@@ -4952,28 +4952,30 @@ function handleVirtualXVisible(_vm) {
4952
4952
  };
4953
4953
  }
4954
4954
  const computeRowHeight = $xeTable => {
4955
+ const props = $xeTable;
4955
4956
  const {
4956
- $refs,
4957
- computeSize
4958
- } = $xeTable;
4959
- const tableHeader = $refs.tableHeader;
4960
- const tableBody = $refs.tableBody;
4957
+ showOverflow
4958
+ } = props;
4959
+ const tableHeader = $xeTable.$refs.tableHeader;
4960
+ const tableBody = $xeTable.$refs.tableBody;
4961
4961
  const tableBodyElem = tableBody ? tableBody.$el : null;
4962
- const vSize = computeSize;
4962
+ const vSize = $xeTable.computeSize;
4963
4963
  const rowHeightMaps = $xeTable.rowHeightMaps;
4964
4964
  let rowHeight = 0;
4965
- if (tableBodyElem) {
4966
- const tableHeaderElem = tableHeader ? tableHeader.$el : null;
4967
- let firstTrElem;
4968
- firstTrElem = tableBodyElem.querySelector('tr');
4969
- if (!firstTrElem && tableHeaderElem) {
4970
- firstTrElem = tableHeaderElem.querySelector('tr');
4971
- }
4972
- if (firstTrElem) {
4973
- rowHeight = firstTrElem.clientHeight;
4974
- }
4975
- if (!rowHeight) {
4976
- rowHeight = rowHeightMaps[vSize || 'default'];
4965
+ if (showOverflow) {
4966
+ if (tableBodyElem) {
4967
+ const tableHeaderElem = tableHeader ? tableHeader.$el : null;
4968
+ let firstTrElem;
4969
+ firstTrElem = tableBodyElem.querySelector('tr');
4970
+ if (!firstTrElem && tableHeaderElem) {
4971
+ firstTrElem = tableHeaderElem.querySelector('tr');
4972
+ }
4973
+ if (firstTrElem) {
4974
+ rowHeight = firstTrElem.clientHeight;
4975
+ }
4976
+ if (!rowHeight) {
4977
+ rowHeight = rowHeightMaps[vSize || 'default'];
4978
+ }
4977
4979
  }
4978
4980
  }
4979
4981
  return rowHeight;
@@ -5163,24 +5165,50 @@ function calcTableHeight(_vm, key) {
5163
5165
  return num;
5164
5166
  }
5165
5167
  const calcCellHeight = $xeTable => {
5168
+ const props = $xeTable;
5169
+ const reactData = $xeTable;
5170
+ const internalData = $xeTable;
5171
+ const {
5172
+ showOverflow
5173
+ } = props;
5166
5174
  const {
5167
5175
  tableData,
5168
- scrollYLoad,
5176
+ scrollXLoad,
5177
+ scrollYLoad
5178
+ } = reactData;
5179
+ const {
5169
5180
  fullAllDataRowIdData
5170
- } = $xeTable;
5181
+ } = internalData;
5171
5182
  const el = $xeTable.$el;
5172
- if (scrollYLoad && el) {
5183
+ if (!showOverflow && (scrollXLoad || scrollYLoad) && el) {
5184
+ let paddingTop = 0;
5185
+ let paddingBottom = 0;
5186
+ let calcPadding = false;
5173
5187
  tableData.forEach(row => {
5174
5188
  const rowid = getRowid($xeTable, row);
5175
- const rest = fullAllDataRowIdData[rowid];
5189
+ const rowRest = fullAllDataRowIdData[rowid];
5176
5190
  const trList = el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`);
5177
- if (rest && trList.length) {
5191
+ if (rowRest && trList.length) {
5178
5192
  let height = 0;
5179
5193
  for (let i = 0; i < trList.length; i++) {
5180
5194
  const trEl = trList[i];
5181
- height = Math.max(height, trEl.offsetHeight);
5195
+ const tdList = trEl.children;
5196
+ for (let j = 0; j < tdList.length; j++) {
5197
+ const tdEl = tdList[j];
5198
+ const cellElem = tdEl.querySelector('.vxe-cell');
5199
+ if (!calcPadding) {
5200
+ paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingTop);
5201
+ paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingBottom);
5202
+ calcPadding = true;
5203
+ }
5204
+ let cellHeight = paddingTop + paddingBottom;
5205
+ if (cellElem) {
5206
+ cellHeight += cellElem.offsetHeight;
5207
+ }
5208
+ height = Math.max(height, cellHeight);
5209
+ }
5182
5210
  }
5183
- rest.height = height;
5211
+ rowRest.height = height;
5184
5212
  }
5185
5213
  });
5186
5214
  }
@@ -5360,6 +5388,53 @@ const handleScrollToRowColumn = ($xeTable, fieldOrColumn, row) => {
5360
5388
  }
5361
5389
  return $xeTable.$nextTick();
5362
5390
  };
5391
+ function handleRecalculateLayout($xeTable, reFull) {
5392
+ const el = $xeTable.$refs.refElem;
5393
+ if (!el || !el.clientWidth) {
5394
+ return $xeTable.$nextTick();
5395
+ }
5396
+ calcCellHeight($xeTable);
5397
+ $xeTable.calcCellWidth();
5398
+ $xeTable.autoCellWidth();
5399
+ if (reFull === true) {
5400
+ // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
5401
+ return $xeTable.computeScrollLoad().then(() => {
5402
+ calcCellHeight($xeTable);
5403
+ $xeTable.calcCellWidth();
5404
+ $xeTable.autoCellWidth();
5405
+ return $xeTable.computeScrollLoad();
5406
+ });
5407
+ }
5408
+ return $xeTable.computeScrollLoad();
5409
+ }
5410
+ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
5411
+ const reactData = $xeTable;
5412
+ const internalData = $xeTable;
5413
+ const {
5414
+ scrollXLoad,
5415
+ scrollYLoad
5416
+ } = reactData;
5417
+ const {
5418
+ lcsTimeout
5419
+ } = internalData;
5420
+ if (lcsTimeout) {
5421
+ clearTimeout(lcsTimeout);
5422
+ }
5423
+ internalData.lcsTimeout = setTimeout(() => {
5424
+ internalData.lcsTimeout = undefined;
5425
+ internalData.inVirtualScroll = false;
5426
+ internalData.inBodyScroll = false;
5427
+ internalData.bodyScrollType = '';
5428
+ internalData.inFooterScroll = false;
5429
+ if (isRollX && scrollXLoad) {
5430
+ $xeTable.updateScrollXData();
5431
+ }
5432
+ if (isRollY && scrollYLoad) {
5433
+ $xeTable.updateScrollYData();
5434
+ }
5435
+ $xeTable.updateCellAreas();
5436
+ }, 200);
5437
+ }
5363
5438
  const Methods = {
5364
5439
  callSlot(slotFunc, params, h, vNodes) {
5365
5440
  if (slotFunc) {
@@ -7709,22 +7784,22 @@ const Methods = {
7709
7784
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
7710
7785
  */
7711
7786
  recalculate(reFull) {
7712
- const el = this.$el;
7713
- if (!el || !el.clientWidth) {
7714
- return this.$nextTick();
7715
- }
7716
- calcCellHeight(this);
7717
- this.calcCellWidth();
7718
- this.autoCellWidth();
7719
- if (reFull === true) {
7720
- // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
7721
- return this.computeScrollLoad().then(() => {
7722
- calcCellHeight(this);
7723
- this.autoCellWidth();
7724
- return this.computeScrollLoad();
7725
- });
7787
+ const $xeTable = this;
7788
+ const internalData = $xeTable;
7789
+ const {
7790
+ rceTimeout
7791
+ } = internalData;
7792
+ if (rceTimeout) {
7793
+ clearTimeout(rceTimeout);
7794
+ } else {
7795
+ handleRecalculateLayout($xeTable, !!reFull);
7726
7796
  }
7727
- return this.computeScrollLoad();
7797
+ return new Promise(resolve => {
7798
+ internalData.rceTimeout = setTimeout(() => {
7799
+ internalData.rceTimeout = undefined;
7800
+ resolve(handleRecalculateLayout($xeTable, !!reFull));
7801
+ }, 20);
7802
+ });
7728
7803
  },
7729
7804
  calcCellWidth() {
7730
7805
  const $xeTable = this;
@@ -7937,17 +8012,25 @@ const Methods = {
7937
8012
  },
7938
8013
  calcCellHeight() {
7939
8014
  const $xeTable = this;
8015
+ const props = $xeTable;
7940
8016
  const reactData = $xeTable;
7941
8017
  const internalData = $xeTable;
8018
+ const {
8019
+ showOverflow
8020
+ } = props;
7942
8021
  const {
7943
8022
  tableData,
8023
+ scrollXLoad,
7944
8024
  scrollYLoad
7945
8025
  } = reactData;
7946
8026
  const {
7947
8027
  fullAllDataRowIdData
7948
8028
  } = internalData;
7949
8029
  const el = $xeTable.$el;
7950
- if (scrollYLoad && el) {
8030
+ if (!showOverflow && (scrollXLoad || scrollYLoad) && el) {
8031
+ let paddingTop = 0;
8032
+ let paddingBottom = 0;
8033
+ let calcPadding = false;
7951
8034
  tableData.forEach(row => {
7952
8035
  const rowid = getRowid($xeTable, row);
7953
8036
  const rowRest = fullAllDataRowIdData[rowid];
@@ -7956,7 +8039,21 @@ const Methods = {
7956
8039
  let height = 0;
7957
8040
  for (let i = 0; i < trList.length; i++) {
7958
8041
  const trEl = trList[i];
7959
- height = Math.max(height, trEl.offsetHeight);
8042
+ const tdList = trEl.children;
8043
+ for (let j = 0; j < tdList.length; j++) {
8044
+ const tdEl = tdList[j];
8045
+ const cellElem = tdEl.querySelector('.vxe-cell');
8046
+ if (!calcPadding) {
8047
+ paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingTop);
8048
+ paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingBottom);
8049
+ calcPadding = true;
8050
+ }
8051
+ let cellHeight = paddingTop + paddingBottom;
8052
+ if (cellElem) {
8053
+ cellHeight += cellElem.offsetHeight;
8054
+ }
8055
+ height = Math.max(height, cellHeight);
8056
+ }
7960
8057
  }
7961
8058
  rowRest.height = height;
7962
8059
  }
@@ -11860,18 +11957,17 @@ const Methods = {
11860
11957
  scrollLeft: bodyElem.scrollLeft
11861
11958
  };
11862
11959
  },
11863
- /**
11864
- * 横向 X 可视渲染事件处理
11865
- */
11866
- triggerScrollXEvent() {
11867
- this.loadScrollXData();
11868
- },
11869
11960
  loadScrollXData() {
11961
+ const $xeTable = this;
11962
+ const reactData = $xeTable;
11963
+ const internalData = $xeTable;
11870
11964
  const {
11871
11965
  mergeList,
11872
- mergeFooterList,
11966
+ mergeFooterList
11967
+ } = reactData;
11968
+ const {
11873
11969
  scrollXStore
11874
- } = this;
11970
+ } = internalData;
11875
11971
  const {
11876
11972
  startIndex,
11877
11973
  endIndex,
@@ -11880,7 +11976,7 @@ const Methods = {
11880
11976
  const {
11881
11977
  toVisibleIndex,
11882
11978
  visibleSize
11883
- } = handleVirtualXVisible(this);
11979
+ } = handleVirtualXVisible($xeTable);
11884
11980
  const offsetItem = {
11885
11981
  startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
11886
11982
  endIndex: toVisibleIndex + visibleSize + offsetSize
@@ -11894,10 +11990,10 @@ const Methods = {
11894
11990
  if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
11895
11991
  scrollXStore.startIndex = offsetStartIndex;
11896
11992
  scrollXStore.endIndex = offsetEndIndex;
11897
- this.updateScrollXData();
11993
+ $xeTable.updateScrollXData();
11898
11994
  }
11899
11995
  }
11900
- this.closeTooltip();
11996
+ $xeTable.closeTooltip();
11901
11997
  },
11902
11998
  handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
11903
11999
  const $xeTable = this;
@@ -11948,7 +12044,6 @@ const Methods = {
11948
12044
  }
11949
12045
  $xeTable.checkScrolling();
11950
12046
  internalData.lastScrollLeft = scrollLeft;
11951
- reactData.lastScrollTime = Date.now();
11952
12047
  } else {
11953
12048
  const yThreshold = $xeTable.computeScrollYThreshold;
11954
12049
  isTop = scrollTop <= 0;
@@ -11967,8 +12062,8 @@ const Methods = {
11967
12062
  }
11968
12063
  }
11969
12064
  internalData.lastScrollTop = scrollTop;
11970
- reactData.lastScrollTime = Date.now();
11971
12065
  }
12066
+ reactData.lastScrollTime = Date.now();
11972
12067
  const evntParams = {
11973
12068
  scrollTop,
11974
12069
  scrollLeft,
@@ -11985,6 +12080,7 @@ const Methods = {
11985
12080
  direction,
11986
12081
  ...params
11987
12082
  };
12083
+ checkLastSyncScroll($xeTable, isRollX, isRollY);
11988
12084
  if (rowOpts.isHover || highlightHoverRow) {
11989
12085
  $xeTable.clearHoverRow();
11990
12086
  }
@@ -11999,46 +12095,99 @@ const Methods = {
11999
12095
  }
12000
12096
  $xeTable.dispatchEvent('scroll', evntParams, evnt);
12001
12097
  },
12002
- /**
12003
- * 纵向 Y 可视渲染事件处理
12004
- */
12005
- triggerScrollYEvent() {
12098
+ lazyScrollXData() {
12099
+ const $xeTable = this;
12100
+ const internalData = $xeTable;
12101
+ const {
12102
+ lxTimeout,
12103
+ lxRunTime,
12104
+ scrollXStore
12105
+ } = internalData;
12106
+ const {
12107
+ visibleSize
12108
+ } = scrollXStore;
12109
+ const fpsTime = Math.min(80, Math.floor(visibleSize * 3));
12110
+ if (lxTimeout) {
12111
+ clearTimeout(lxTimeout);
12112
+ }
12113
+ if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
12114
+ internalData.lxRunTime = Date.now();
12115
+ $xeTable.loadScrollXData();
12116
+ }
12117
+ internalData.lxTimeout = setTimeout(() => {
12118
+ internalData.lxRunTime = undefined;
12119
+ internalData.lxRunTime = undefined;
12120
+ $xeTable.loadScrollXData();
12121
+ }, fpsTime);
12122
+ },
12123
+ lazyScrollYData() {
12124
+ const $xeTable = this;
12125
+ const internalData = $xeTable;
12006
12126
  const {
12127
+ lyTimeout,
12128
+ lyRunTime,
12007
12129
  scrollYStore
12008
- } = this;
12130
+ } = internalData;
12009
12131
  const {
12010
- adaptive,
12011
- offsetSize,
12012
12132
  visibleSize
12013
12133
  } = scrollYStore;
12014
- // webkit 浏览器使用最佳的渲染方式,且最高渲染量不能大于 40 条
12015
- if (isWebkit && adaptive && offsetSize * 2 + visibleSize <= 40) {
12016
- this.loadScrollYData();
12134
+ const fpsTime = Math.min(80, Math.floor(visibleSize * 2));
12135
+ if (lyTimeout) {
12136
+ clearTimeout(lyTimeout);
12137
+ }
12138
+ if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
12139
+ internalData.lyRunTime = Date.now();
12140
+ $xeTable.loadScrollYData();
12141
+ }
12142
+ internalData.lyTimeout = setTimeout(() => {
12143
+ internalData.lyTimeout = undefined;
12144
+ internalData.lyRunTime = undefined;
12145
+ $xeTable.loadScrollYData();
12146
+ }, fpsTime);
12147
+ },
12148
+ /**
12149
+ * 横向 X 可视渲染事件处理
12150
+ */
12151
+ triggerScrollXEvent() {
12152
+ const $xeTable = this;
12153
+ const sXOpts = $xeTable.computeSXOpts;
12154
+ if (sXOpts.immediate) {
12155
+ $xeTable.loadScrollXData();
12156
+ } else {
12157
+ $xeTable.lazyScrollXData();
12158
+ }
12159
+ },
12160
+ /**
12161
+ * 纵向 Y 可视渲染事件处理
12162
+ */
12163
+ triggerScrollYEvent() {
12164
+ const $xeTable = this;
12165
+ const sYOpts = $xeTable.computeSYOpts;
12166
+ if (sYOpts.immediate) {
12167
+ $xeTable.loadScrollYData();
12017
12168
  } else {
12018
- this.debounceScrollYData();
12169
+ $xeTable.lazyScrollYData();
12019
12170
  }
12020
- this.debounceScrollYCalculate();
12021
12171
  },
12022
- debounceScrollYData: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(function () {
12023
- this.loadScrollYData();
12024
- }, debounceScrollYDuration, {
12025
- leading: false,
12026
- trailing: true
12027
- }),
12028
- handleSyncScrollX(scrollLeft) {
12172
+ scrollXEvent(evnt) {
12029
12173
  const $xeTable = this;
12174
+ const internalData = $xeTable;
12175
+ const {
12176
+ inFooterScroll,
12177
+ inBodyScroll
12178
+ } = internalData;
12179
+ if (inFooterScroll) {
12180
+ return;
12181
+ }
12182
+ if (inBodyScroll) {
12183
+ return;
12184
+ }
12030
12185
  const tableHeader = $xeTable.$refs.tableHeader;
12031
12186
  const tableBody = $xeTable.$refs.tableBody;
12032
12187
  const tableFooter = $xeTable.$refs.tableFooter;
12033
12188
  const bodyElem = tableBody.$el;
12034
12189
  const headerElem = tableHeader ? tableHeader.$el : null;
12035
12190
  const footerElem = tableFooter ? tableFooter.$el : null;
12036
- setScrollLeft(bodyElem, scrollLeft);
12037
- setScrollLeft(headerElem, scrollLeft);
12038
- setScrollLeft(footerElem, scrollLeft);
12039
- },
12040
- scrollXEvent(evnt) {
12041
- const $xeTable = this;
12042
12191
  const wrapperEl = evnt.currentTarget;
12043
12192
  const {
12044
12193
  scrollTop,
@@ -12046,33 +12195,35 @@ const Methods = {
12046
12195
  } = wrapperEl;
12047
12196
  const isRollX = true;
12048
12197
  const isRollY = false;
12049
- $xeTable.handleSyncScrollX(scrollLeft);
12198
+ internalData.inVirtualScroll = true;
12199
+ setScrollLeft(bodyElem, scrollLeft);
12200
+ setScrollLeft(headerElem, scrollLeft);
12201
+ setScrollLeft(footerElem, scrollLeft);
12050
12202
  $xeTable.triggerScrollXEvent(evnt);
12051
12203
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
12052
12204
  type: 'table',
12053
12205
  fixed: ''
12054
12206
  });
12055
12207
  },
12056
- debounceScrollYCalculate: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(function () {
12057
- this.updateScrollYSpace();
12058
- }, 1000, {
12059
- leading: false,
12060
- trailing: true
12061
- }),
12062
- handleSyncScrollY(scrollTop) {
12208
+ scrollYEvent(evnt) {
12063
12209
  const $xeTable = this;
12210
+ const internalData = $xeTable;
12211
+ const {
12212
+ inFooterScroll,
12213
+ inBodyScroll
12214
+ } = internalData;
12215
+ if (inFooterScroll) {
12216
+ return;
12217
+ }
12218
+ if (inBodyScroll) {
12219
+ return;
12220
+ }
12064
12221
  const tableBody = $xeTable.$refs.tableBody;
12065
12222
  const leftBody = $xeTable.$refs.leftBody;
12066
12223
  const rightBody = $xeTable.$refs.rightBody;
12067
12224
  const bodyElem = tableBody.$el;
12068
12225
  const leftElem = leftBody ? leftBody.$el : null;
12069
12226
  const rightElem = rightBody ? rightBody.$el : null;
12070
- setScrollTop(bodyElem, scrollTop);
12071
- setScrollTop(leftElem, scrollTop);
12072
- setScrollTop(rightElem, scrollTop);
12073
- },
12074
- scrollYEvent(evnt) {
12075
- const $xeTable = this;
12076
12227
  const wrapperEl = evnt.currentTarget;
12077
12228
  const {
12078
12229
  scrollTop,
@@ -12080,7 +12231,10 @@ const Methods = {
12080
12231
  } = wrapperEl;
12081
12232
  const isRollX = false;
12082
12233
  const isRollY = true;
12083
- $xeTable.handleSyncScrollY(scrollTop);
12234
+ internalData.inVirtualScroll = true;
12235
+ setScrollTop(bodyElem, scrollTop);
12236
+ setScrollTop(leftElem, scrollTop);
12237
+ setScrollTop(rightElem, scrollTop);
12084
12238
  $xeTable.triggerScrollYEvent(evnt);
12085
12239
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
12086
12240
  type: 'table',
@@ -12091,22 +12245,33 @@ const Methods = {
12091
12245
  * 纵向 Y 可视渲染处理
12092
12246
  */
12093
12247
  loadScrollYData() {
12248
+ const $xeTable = this;
12249
+ const props = $xeTable;
12250
+ const reactData = $xeTable;
12251
+ const internalData = $xeTable;
12094
12252
  const {
12095
- mergeList,
12253
+ showOverflow
12254
+ } = props;
12255
+ const {
12256
+ mergeList
12257
+ } = reactData;
12258
+ const {
12259
+ tableHeight,
12096
12260
  scrollYStore
12097
- } = this;
12261
+ } = internalData;
12098
12262
  const {
12099
12263
  startIndex,
12100
12264
  endIndex,
12101
12265
  offsetSize
12102
12266
  } = scrollYStore;
12267
+ const offsetYSize = showOverflow ? offsetSize : offsetSize + Math.min(8, Math.ceil(tableHeight / 200));
12103
12268
  const {
12104
12269
  toVisibleIndex,
12105
12270
  visibleSize
12106
- } = handleVirtualYVisible(this);
12271
+ } = handleVirtualYVisible($xeTable);
12107
12272
  const offsetItem = {
12108
- startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
12109
- endIndex: toVisibleIndex + visibleSize + offsetSize
12273
+ startIndex: Math.max(0, toVisibleIndex - 1 - offsetYSize),
12274
+ endIndex: toVisibleIndex + visibleSize + offsetYSize
12110
12275
  };
12111
12276
  calculateMergerOffsetIndex(mergeList, offsetItem, 'row');
12112
12277
  const {
@@ -12117,18 +12282,14 @@ const Methods = {
12117
12282
  if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
12118
12283
  scrollYStore.startIndex = offsetStartIndex;
12119
12284
  scrollYStore.endIndex = offsetEndIndex;
12120
- this.updateScrollYData();
12285
+ $xeTable.updateScrollYData();
12121
12286
  }
12122
12287
  }
12123
12288
  },
12124
12289
  // 计算可视渲染相关数据
12125
12290
  computeScrollLoad() {
12126
12291
  const $xeTable = this;
12127
- const props = $xeTable;
12128
12292
  return this.$nextTick().then(() => {
12129
- const {
12130
- showOverflow
12131
- } = props;
12132
12293
  const {
12133
12294
  sYOpts,
12134
12295
  sXOpts,
@@ -12141,16 +12302,14 @@ const Methods = {
12141
12302
  if (scrollXLoad) {
12142
12303
  const {
12143
12304
  visibleSize: visibleXSize
12144
- } = handleVirtualXVisible(this);
12145
- // 动态列缓冲量
12146
- const bufferSize = showOverflow ? 0 : 2;
12147
- const offsetXSize = Math.max(bufferSize, sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0);
12305
+ } = handleVirtualXVisible($xeTable);
12306
+ const offsetXSize = Math.max(0, sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.edge ? 5 : 0);
12148
12307
  scrollXStore.offsetSize = offsetXSize;
12149
12308
  scrollXStore.visibleSize = visibleXSize;
12150
12309
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
12151
- this.updateScrollXData();
12310
+ $xeTable.updateScrollXData();
12152
12311
  } else {
12153
- this.updateScrollXSpace();
12312
+ $xeTable.updateScrollXSpace();
12154
12313
  }
12155
12314
  calcCellHeight(this);
12156
12315
  // 计算 Y 逻辑
@@ -12159,19 +12318,17 @@ const Methods = {
12159
12318
  this.rowHeight = rowHeight;
12160
12319
  const {
12161
12320
  visibleSize: visibleYSize
12162
- } = handleVirtualYVisible(this);
12321
+ } = handleVirtualYVisible($xeTable);
12163
12322
  if (scrollYLoad) {
12164
- // 动态高缓冲量
12165
- const bufferSize = showOverflow ? 0 : 2;
12166
- const offsetYSize = Math.max(bufferSize, sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browse.edge ? 10 : 0);
12323
+ const offsetYSize = Math.max(0, sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browse.edge ? 10 : 0);
12167
12324
  scrollYStore.offsetSize = offsetYSize;
12168
12325
  scrollYStore.visibleSize = visibleYSize;
12169
12326
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
12170
- this.updateScrollYData();
12327
+ $xeTable.updateScrollYData();
12171
12328
  } else {
12172
- this.updateScrollYSpace();
12329
+ $xeTable.updateScrollYSpace();
12173
12330
  }
12174
- this.$nextTick(this.updateStyle);
12331
+ $xeTable.$nextTick(this.updateStyle);
12175
12332
  });
12176
12333
  },
12177
12334
  handleTableColumn() {
@@ -12192,10 +12349,19 @@ const Methods = {
12192
12349
  this.tableColumn = tableColumn;
12193
12350
  },
12194
12351
  updateScrollXData() {
12352
+ const $xeTable = this;
12353
+ const props = $xeTable;
12354
+ const {
12355
+ showOverflow
12356
+ } = props;
12195
12357
  // this.tableColumn = []
12196
- return this.$nextTick().then(() => {
12197
- this.handleTableColumn();
12198
- this.updateScrollXSpace();
12358
+ return $xeTable.$nextTick().then(() => {
12359
+ $xeTable.handleTableColumn();
12360
+ calcCellHeight($xeTable);
12361
+ $xeTable.updateScrollXSpace();
12362
+ if (!showOverflow) {
12363
+ $xeTable.updateScrollYSpace();
12364
+ }
12199
12365
  });
12200
12366
  },
12201
12367
  // 更新横向 X 可视渲染上下剩余空间大小
@@ -12255,10 +12421,10 @@ const Methods = {
12255
12421
  updateScrollYData() {
12256
12422
  const $xeTable = this;
12257
12423
  // this.tableData = []
12258
- return this.$nextTick().then(() => {
12259
- this.handleTableData();
12424
+ return $xeTable.$nextTick().then(() => {
12425
+ $xeTable.handleTableData();
12260
12426
  calcCellHeight($xeTable);
12261
- this.updateScrollYSpace();
12427
+ $xeTable.updateScrollYSpace();
12262
12428
  });
12263
12429
  },
12264
12430
  // 更新纵向 Y 可视渲染上下剩余空间大小
@@ -12716,7 +12882,7 @@ const Methods = {
12716
12882
  }
12717
12883
  };
12718
12884
  // Module methods
12719
- const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
12885
+ const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
12720
12886
  funcs.forEach(name => {
12721
12887
  Methods[name] = function (...args) {
12722
12888
  if (true) {
@@ -12748,7 +12914,8 @@ funcs.forEach(name => {
12748
12914
 
12749
12915
  const {
12750
12916
  getI18n: body_getI18n,
12751
- renderer: body_renderer
12917
+ renderer: body_renderer,
12918
+ renderEmptyElement: body_renderEmptyElement
12752
12919
  } = core_.VxeUI;
12753
12920
  const renderType = 'body';
12754
12921
  // 滚动、拖动过程中不需要触发
@@ -12810,6 +12977,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12810
12977
  columnKey,
12811
12978
  overflowX,
12812
12979
  sYOpts,
12980
+ scrollXLoad,
12813
12981
  scrollYLoad,
12814
12982
  highlightCurrentRow,
12815
12983
  showOverflow: allColumnOverflow,
@@ -12834,8 +13002,13 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12834
13002
  tooltipConfig,
12835
13003
  rowOpts,
12836
13004
  columnOpts,
13005
+ mouseOpts,
13006
+ areaOpts,
12837
13007
  validErrorMaps
12838
13008
  } = $xetable;
13009
+ const {
13010
+ selectCellToRow
13011
+ } = areaOpts;
12839
13012
  const cellOpts = $xetable.computeCellOpts;
12840
13013
  const {
12841
13014
  type,
@@ -13036,7 +13209,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13036
13209
  const validSlot = slots ? slots.valid : null;
13037
13210
  const validParams = {
13038
13211
  ...params,
13039
- ...errorValidItem
13212
+ ...errorValidItem,
13213
+ rule: errorValidItem
13040
13214
  };
13041
13215
  tdVNs.push(h('div', {
13042
13216
  class: ['vxe-cell--valid-error-tip', getClass(validOpts.className, errorValidItem)],
@@ -13053,11 +13227,18 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13053
13227
  let cellHeight = '';
13054
13228
  if (hasEllipsis && (scrollYRHeight || rowHeight)) {
13055
13229
  cellHeight = `${scrollYRHeight || rowHeight}px`;
13056
- } else if (scrollYLoad) {
13230
+ } else if (scrollXLoad || scrollYLoad) {
13057
13231
  if (!hasEllipsis) {
13058
13232
  cellHeight = `${rest.height || 24}px`;
13059
13233
  }
13060
13234
  }
13235
+ if (mouseConfig && mouseOpts.area && selectCellToRow) {
13236
+ if (!$columnIndex && selectCellToRow === true || selectCellToRow === column.field) {
13237
+ tdVNs.push(h('div', {
13238
+ class: 'vxe-cell--area-status'
13239
+ }));
13240
+ }
13241
+ }
13061
13242
  return h('td', {
13062
13243
  class: ['vxe-body--column', column.id, {
13063
13244
  [`col--${cellAlign}`]: cellAlign,
@@ -13325,6 +13506,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
13325
13506
  elemStore[`${prefix}emptyBlock`] = null;
13326
13507
  },
13327
13508
  render(h) {
13509
+ const $xeTable = this.$parent;
13328
13510
  const {
13329
13511
  _e,
13330
13512
  $parent: $xetable,
@@ -13390,16 +13572,19 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
13390
13572
  emptyContent = $xetable.emptyText || body_getI18n('vxe.table.emptyText');
13391
13573
  }
13392
13574
  }
13575
+ const ons = {
13576
+ scroll: this.scrollEvent
13577
+ };
13578
+ if (sYOpts.mode === 'wheel') {
13579
+ ons.wheel = this.wheelEvent;
13580
+ }
13393
13581
  return h('div', {
13582
+ ref: 'refElem',
13394
13583
  class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
13395
13584
  attrs: {
13396
13585
  xid: tId
13397
13586
  },
13398
- on: Object.assign({
13399
- scroll: this.scrollEvent
13400
- }, scrollYLoad && sYOpts.mode === 'wheel' ? {
13401
- wheel: this.wheelEvent
13402
- } : null)
13587
+ on: ons
13403
13588
  }, [fixedType ? _e() : h('div', {
13404
13589
  class: 'vxe-body--x-space',
13405
13590
  ref: 'xSpace'
@@ -13464,12 +13649,12 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
13464
13649
  class: 'vxe-table--cell-multi-area'
13465
13650
  }), h('span', {
13466
13651
  class: 'vxe-table--cell-active-area'
13467
- })]) : null, !fixedType ? h('div', {
13652
+ })]) : body_renderEmptyElement($xeTable), !fixedType ? h('div', {
13468
13653
  class: 'vxe-table--empty-block',
13469
13654
  ref: 'emptyBlock'
13470
13655
  }, [h('div', {
13471
13656
  class: 'vxe-table--empty-content'
13472
- }, emptyContent)]) : null]);
13657
+ }, emptyContent)]) : body_renderEmptyElement($xeTable)]);
13473
13658
  },
13474
13659
  methods: {
13475
13660
  /**
@@ -13478,37 +13663,52 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
13478
13663
  * 如果存在列固定右侧,同步更新滚动状态
13479
13664
  */
13480
13665
  scrollEvent(evnt) {
13666
+ const $xeTable = this.$parent;
13667
+ const tableInternalData = $xeTable;
13481
13668
  const {
13482
- $el: scrollBodyElem,
13483
- $parent: $xeTable,
13484
13669
  fixedType
13485
13670
  } = this;
13486
13671
  const {
13487
- $refs,
13488
13672
  lastScrollTop,
13489
- lastScrollLeft
13490
- } = $xeTable;
13673
+ lastScrollLeft,
13674
+ inVirtualScroll,
13675
+ inBodyScroll,
13676
+ bodyScrollType,
13677
+ inFooterScroll
13678
+ } = tableInternalData;
13679
+ if (inVirtualScroll) {
13680
+ return;
13681
+ }
13682
+ if (inFooterScroll) {
13683
+ return;
13684
+ }
13685
+ if (inBodyScroll) {
13686
+ if (bodyScrollType !== fixedType) {
13687
+ return;
13688
+ }
13689
+ }
13491
13690
  const {
13492
13691
  tableHeader,
13493
13692
  tableBody,
13494
13693
  leftBody,
13495
13694
  rightBody,
13496
13695
  tableFooter
13497
- } = $refs;
13696
+ } = $xeTable.$refs;
13697
+ const scrollBodyElem = this.$el;
13498
13698
  const headerElem = tableHeader ? tableHeader.$el : null;
13499
13699
  const footerElem = tableFooter ? tableFooter.$el : null;
13500
13700
  const bodyElem = tableBody.$el;
13501
13701
  const leftElem = leftBody ? leftBody.$el : null;
13502
13702
  const rightElem = rightBody ? rightBody.$el : null;
13703
+ const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
13704
+ const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
13503
13705
  const scrollTop = scrollBodyElem.scrollTop;
13504
13706
  const scrollLeft = bodyElem.scrollLeft;
13505
13707
  const isRollX = scrollLeft !== lastScrollLeft;
13506
13708
  const isRollY = scrollTop !== lastScrollTop;
13507
- const xHandleEl = $refs.refScrollXHandleElem;
13508
- const yHandleEl = $refs.refScrollYHandleElem;
13509
- if (yHandleEl) {
13510
- yHandleEl.scrollTop = scrollTop;
13511
- } else if (isRollY) {
13709
+ tableInternalData.inBodyScroll = true;
13710
+ tableInternalData.bodyScrollType = fixedType;
13711
+ if (isRollY) {
13512
13712
  if (leftElem && fixedType === 'left') {
13513
13713
  setScrollTop(bodyElem, scrollTop);
13514
13714
  setScrollTop(rightElem, scrollTop);
@@ -13519,21 +13719,19 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
13519
13719
  setScrollTop(leftElem, scrollTop);
13520
13720
  setScrollTop(rightElem, scrollTop);
13521
13721
  }
13522
- $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
13523
- type: renderType,
13524
- fixed: fixedType
13525
- });
13722
+ setScrollTop(yHandleEl, scrollTop);
13723
+ $xeTable.triggerScrollYEvent(evnt);
13526
13724
  }
13527
- if (xHandleEl) {
13528
- xHandleEl.scrollLeft = scrollLeft;
13529
- } else if (isRollX) {
13725
+ if (isRollX) {
13726
+ setScrollLeft(xHandleEl, scrollLeft);
13530
13727
  setScrollLeft(headerElem, scrollLeft);
13531
13728
  setScrollLeft(footerElem, scrollLeft);
13532
- $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
13533
- type: renderType,
13534
- fixed: fixedType
13535
- });
13729
+ $xeTable.triggerScrollXEvent(evnt);
13536
13730
  }
13731
+ $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
13732
+ type: renderType,
13733
+ fixed: fixedType
13734
+ });
13537
13735
  },
13538
13736
  handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY) {
13539
13737
  const {
@@ -14384,14 +14582,16 @@ function footer_renderHeads(h, _vm, footerTableData) {
14384
14582
  tableColumn = visibleColumn;
14385
14583
  }
14386
14584
  }
14585
+ const ons = {};
14586
+ if (!fixedType) {
14587
+ ons.scroll = this.scrollEvent;
14588
+ }
14387
14589
  return h('div', {
14388
14590
  class: ['vxe-table--footer-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
14389
14591
  attrs: {
14390
14592
  xid: tId
14391
14593
  },
14392
- on: {
14393
- scroll: this.scrollEvent
14394
- }
14594
+ on: ons
14395
14595
  }, [fixedType ? _e() : h('div', {
14396
14596
  class: 'vxe-body--x-space',
14397
14597
  ref: 'xSpace'
@@ -14436,36 +14636,43 @@ function footer_renderHeads(h, _vm, footerTableData) {
14436
14636
  * 如果存在列固定右侧,同步更新滚动状态
14437
14637
  */
14438
14638
  scrollEvent(evnt) {
14639
+ const $xeTable = this.$parent;
14640
+ const tableInternalData = $xeTable;
14641
+ const {
14642
+ inVirtualScroll,
14643
+ inBodyScroll
14644
+ } = tableInternalData;
14645
+ if (inVirtualScroll) {
14646
+ return;
14647
+ }
14648
+ if (inBodyScroll) {
14649
+ return;
14650
+ }
14439
14651
  const {
14440
- $parent: $xeTable,
14441
14652
  fixedType
14442
14653
  } = this;
14443
- const {
14444
- $refs
14445
- } = $xeTable;
14446
14654
  const {
14447
14655
  tableHeader,
14448
14656
  tableBody,
14449
14657
  tableFooter
14450
- } = $refs;
14658
+ } = $xeTable.$refs;
14451
14659
  const headerElem = tableHeader ? tableHeader.$el : null;
14452
14660
  const footerElem = tableFooter ? tableFooter.$el : null;
14453
14661
  const bodyElem = tableBody.$el;
14454
- const scrollLeft = footerElem ? footerElem.scrollLeft : 0;
14455
- const xHandleEl = $refs.refScrollXHandleElem;
14456
- if (xHandleEl) {
14457
- xHandleEl.scrollLeft = scrollLeft;
14458
- } else {
14459
- const isRollX = true;
14460
- const isRollY = false;
14461
- const scrollTop = bodyElem.scrollTop;
14462
- setScrollLeft(headerElem, scrollLeft);
14463
- setScrollLeft(bodyElem, scrollLeft);
14464
- $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
14465
- type: footer_renderType,
14466
- fixed: fixedType
14467
- });
14468
- }
14662
+ const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
14663
+ const scrollLeft = footerElem.scrollLeft;
14664
+ const isRollX = true;
14665
+ const isRollY = false;
14666
+ const scrollTop = bodyElem.scrollTop;
14667
+ tableInternalData.inFooterScroll = true;
14668
+ setScrollLeft(xHandleEl, scrollLeft);
14669
+ setScrollLeft(headerElem, scrollLeft);
14670
+ setScrollLeft(bodyElem, scrollLeft);
14671
+ $xeTable.triggerScrollXEvent(evnt);
14672
+ $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
14673
+ type: footer_renderType,
14674
+ fixed: fixedType
14675
+ });
14469
14676
  }
14470
14677
  }
14471
14678
  });
@@ -15878,20 +16085,16 @@ const {
15878
16085
  // 确认筛选
15879
16086
  confirmFilter(evnt) {
15880
16087
  const {
15881
- $parent: $xetable,
15882
- filterStore
16088
+ $parent: $xetable
15883
16089
  } = this;
15884
- filterStore.options.forEach(option => {
15885
- option.checked = option._checked;
15886
- });
15887
- $xetable.confirmFilterEvent(evnt);
16090
+ $xetable.handleFilterConfirmFilter(evnt);
15888
16091
  },
15889
16092
  // 重置筛选
15890
16093
  resetFilter(evnt) {
15891
16094
  const {
15892
16095
  $parent: $xetable
15893
16096
  } = this;
15894
- $xetable.resetFilterEvent(evnt);
16097
+ $xetable.handleFilterResetFilter(evnt);
15895
16098
  }
15896
16099
  /*************************
15897
16100
  * Publish methods
@@ -16918,6 +17121,27 @@ const {
16918
17121
  visible: filterStore.visible
16919
17122
  }, evnt);
16920
17123
  },
17124
+ handleFilterConfirmFilter(evnt) {
17125
+ const $xeTable = this;
17126
+ const reactData = $xeTable;
17127
+ const {
17128
+ filterStore
17129
+ } = reactData;
17130
+ filterStore.options.forEach(option => {
17131
+ option.checked = option._checked;
17132
+ });
17133
+ $xeTable.confirmFilterEvent(evnt);
17134
+ },
17135
+ _saveFilterPanel() {
17136
+ const $xeTable = this;
17137
+ $xeTable.handleFilterConfirmFilter(null);
17138
+ return $xeTable.$nextTick();
17139
+ },
17140
+ _resetFilterPanel() {
17141
+ const $xeTable = this;
17142
+ $xeTable.handleFilterResetFilter(null);
17143
+ return $xeTable.$nextTick();
17144
+ },
16921
17145
  _getCheckedFilters() {
16922
17146
  const {
16923
17147
  tableFullColumn
@@ -16996,7 +17220,9 @@ const {
16996
17220
  if (this.mouseConfig && this.mouseOpts.area && this.handleFilterEvent) {
16997
17221
  this.handleFilterEvent(evnt, params);
16998
17222
  }
16999
- this.emitEvent('filter-change', params, evnt);
17223
+ if (evnt) {
17224
+ this.emitEvent('filter-change', params, evnt);
17225
+ }
17000
17226
  this.closeFilter();
17001
17227
  this.updateFooter().then(() => {
17002
17228
  const {
@@ -17051,7 +17277,7 @@ const {
17051
17277
  * 当筛选面板中的重置按钮被按下时触发
17052
17278
  * @param {Event} evnt 事件
17053
17279
  */
17054
- resetFilterEvent(evnt) {
17280
+ handleFilterResetFilter(evnt) {
17055
17281
  this.handleClearFilter(this.filterStore.column);
17056
17282
  this.confirmFilterEvent(evnt);
17057
17283
  },
@@ -22766,6 +22992,7 @@ function handleUupdateResize(_vm) {
22766
22992
  const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
22767
22993
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
22768
22994
  const $xeTable = this;
22995
+ const $xeGrid = $xeTable.$xeGrid;
22769
22996
  const {
22770
22997
  _e,
22771
22998
  $scopedSlots,
@@ -22815,6 +23042,7 @@ function handleUupdateResize(_vm) {
22815
23042
  leftList,
22816
23043
  rightList
22817
23044
  } = columnStore;
23045
+ const loadingSlot = $scopedSlots.loading;
22818
23046
  const currLoading = this._isLoading || loading;
22819
23047
  const vSize = computeSize;
22820
23048
  const virtualScrollBars = $xeTable.computeVirtualScrollBars;
@@ -22971,7 +23199,19 @@ function handleUupdateResize(_vm) {
22971
23199
  icon: loadingOpts.icon,
22972
23200
  text: loadingOpts.text
22973
23201
  }
22974
- }, this.callSlot($scopedSlots.loading, {}, h)) : _e(),
23202
+ }, $xeTable.callSlot(loadingSlot, {
23203
+ $table: $xeTable,
23204
+ $grid: $xeGrid,
23205
+ loading: currLoading
23206
+ }, h)) : loadingSlot ? h('div', {
23207
+ class: ['vxe-loading--custom-wrapper', {
23208
+ 'is--visible': currLoading
23209
+ }]
23210
+ }, $xeTable.callSlot(loadingSlot, {
23211
+ $table: $xeTable,
23212
+ $grid: $xeGrid,
23213
+ loading: currLoading
23214
+ }, h)) : table_renderEmptyElement($xeTable),
22975
23215
  /**
22976
23216
  * 自定义列
22977
23217
  */
@@ -22981,7 +23221,7 @@ function handleUupdateResize(_vm) {
22981
23221
  props: {
22982
23222
  customStore
22983
23223
  }
22984
- }) : _e(),
23224
+ }) : table_renderEmptyElement($xeTable),
22985
23225
  /**
22986
23226
  * 筛选
22987
23227
  */