vxe-table 3.23.4 → 3.23.6

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 (76) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/custom/mixin.js +1 -1
  6. package/es/table/module/filter/mixin.js +71 -56
  7. package/es/table/module/keyboard/mixin.js +3 -5
  8. package/es/table/src/body.js +3 -3
  9. package/es/table/src/footer.js +3 -3
  10. package/es/table/src/header.js +6 -6
  11. package/es/table/src/methods.js +128 -68
  12. package/es/table/src/table.js +10 -2
  13. package/es/table/src/util.js +6 -5
  14. package/es/table/style.css +1 -1
  15. package/es/table/style.min.css +1 -1
  16. package/es/ui/index.js +1 -1
  17. package/es/ui/src/dom.js +162 -0
  18. package/es/ui/src/log.js +1 -1
  19. package/es/vxe-table/style.css +1 -1
  20. package/es/vxe-table/style.min.css +1 -1
  21. package/lib/index.css +1 -1
  22. package/lib/index.min.css +1 -1
  23. package/lib/index.umd.js +321 -134
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/module/custom/mixin.js +1 -1
  28. package/lib/table/module/custom/mixin.min.js +1 -1
  29. package/lib/table/module/filter/mixin.js +69 -58
  30. package/lib/table/module/filter/mixin.min.js +1 -1
  31. package/lib/table/module/keyboard/mixin.js +3 -6
  32. package/lib/table/module/keyboard/mixin.min.js +1 -1
  33. package/lib/table/src/body.js +5 -4
  34. package/lib/table/src/body.min.js +1 -1
  35. package/lib/table/src/footer.js +5 -4
  36. package/lib/table/src/footer.min.js +1 -1
  37. package/lib/table/src/header.js +10 -8
  38. package/lib/table/src/header.min.js +1 -1
  39. package/lib/table/src/methods.js +46 -44
  40. package/lib/table/src/methods.min.js +1 -1
  41. package/lib/table/src/table.js +10 -2
  42. package/lib/table/src/table.min.js +1 -1
  43. package/lib/table/src/util.js +6 -5
  44. package/lib/table/src/util.min.js +1 -1
  45. package/lib/table/style/style.css +1 -1
  46. package/lib/table/style/style.min.css +1 -1
  47. package/lib/ui/index.js +1 -1
  48. package/lib/ui/index.min.js +1 -1
  49. package/lib/ui/src/dom.js +167 -0
  50. package/lib/ui/src/dom.min.js +1 -1
  51. package/lib/ui/src/log.js +1 -1
  52. package/lib/ui/src/log.min.js +1 -1
  53. package/lib/vxe-table/style/style.css +1 -1
  54. package/lib/vxe-table/style/style.min.css +1 -1
  55. package/package.json +2 -2
  56. package/packages/table/module/custom/mixin.ts +1 -2
  57. package/packages/table/module/filter/mixin.ts +72 -53
  58. package/packages/table/module/keyboard/mixin.ts +3 -5
  59. package/packages/table/src/body.ts +3 -3
  60. package/packages/table/src/footer.ts +3 -3
  61. package/packages/table/src/header.ts +6 -6
  62. package/packages/table/src/methods.ts +166 -80
  63. package/packages/table/src/table.ts +10 -2
  64. package/packages/table/src/util.ts +9 -6
  65. package/packages/ui/src/dom.ts +176 -0
  66. package/styles/components/table-module/filter.scss +1 -1
  67. package/styles/theme/base.scss +2 -0
  68. package/styles/theme/dark.scss +4 -4
  69. package/styles/theme/light.scss +4 -4
  70. package/styles/variable.scss +4 -4
  71. /package/es/{iconfont.1788399048088.ttf → iconfont.1788695175944.ttf} +0 -0
  72. /package/es/{iconfont.1788399048088.woff → iconfont.1788695175944.woff} +0 -0
  73. /package/es/{iconfont.1788399048088.woff2 → iconfont.1788695175944.woff2} +0 -0
  74. /package/lib/{iconfont.1788399048088.ttf → iconfont.1788695175944.ttf} +0 -0
  75. /package/lib/{iconfont.1788399048088.woff → iconfont.1788695175944.woff} +0 -0
  76. /package/lib/{iconfont.1788399048088.woff2 → iconfont.1788695175944.woff2} +0 -0
@@ -1,5 +1,5 @@
1
1
  import XEUtils from 'xe-utils';
2
- import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasEventInputTarget } from '../../ui/src/dom';
2
+ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasAxternalInputTarget } from '../../ui/src/dom';
3
3
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
4
4
  import { VxeUI } from '../../ui';
5
5
  import Cell from './cell';
@@ -4966,8 +4966,9 @@ const tableMethods = {
4966
4966
  * @param {ColumnInfo} columns 列配置
4967
4967
  */
4968
4968
  reloadColumn(columns) {
4969
- return this.clearAll().then(() => {
4970
- return this.loadColumn(columns);
4969
+ const $xeTable = this;
4970
+ return $xeTable.clearAll().then(() => {
4971
+ return $xeTable.loadColumn(columns);
4971
4972
  });
4972
4973
  },
4973
4974
  handleInitColumn(collectColumn) {
@@ -5095,15 +5096,15 @@ const tableMethods = {
5095
5096
  const childrenField = treeOpts.children || treeOpts.childrenField;
5096
5097
  const parentRest = fullAllDataRowIdData[getRowid($xeTable, row)];
5097
5098
  const parentLevel = parentRest ? parentRest.level : 0;
5098
- return this.createData(childRecords).then((rows) => {
5099
+ return $xeTable.createData(childRecords).then((rows) => {
5099
5100
  if (keepSource) {
5100
- const rowid = getRowid(this, row);
5101
- const matchObj = XEUtils.findTree(tableSourceData, (item) => rowid === getRowid(this, item), { children: childrenField });
5101
+ const rowid = getRowid($xeTable, row);
5102
+ const matchObj = XEUtils.findTree(tableSourceData, (item) => rowid === getRowid($xeTable, item), { children: childrenField });
5102
5103
  if (matchObj) {
5103
5104
  matchObj.item[childrenField] = XEUtils.clone(rows, true);
5104
5105
  }
5105
5106
  rows.forEach((childRow) => {
5106
- const rowid = getRowid(this, childRow);
5107
+ const rowid = getRowid($xeTable, childRow);
5107
5108
  sourceDataRowIdData[rowid] = XEUtils.clone(childRow, true);
5108
5109
  });
5109
5110
  }
@@ -5194,13 +5195,15 @@ const tableMethods = {
5194
5195
  getVMRowIndex: createGetRowCacheProp('$index'),
5195
5196
  // 在 v3 中废弃
5196
5197
  _getRowIndex(row) {
5198
+ const $xeTable = this;
5197
5199
  warnLog('vxe.error.delFunc', ['_getRowIndex', 'getVTRowIndex']);
5198
- return this.getVTRowIndex(row);
5200
+ return $xeTable.getVTRowIndex(row);
5199
5201
  },
5200
5202
  // 在 v3 中废弃
5201
5203
  $getRowIndex(row) {
5204
+ const $xeTable = this;
5202
5205
  warnLog('vxe.error.delFunc', ['$getRowIndex', 'getVMRowIndex']);
5203
- return this.getVMRowIndex(row);
5206
+ return $xeTable.getVMRowIndex(row);
5204
5207
  },
5205
5208
  /**
5206
5209
  * 根据 column 获取相对于 columns 中的索引
@@ -5219,13 +5222,15 @@ const tableMethods = {
5219
5222
  getVMColumnIndex: createGetColumnCacheProp('$index'),
5220
5223
  // 在 v3 中废弃
5221
5224
  _getColumnIndex(column) {
5225
+ const $xeTable = this;
5222
5226
  warnLog('vxe.error.delFunc', ['_getColumnIndex', 'getVTColumnIndex']);
5223
- return this.getVTColumnIndex(column);
5227
+ return $xeTable.getVTColumnIndex(column);
5224
5228
  },
5225
5229
  // 在 v3 中废弃
5226
5230
  $getColumnIndex(column) {
5231
+ const $xeTable = this;
5227
5232
  warnLog('vxe.error.delFunc', ['$getColumnIndex', 'getVMColumnIndex']);
5228
- return this.getVMColumnIndex(column);
5233
+ return $xeTable.getVMColumnIndex(column);
5229
5234
  },
5230
5235
  /**
5231
5236
  * 判断是否为索引列
@@ -5964,8 +5969,10 @@ const tableMethods = {
5964
5969
  return fullColumnFieldData[field] ? fullColumnFieldData[field].column : null;
5965
5970
  },
5966
5971
  getParentColumn(fieldOrColumn) {
5967
- const fullColumnIdData = this.fullColumnIdData;
5968
- const column = handleFieldOrColumn(this, fieldOrColumn);
5972
+ const $xeTable = this;
5973
+ const internalData = $xeTable;
5974
+ const { fullColumnIdData } = internalData;
5975
+ const column = handleFieldOrColumn($xeTable, fieldOrColumn);
5969
5976
  return column && column.parentId && fullColumnIdData[column.parentId] ? fullColumnIdData[column.parentId].column : null;
5970
5977
  },
5971
5978
  /**
@@ -6090,7 +6097,10 @@ const tableMethods = {
6090
6097
  * 获取数据,和 data 的行为一致,也可以指定索引获取数据
6091
6098
  */
6092
6099
  getData(rowIndex) {
6093
- const tableSynchData = this.data || this.tableSynchData;
6100
+ const $xeTable = this;
6101
+ const props = $xeTable;
6102
+ const internalData = $xeTable;
6103
+ const tableSynchData = props.data || internalData.tableSynchData;
6094
6104
  return XEUtils.isUndefined(rowIndex) ? tableSynchData.slice(0) : tableSynchData[rowIndex];
6095
6105
  },
6096
6106
  /**
@@ -6413,8 +6423,9 @@ const tableMethods = {
6413
6423
  * 如果已关联工具栏,则会同步更新
6414
6424
  */
6415
6425
  resetColumn(options) {
6426
+ const $xeTable = this;
6416
6427
  warnLog('vxe.error.delFunc', ['resetColumn', 'resetCustom']);
6417
- return this.resetCustom(options);
6428
+ return $xeTable.resetCustom(options);
6418
6429
  },
6419
6430
  /**
6420
6431
  * @private
@@ -6792,7 +6803,7 @@ const tableMethods = {
6792
6803
  handleUpdateColumn($xeTable);
6793
6804
  }
6794
6805
  return parseColumns($xeTable, true).then(() => {
6795
- return this.refreshScroll();
6806
+ return $xeTable.refreshScroll();
6796
6807
  }).then(() => {
6797
6808
  return handleLazyRecalculate($xeTable, false, true, true);
6798
6809
  });
@@ -6801,7 +6812,11 @@ const tableMethods = {
6801
6812
  * 指定列宽的列进行拆分
6802
6813
  */
6803
6814
  analyColumnWidth() {
6804
- const { columnOpts } = this;
6815
+ const $xeTable = this;
6816
+ const reactData = $xeTable;
6817
+ const internalData = $xeTable;
6818
+ const { tableFullColumn } = internalData;
6819
+ const columnOpts = $xeTable.computeColumnOpts;
6805
6820
  const { width: defaultWidth, minWidth: defaultMinWidth } = columnOpts;
6806
6821
  const resizeList = [];
6807
6822
  const pxList = [];
@@ -6811,7 +6826,7 @@ const tableMethods = {
6811
6826
  const scaleMinList = [];
6812
6827
  const autoList = [];
6813
6828
  const remainList = [];
6814
- this.tableFullColumn.forEach((column) => {
6829
+ tableFullColumn.forEach((column) => {
6815
6830
  if (defaultWidth && !column.width) {
6816
6831
  column.width = defaultWidth;
6817
6832
  }
@@ -6845,7 +6860,7 @@ const tableMethods = {
6845
6860
  }
6846
6861
  }
6847
6862
  });
6848
- Object.assign(this.columnStore, { resizeList, pxList, pxMinList, autoMinList, scaleList, scaleMinList, autoList, remainList });
6863
+ Object.assign(reactData.columnStore, { resizeList, pxList, pxMinList, autoMinList, scaleList, scaleMinList, autoList, remainList });
6849
6864
  },
6850
6865
  handleColResizeMousedownEvent(evnt, fixedType, params) {
6851
6866
  const $xeTable = this;
@@ -7650,7 +7665,7 @@ const tableMethods = {
7650
7665
  const { actived } = editStore;
7651
7666
  const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
7652
7667
  if (isEsc) {
7653
- this.preventEvent(evnt, 'event.keydown', null, () => {
7668
+ $xeTable.preventEvent(evnt, 'event.keydown', null, () => {
7654
7669
  $xeTable.dispatchEvent('keydown-start', {}, evnt);
7655
7670
  if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
7656
7671
  $xeTable.handleKdClAreaEvent(evnt);
@@ -7658,16 +7673,16 @@ const tableMethods = {
7658
7673
  else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
7659
7674
  evnt.stopPropagation();
7660
7675
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
7661
- this.closeFilter();
7662
- this.closeMenu();
7676
+ $xeTable.closeFilter();
7677
+ $xeTable.closeMenu();
7663
7678
  if (keyboardConfig && keyboardOpts.isEsc) {
7664
7679
  // 如果是激活编辑状态,则取消编辑
7665
7680
  if (actived.row) {
7666
7681
  const params = actived.args;
7667
- this.handleClearEdit(evnt);
7682
+ $xeTable.handleClearEdit(evnt);
7668
7683
  // 如果配置了选中功能,则为选中状态
7669
7684
  if (mouseConfig && mouseOpts.selected) {
7670
- this.$nextTick(() => this.handleSelected(params, evnt));
7685
+ $xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
7671
7686
  }
7672
7687
  }
7673
7688
  }
@@ -8068,7 +8083,7 @@ const tableMethods = {
8068
8083
  .then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
8069
8084
  }
8070
8085
  }
8071
- else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasEventInputTarget(evnt.target)) {
8086
+ else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
8072
8087
  if (isY || (hasShiftKey && isZ)) {
8073
8088
  // 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
8074
8089
  evnt.preventDefault();
@@ -8185,6 +8200,11 @@ const tableMethods = {
8185
8200
  },
8186
8201
  handleGlobalResizeEvent() {
8187
8202
  const $xeTable = this;
8203
+ const reactData = $xeTable;
8204
+ const { filterStore } = reactData;
8205
+ if (filterStore.visible) {
8206
+ $xeTable.handleFilterStyle();
8207
+ }
8188
8208
  $xeTable.closeMenu();
8189
8209
  $xeTable.updateCellAreas();
8190
8210
  handleResizeEvent($xeTable);
@@ -9216,7 +9236,6 @@ const tableMethods = {
9216
9236
  * 多选,选中所有事件
9217
9237
  */
9218
9238
  triggerCheckAllEvent(evnt, value) {
9219
- const $xeTable = this;
9220
9239
  const { checkboxOpts } = this;
9221
9240
  const { trigger } = checkboxOpts;
9222
9241
  if (trigger === 'manual') {
@@ -9225,14 +9244,16 @@ const tableMethods = {
9225
9244
  if (evnt) {
9226
9245
  evnt.stopPropagation();
9227
9246
  }
9228
- $xeTable.handleCheckAllEvent(evnt, value);
9247
+ this.handleCheckAllEvent(evnt, value);
9229
9248
  },
9230
9249
  /**
9231
9250
  * 多选,切换所有行的选中状态
9232
9251
  */
9233
9252
  toggleAllCheckboxRow() {
9234
- this.handleCheckAllEvent(null, !this.isAllSelected);
9235
- return this.$nextTick();
9253
+ const $xeTable = this;
9254
+ const reactData = $xeTable;
9255
+ this.handleCheckAllEvent(null, !reactData.isAllSelected);
9256
+ return $xeTable.$nextTick();
9236
9257
  },
9237
9258
  /**
9238
9259
  * 用于多选行,手动清空用户的选择
@@ -9273,7 +9294,7 @@ const tableMethods = {
9273
9294
  internalData.selectCheckboxMaps = {};
9274
9295
  internalData.treeIndeterminateRowMaps = {};
9275
9296
  reactData.updateCheckboxFlag++;
9276
- return this.$nextTick();
9297
+ return $xeTable.$nextTick();
9277
9298
  },
9278
9299
  /**
9279
9300
  * 单选,行选中事件
@@ -9315,8 +9336,8 @@ const tableMethods = {
9315
9336
  },
9316
9337
  triggerCurrentColumnEvent(evnt, params) {
9317
9338
  const $xeTable = this;
9318
- const reactData = $xeTable;
9319
- const { currentColumn: oldValue } = reactData;
9339
+ const internalData = $xeTable;
9340
+ const { currentCol: oldValue } = internalData;
9320
9341
  const columnOpts = $xeTable.computeColumnOpts;
9321
9342
  const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
9322
9343
  const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
@@ -9397,14 +9418,15 @@ const tableMethods = {
9397
9418
  */
9398
9419
  setCurrentRow(row) {
9399
9420
  const $xeTable = this;
9421
+ const props = $xeTable;
9400
9422
  const internalData = $xeTable;
9401
9423
  const $xeGanttView = internalData.xeGanttView;
9402
9424
  const el = $xeTable.$refs.refElem;
9403
9425
  const rowOpts = $xeTable.computeRowOpts;
9404
- this.clearCurrentRow();
9426
+ $xeTable.clearCurrentRow();
9405
9427
  // this.clearCurrentColumn()
9406
- this.currentRow = row;
9407
- if (rowOpts.isCurrent || this.highlightCurrentRow) {
9428
+ internalData.currentRow = row;
9429
+ if (rowOpts.isCurrent || props.highlightCurrentRow) {
9408
9430
  if (el) {
9409
9431
  XEUtils.arrayEach(el.querySelectorAll(`[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--current'));
9410
9432
  }
@@ -9412,7 +9434,7 @@ const tableMethods = {
9412
9434
  if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
9413
9435
  $xeGanttView.handleUpdateCurrentRow(row);
9414
9436
  }
9415
- return this.$nextTick();
9437
+ return $xeTable.$nextTick();
9416
9438
  },
9417
9439
  isCheckedByRadioRow(row) {
9418
9440
  const $xeTable = this;
@@ -9534,7 +9556,8 @@ const tableMethods = {
9534
9556
  * 行 hover 事件
9535
9557
  */
9536
9558
  triggerHoverEvent(evnt, { row }) {
9537
- this.setHoverRow(row);
9559
+ const $xeTable = this;
9560
+ $xeTable.setHoverRow(row);
9538
9561
  },
9539
9562
  setHoverRow(row) {
9540
9563
  const $xeTable = this;
@@ -9595,7 +9618,11 @@ const tableMethods = {
9595
9618
  $xeTable.dispatchEvent('header-cell-dblclick', Object.assign({ cell: evnt.currentTarget }, params), evnt);
9596
9619
  },
9597
9620
  getCurrentColumn() {
9598
- return this.columnOpts.isCurrent || this.highlightCurrentColumn ? this.currentColumn : null;
9621
+ const $xeTable = this;
9622
+ const props = $xeTable;
9623
+ const internalData = $xeTable;
9624
+ const columnOpts = $xeTable.computeColumnOpts;
9625
+ return columnOpts.isCurrent || props.highlightCurrentColumn ? internalData.currentCol : null;
9599
9626
  },
9600
9627
  /**
9601
9628
  * 用于当前列,设置某列行为高亮状态
@@ -9605,13 +9632,15 @@ const tableMethods = {
9605
9632
  const $xeTable = this;
9606
9633
  const props = $xeTable;
9607
9634
  const reactData = $xeTable;
9635
+ const internalData = $xeTable;
9608
9636
  const { mouseConfig } = props;
9609
9637
  const mouseOpts = $xeTable.computeMouseOpts;
9610
9638
  const isMouseSelected = mouseConfig && mouseOpts.selected;
9611
9639
  const column = handleFieldOrColumn($xeTable, fieldOrColumn);
9612
9640
  if (column) {
9613
9641
  $xeTable.clearCurrentColumn();
9614
- reactData.currentColumn = column;
9642
+ internalData.currentCol = column;
9643
+ reactData.currColFlag++; // 刷新当前列状态
9615
9644
  }
9616
9645
  return $xeTable.$nextTick().then(() => {
9617
9646
  // 更新状选中态
@@ -9624,8 +9653,12 @@ const tableMethods = {
9624
9653
  * 用于当前列,手动清空当前高亮的状态
9625
9654
  */
9626
9655
  clearCurrentColumn() {
9627
- this.currentColumn = null;
9628
- return this.$nextTick();
9656
+ const $xeTable = this;
9657
+ const reactData = $xeTable;
9658
+ const internalData = $xeTable;
9659
+ internalData.currentCol = null;
9660
+ reactData.currColFlag++; // 刷新当前列状态
9661
+ return $xeTable.$nextTick();
9629
9662
  },
9630
9663
  /**
9631
9664
  * 列点击事件
@@ -11283,20 +11316,28 @@ const tableMethods = {
11283
11316
  },
11284
11317
  // 在 v3 中废弃
11285
11318
  getSortColumn() {
11319
+ const $xeTable = this;
11320
+ const internalData = $xeTable;
11321
+ const { tableFullColumn } = internalData;
11286
11322
  warnLog('vxe.error.delFunc', ['getSortColumn', 'getSortColumns']);
11287
- return XEUtils.find(this.tableFullColumn, column => (column.sortable || column.remoteSort) && column.order);
11323
+ return XEUtils.find(tableFullColumn, column => (column.sortable || column.remoteSort) && column.order);
11288
11324
  },
11289
11325
  isSort(fieldOrColumn) {
11326
+ const $xeTable = this;
11290
11327
  if (fieldOrColumn) {
11291
- const column = handleFieldOrColumn(this, fieldOrColumn);
11328
+ const column = handleFieldOrColumn($xeTable, fieldOrColumn);
11292
11329
  return column && column.sortable && !!column.order;
11293
11330
  }
11294
- return this.getSortColumns().length > 0;
11331
+ return $xeTable.getSortColumns().length > 0;
11295
11332
  },
11296
11333
  getSortColumns() {
11297
- const { multiple, chronological } = this.sortOpts;
11334
+ const $xeTable = this;
11335
+ const internalData = $xeTable;
11336
+ const sortOpts = $xeTable.computeSortOpts;
11337
+ const { multiple, chronological } = sortOpts;
11298
11338
  const sortList = [];
11299
- this.tableFullColumn.forEach((column) => {
11339
+ const { tableFullColumn } = internalData;
11340
+ tableFullColumn.forEach((column) => {
11300
11341
  const { field, order } = column;
11301
11342
  if ((column.sortable || column.remoteSort) && order) {
11302
11343
  sortList.push({ column, field, property: field, order, sortTime: column.sortTime });
@@ -11345,15 +11386,17 @@ const tableMethods = {
11345
11386
  * @param {String} fieldOrColumn 字段名
11346
11387
  */
11347
11388
  isActiveFilterByColumn(fieldOrColumn) {
11348
- const column = handleFieldOrColumn(this, fieldOrColumn);
11389
+ const $xeTable = this;
11390
+ const column = handleFieldOrColumn($xeTable, fieldOrColumn);
11349
11391
  if (column) {
11350
11392
  return column.filters && column.filters.some((option) => option.checked);
11351
11393
  }
11352
- return this.getCheckedFilters().length > 0;
11394
+ return $xeTable.getCheckedFilters().length > 0;
11353
11395
  },
11354
11396
  // 已废弃
11355
11397
  isFilter(fieldOrColumn) {
11356
- return this.isActiveFilterByColumn(fieldOrColumn);
11398
+ const $xeTable = this;
11399
+ return $xeTable.isActiveFilterByColumn(fieldOrColumn);
11357
11400
  },
11358
11401
  clearFilterByEvent(evnt, fieldOrColumn) {
11359
11402
  const $xeTable = this;
@@ -11470,9 +11513,10 @@ const tableMethods = {
11470
11513
  return $xeTable.$nextTick();
11471
11514
  },
11472
11515
  reloadExpandContent(row) {
11516
+ const $xeTable = this;
11473
11517
  warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
11474
11518
  // 即将废弃
11475
- return this.reloadRowExpand(row);
11519
+ return $xeTable.reloadRowExpand(row);
11476
11520
  },
11477
11521
  /**
11478
11522
  * 展开行事件
@@ -11511,17 +11555,22 @@ const tableMethods = {
11511
11555
  * 切换展开行
11512
11556
  */
11513
11557
  toggleRowExpand(row) {
11514
- return this.setRowExpand(row, !this.isRowExpandByRow(row));
11558
+ const $xeTable = this;
11559
+ return $xeTable.setRowExpand(row, !$xeTable.isRowExpandByRow(row));
11515
11560
  },
11516
11561
  /**
11517
11562
  * 设置所有行的展开与否
11518
11563
  * @param {Boolean} expanded 是否展开
11519
11564
  */
11520
11565
  setAllRowExpand(expanded) {
11521
- const { treeConfig, treeOpts, tableFullData, tableFullTreeData } = this;
11566
+ const $xeTable = this;
11567
+ const props = $xeTable;
11568
+ const internalData = $xeTable;
11569
+ const treeOpts = $xeTable.computeTreeOpts;
11570
+ const { tableFullData, tableFullTreeData } = internalData;
11522
11571
  const childrenField = treeOpts.children || treeOpts.childrenField;
11523
11572
  let expandedRows = [];
11524
- if (treeConfig) {
11573
+ if (props.treeConfig) {
11525
11574
  XEUtils.eachTree(tableFullTreeData, (row) => {
11526
11575
  expandedRows.push(row);
11527
11576
  }, { children: childrenField });
@@ -11529,7 +11578,7 @@ const tableMethods = {
11529
11578
  else {
11530
11579
  expandedRows = tableFullData;
11531
11580
  }
11532
- return this.setRowExpand(expandedRows, expanded);
11581
+ return $xeTable.setRowExpand(expandedRows, expanded);
11533
11582
  },
11534
11583
  /**
11535
11584
  * 设置展开行,二个参数设置这一行展开与否
@@ -11613,9 +11662,10 @@ const tableMethods = {
11613
11662
  return !!rowExpandedFlag && !!rowExpandedMaps[rowid];
11614
11663
  },
11615
11664
  isExpandByRow(row) {
11665
+ const $xeTable = this;
11616
11666
  warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
11617
11667
  // 即将废弃
11618
- return this.isRowExpandByRow(row);
11668
+ return $xeTable.isRowExpandByRow(row);
11619
11669
  },
11620
11670
  /**
11621
11671
  * 手动清空展开行状态,数据会恢复成未展开的状态
@@ -11647,8 +11697,10 @@ const tableMethods = {
11647
11697
  });
11648
11698
  },
11649
11699
  clearRowExpandReserve() {
11650
- this.rowExpandedReserveRowMap = {};
11651
- return this.$nextTick();
11700
+ const $xeTable = this;
11701
+ const internalData = $xeTable;
11702
+ internalData.rowExpandedReserveRowMap = {};
11703
+ return $xeTable.$nextTick();
11652
11704
  },
11653
11705
  getRowExpandRecords() {
11654
11706
  const $xeTable = this;
@@ -11857,10 +11909,13 @@ const tableMethods = {
11857
11909
  * @private
11858
11910
  */
11859
11911
  getTreeStatus() {
11860
- if (this.treeConfig) {
11912
+ const $xeTable = this;
11913
+ const props = $xeTable;
11914
+ const treeOpts = $xeTable.computeTreeOpts;
11915
+ if (props.treeConfig) {
11861
11916
  return {
11862
- config: this.treeOpts,
11863
- rowExpandeds: this.getTreeExpandRecords()
11917
+ config: treeOpts,
11918
+ rowExpandeds: $xeTable.getTreeExpandRecords()
11864
11919
  };
11865
11920
  }
11866
11921
  return null;
@@ -11871,7 +11926,8 @@ const tableMethods = {
11871
11926
  */
11872
11927
  isTreeExpandLoaded(row) {
11873
11928
  const $xeTable = this;
11874
- const { fullAllDataRowIdData } = this;
11929
+ const internalData = $xeTable;
11930
+ const { fullAllDataRowIdData } = internalData;
11875
11931
  const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)];
11876
11932
  return rowRest && !!rowRest.treeLoaded;
11877
11933
  },
@@ -12002,7 +12058,8 @@ const tableMethods = {
12002
12058
  * 切换/展开树节点
12003
12059
  */
12004
12060
  toggleTreeExpand(row) {
12005
- return this.setTreeExpand(row, !this.isTreeExpandByRow(row));
12061
+ const $xeTable = this;
12062
+ return $xeTable.setTreeExpand(row, !$xeTable.isTreeExpandByRow(row));
12006
12063
  },
12007
12064
  /**
12008
12065
  * 设置所有树节点的展开与否
@@ -12040,7 +12097,7 @@ const tableMethods = {
12040
12097
  */
12041
12098
  setTreeExpand(rows, expanded) {
12042
12099
  const $xeTable = this;
12043
- const { treeOpts } = this;
12100
+ const treeOpts = $xeTable.computeTreeOpts;
12044
12101
  const { transform } = treeOpts;
12045
12102
  if (rows) {
12046
12103
  if (!XEUtils.isArray(rows)) {
@@ -12056,7 +12113,7 @@ const tableMethods = {
12056
12113
  }
12057
12114
  }
12058
12115
  }
12059
- return this.$nextTick();
12116
+ return $xeTable.$nextTick();
12060
12117
  },
12061
12118
  /**
12062
12119
  * 判断行是否为树形节点展开状态
@@ -12100,8 +12157,10 @@ const tableMethods = {
12100
12157
  });
12101
12158
  },
12102
12159
  clearTreeExpandReserve() {
12103
- this.treeExpandedReserveRowMap = {};
12104
- return this.$nextTick();
12160
+ const $xeTable = this;
12161
+ const internalData = $xeTable;
12162
+ internalData.treeExpandedReserveRowMap = {};
12163
+ return $xeTable.$nextTick();
12105
12164
  },
12106
12165
  /**
12107
12166
  * 获取表格的滚动状态
@@ -13155,7 +13214,7 @@ const tableMethods = {
13155
13214
  const $xeTable = this;
13156
13215
  const props = $xeTable;
13157
13216
  const internalData = $xeTable;
13158
- return this.$nextTick().then(() => {
13217
+ return $xeTable.$nextTick().then(() => {
13159
13218
  const { editRules } = props;
13160
13219
  const { isActivated } = internalData;
13161
13220
  if (isActivated && slotParams && editRules) {
@@ -13506,7 +13565,8 @@ const tableMethods = {
13506
13565
  return $xeTable.getCellElement(row, column);
13507
13566
  },
13508
13567
  findRowIndexOf(list, row) {
13509
- return row ? XEUtils.findIndexOf(list, item => this.eqRow(item, row)) : -1;
13568
+ const $xeTable = this;
13569
+ return row ? XEUtils.findIndexOf(list, item => $xeTable.eqRow(item, row)) : -1;
13510
13570
  },
13511
13571
  eqRow(row1, row2) {
13512
13572
  const $xeTable = this;
@@ -845,12 +845,20 @@ export default {
845
845
  computeHeaderTooltipOpts() {
846
846
  const $xeTable = this;
847
847
  const props = $xeTable;
848
- return Object.assign({}, getConfig().tooltip, getConfig().table.headerTooltipConfig, props.headerTooltipConfig);
848
+ const tooltipOpts = $xeTable.computeTooltipOpts;
849
+ return Object.assign({}, getConfig().tooltip, {
850
+ enterable: tooltipOpts.enterable,
851
+ defaultPlacement: tooltipOpts.defaultPlacement
852
+ }, getConfig().table.headerTooltipConfig, props.headerTooltipConfig);
849
853
  },
850
854
  computeFooterTooltipOpts() {
851
855
  const $xeTable = this;
852
856
  const props = $xeTable;
853
- return Object.assign({}, getConfig().tooltip, getConfig().table.footerTooltipConfig, props.footerTooltipConfig);
857
+ const tooltipOpts = $xeTable.computeTooltipOpts;
858
+ return Object.assign({}, getConfig().tooltip, {
859
+ enterable: tooltipOpts.enterable,
860
+ defaultPlacement: tooltipOpts.defaultPlacement
861
+ }, getConfig().table.footerTooltipConfig, props.footerTooltipConfig);
854
862
  },
855
863
  computeTableTipConfig() {
856
864
  const $xeTable = this;
@@ -39,6 +39,10 @@ export function createInternalData() {
39
39
  customMaxHeight: 0,
40
40
  // 当前 hover 行
41
41
  hoverRow: null,
42
+ hoverCol: null,
43
+ // 当前行
44
+ currentRow: null,
45
+ currentCol: null,
42
46
  // 最后滚动位置
43
47
  lastScrollLeft: 0,
44
48
  lastScrollTop: 0,
@@ -86,8 +90,6 @@ export function createInternalData() {
86
90
  fullColumnFieldData: {},
87
91
  fullCellHeightMaps: {},
88
92
  fullCellStoreMaps: {},
89
- // 当前行
90
- currentRow: null,
91
93
  // 合并表头单元格的数据
92
94
  mergeHeaderList: [],
93
95
  mergeHeaderMaps: {},
@@ -186,8 +188,6 @@ export function createReactData() {
186
188
  isAllSelected: false,
187
189
  // 复选框属性,有选中且非全选状态
188
190
  isIndeterminate: false,
189
- // 单选框属性,选中列
190
- currentColumn: null,
191
191
  // 单选框属性,选中行
192
192
  selectRadioRow: null,
193
193
  // 表尾合计数据
@@ -396,7 +396,8 @@ export function createReactData() {
396
396
  dragTipText: '',
397
397
  isDragResize: false,
398
398
  isRowLoading: false,
399
- isColLoading: false
399
+ isColLoading: false,
400
+ currColFlag: 1
400
401
  };
401
402
  }
402
403
  const maxKey = '__max';
@@ -1644,7 +1644,7 @@
1644
1644
  padding-top: 0.2em;
1645
1645
  }
1646
1646
  .vxe-table--filter-wrapper .vxe-table--filter-body {
1647
- max-height: 200px;
1647
+ max-height: var(--vxe-ui-vxe-table-filter-default-max-height);
1648
1648
  padding-bottom: 0.2em;
1649
1649
  }
1650
1650
  .vxe-table--filter-wrapper > ul {