vxe-table 3.14.0-beta.26 → 3.14.0-beta.28

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 (99) hide show
  1. package/es/grid/src/grid.js +1 -2
  2. package/es/style.css +1 -1
  3. package/es/table/module/custom/mixin.js +4 -2
  4. package/es/table/module/custom/panel.js +24 -23
  5. package/es/table/module/edit/mixin.js +3 -2
  6. package/es/table/module/export/export-panel.js +5 -4
  7. package/es/table/module/export/import-panel.js +8 -7
  8. package/es/table/module/export/mixin.js +31 -28
  9. package/es/table/module/filter/panel.js +9 -8
  10. package/es/table/module/menu/mixin.js +6 -3
  11. package/es/table/module/menu/panel.js +7 -7
  12. package/es/table/src/body.js +8 -3
  13. package/es/table/src/cell.js +2 -2
  14. package/es/table/src/column.js +11 -9
  15. package/es/table/src/columnInfo.js +6 -6
  16. package/es/table/src/footer.js +6 -2
  17. package/es/table/src/group.js +6 -5
  18. package/es/table/src/header.js +9 -4
  19. package/es/table/src/methods.js +46 -32
  20. package/es/table/src/table.js +11 -21
  21. package/es/table/src/util.js +19 -12
  22. package/es/toolbar/src/toolbar.js +3 -3
  23. package/es/ui/index.js +1 -1
  24. package/es/ui/src/log.js +1 -1
  25. package/lib/grid/src/grid.js +1 -2
  26. package/lib/grid/src/grid.min.js +1 -1
  27. package/lib/index.umd.js +241 -221
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/table/module/custom/mixin.js +5 -3
  31. package/lib/table/module/custom/mixin.min.js +1 -1
  32. package/lib/table/module/custom/panel.js +22 -29
  33. package/lib/table/module/custom/panel.min.js +1 -1
  34. package/lib/table/module/edit/mixin.js +3 -2
  35. package/lib/table/module/edit/mixin.min.js +1 -1
  36. package/lib/table/module/export/export-panel.js +5 -4
  37. package/lib/table/module/export/export-panel.min.js +1 -1
  38. package/lib/table/module/export/import-panel.js +8 -7
  39. package/lib/table/module/export/import-panel.min.js +1 -1
  40. package/lib/table/module/export/mixin.js +36 -35
  41. package/lib/table/module/export/mixin.min.js +1 -1
  42. package/lib/table/module/filter/panel.js +8 -14
  43. package/lib/table/module/filter/panel.min.js +1 -1
  44. package/lib/table/module/menu/mixin.js +6 -3
  45. package/lib/table/module/menu/mixin.min.js +1 -1
  46. package/lib/table/module/menu/panel.js +7 -7
  47. package/lib/table/module/menu/panel.min.js +1 -1
  48. package/lib/table/src/body.js +8 -3
  49. package/lib/table/src/body.min.js +1 -1
  50. package/lib/table/src/cell.js +2 -2
  51. package/lib/table/src/column.js +11 -9
  52. package/lib/table/src/column.min.js +1 -1
  53. package/lib/table/src/columnInfo.js +6 -6
  54. package/lib/table/src/columnInfo.min.js +1 -1
  55. package/lib/table/src/footer.js +6 -2
  56. package/lib/table/src/footer.min.js +1 -1
  57. package/lib/table/src/group.js +6 -5
  58. package/lib/table/src/group.min.js +1 -1
  59. package/lib/table/src/header.js +10 -5
  60. package/lib/table/src/header.min.js +1 -1
  61. package/lib/table/src/methods.js +48 -40
  62. package/lib/table/src/methods.min.js +1 -1
  63. package/lib/table/src/table.js +14 -25
  64. package/lib/table/src/table.min.js +1 -1
  65. package/lib/table/src/util.js +24 -13
  66. package/lib/table/src/util.min.js +1 -1
  67. package/lib/toolbar/src/toolbar.js +3 -3
  68. package/lib/ui/index.js +1 -1
  69. package/lib/ui/index.min.js +1 -1
  70. package/lib/ui/src/log.js +1 -1
  71. package/lib/ui/src/log.min.js +1 -1
  72. package/package.json +2 -2
  73. package/packages/grid/src/grid.ts +1 -2
  74. package/packages/table/module/custom/mixin.ts +6 -3
  75. package/packages/table/module/custom/panel.ts +42 -37
  76. package/packages/table/module/edit/mixin.ts +3 -2
  77. package/packages/table/module/export/export-panel.ts +8 -5
  78. package/packages/table/module/export/import-panel.ts +11 -7
  79. package/packages/table/module/export/mixin.ts +38 -33
  80. package/packages/table/module/filter/panel.ts +13 -8
  81. package/packages/table/module/menu/mixin.ts +12 -6
  82. package/packages/table/module/menu/panel.ts +10 -7
  83. package/packages/table/src/body.ts +8 -3
  84. package/packages/table/src/cell.ts +2 -2
  85. package/packages/table/src/column.ts +14 -10
  86. package/packages/table/src/columnInfo.ts +9 -6
  87. package/packages/table/src/footer.ts +6 -2
  88. package/packages/table/src/group.ts +9 -5
  89. package/packages/table/src/header.ts +10 -4
  90. package/packages/table/src/methods.ts +57 -35
  91. package/packages/table/src/table.ts +12 -21
  92. package/packages/table/src/util.ts +22 -12
  93. package/packages/toolbar/src/toolbar.ts +3 -3
  94. /package/es/{iconfont.1742788336957.ttf → iconfont.1742809042196.ttf} +0 -0
  95. /package/es/{iconfont.1742788336957.woff → iconfont.1742809042196.woff} +0 -0
  96. /package/es/{iconfont.1742788336957.woff2 → iconfont.1742809042196.woff2} +0 -0
  97. /package/lib/{iconfont.1742788336957.ttf → iconfont.1742809042196.ttf} +0 -0
  98. /package/lib/{iconfont.1742788336957.woff → iconfont.1742809042196.woff} +0 -0
  99. /package/lib/{iconfont.1742788336957.woff2 → iconfont.1742809042196.woff2} +0 -0
@@ -131,14 +131,15 @@ export const columnProps = {
131
131
  export const columnWatch = {};
132
132
  Object.keys(columnProps).forEach(name => {
133
133
  columnWatch[name] = function (value) {
134
+ const $xeTable = this.$xeTable;
134
135
  this.columnConfig.update(name, value);
135
- if (this.$xetable) {
136
+ if ($xeTable) {
136
137
  if (name === 'filters') {
137
- this.$xetable.setFilter(this.columnConfig, value);
138
- this.$xetable.handleUpdateDataQueue();
138
+ $xeTable.setFilter(this.columnConfig, value);
139
+ $xeTable.handleUpdateDataQueue();
139
140
  }
140
141
  else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
141
- this.$xetable.handleRefreshColumnQueue();
142
+ $xeTable.handleRefreshColumnQueue();
142
143
  }
143
144
  }
144
145
  };
@@ -148,21 +149,22 @@ export default {
148
149
  props: columnProps,
149
150
  provide() {
150
151
  return {
151
- $xecolumn: this,
152
- $xegrid: null
152
+ $xeColumn: this,
153
+ $xeGrid: null
153
154
  };
154
155
  },
155
156
  inject: {
156
- $xetable: {
157
+ $xeTable: {
157
158
  default: null
158
159
  },
159
- $xecolumn: {
160
+ $xeColumn: {
160
161
  default: null
161
162
  }
162
163
  },
163
164
  watch: columnWatch,
164
165
  created() {
165
- this.columnConfig = this.createColumn(this.$xetable, this);
166
+ const $xeTable = this.$xeTable;
167
+ this.columnConfig = this.createColumn($xeTable, this);
166
168
  },
167
169
  mounted() {
168
170
  this.columnConfig.slots = this.$scopedSlots;
@@ -6,12 +6,12 @@ import { warnLog, errLog } from '../../ui/src/log';
6
6
  const { getI18n, formats } = VxeUI;
7
7
  export class ColumnInfo {
8
8
  /* eslint-disable @typescript-eslint/no-use-before-define */
9
- constructor($xetable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
10
- const $xegrid = $xetable.$xegrid;
11
- const proxyOpts = $xegrid ? $xegrid.proxyOpts : null;
9
+ constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
10
+ const tableProps = $xeTable;
11
+ const $xeGrid = $xeTable.$xeGrid;
12
+ const proxyOpts = $xeGrid ? $xeGrid.proxyOpts : null;
12
13
  const formatter = _vm.formatter;
13
14
  const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
14
- const tableProps = $xetable;
15
15
  const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
16
16
  if (_vm.type && types.indexOf(_vm.type) === -1) {
17
17
  warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
@@ -24,7 +24,7 @@ export class ColumnInfo {
24
24
  }
25
25
  if (_vm.type === 'expand') {
26
26
  const { treeConfig } = tableProps;
27
- if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
27
+ if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
28
28
  errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
29
29
  }
30
30
  }
@@ -136,7 +136,7 @@ export class ColumnInfo {
136
136
  slots: _vm.slots
137
137
  });
138
138
  if (proxyOpts && proxyOpts.beforeColumn) {
139
- proxyOpts.beforeColumn({ $grid: $xegrid, column: this });
139
+ proxyOpts.beforeColumn({ $grid: $xeGrid, column: this });
140
140
  }
141
141
  }
142
142
  getTitle() {
@@ -24,6 +24,7 @@ function renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIn
24
24
  const tableProps = $xeTable;
25
25
  const tableReactData = $xeTable;
26
26
  const tableInternalData = $xeTable;
27
+ const $xeGrid = $xeTable.$xeGrid;
27
28
  const { fixedType } = props;
28
29
  const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
29
30
  const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData;
@@ -58,7 +59,7 @@ function renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIn
58
59
  const itemIndex = _columnIndex;
59
60
  const cellParams = {
60
61
  $table: $xeTable,
61
- $grid: $xeTable.xegrid,
62
+ $grid: $xeGrid,
62
63
  row,
63
64
  rowIndex: _rowIndex,
64
65
  _rowIndex,
@@ -380,7 +381,10 @@ export default {
380
381
  attrs: {
381
382
  name: column.id
382
383
  },
383
- key: $columnIndex
384
+ key: $columnIndex,
385
+ style: {
386
+ width: `${column.renderWidth}px`
387
+ }
384
388
  });
385
389
  })),
386
390
  /**
@@ -7,21 +7,22 @@ export default {
7
7
  props: columnProps,
8
8
  provide() {
9
9
  return {
10
- $xecolumn: this,
11
- $xegrid: null
10
+ $xeColumn: this,
11
+ $xeGrid: null
12
12
  };
13
13
  },
14
14
  inject: {
15
- $xetable: {
15
+ $xeTable: {
16
16
  default: null
17
17
  },
18
- $xecolumn: {
18
+ $xeColumn: {
19
19
  default: null
20
20
  }
21
21
  },
22
22
  watch: columnWatch,
23
23
  created() {
24
- this.columnConfig = this.createColumn(this.$xetable, this);
24
+ const $xeTable = this.$xeTable;
25
+ this.columnConfig = this.createColumn($xeTable, this);
25
26
  },
26
27
  mounted() {
27
28
  const { $scopedSlots } = this;
@@ -7,7 +7,7 @@ const cellType = 'header';
7
7
  const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
8
8
  const props = _vm;
9
9
  const $xeTable = _vm.$parent;
10
- const $xeGrid = $xeTable.xegrid;
10
+ const $xeGrid = $xeTable.$xeGrid;
11
11
  const tableProps = $xeTable;
12
12
  const tableReactData = $xeTable;
13
13
  const tableInternalData = $xeTable;
@@ -351,7 +351,10 @@ export default {
351
351
  attrs: {
352
352
  name: column.id
353
353
  },
354
- key: $columnIndex
354
+ key: $columnIndex,
355
+ style: {
356
+ width: `${column.renderWidth}px`
357
+ }
355
358
  });
356
359
  })),
357
360
  /**
@@ -390,8 +393,10 @@ export default {
390
393
  },
391
394
  methods: {
392
395
  uploadColumn() {
393
- const { $parent: $xetable } = this;
394
- this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
396
+ const $xeTable = this.$parent;
397
+ const tableReactData = $xeTable;
398
+ const { isGroup } = tableReactData;
399
+ this.headerColumn = isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
395
400
  }
396
401
  }
397
402
  };
@@ -1695,9 +1695,10 @@ function hideDropTip($xeTable) {
1695
1695
  * @param {Event} evnt 事件
1696
1696
  * @param {Row} row 行对象
1697
1697
  */
1698
- function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1698
+ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
1699
1699
  const reactData = $xeTable;
1700
- if (!overflowElem) {
1700
+ const tipOverEl = overflowElem || tdEl;
1701
+ if (!tipOverEl) {
1701
1702
  return $xeTable.$nextTick();
1702
1703
  }
1703
1704
  params.cell = tdEl;
@@ -1707,9 +1708,8 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1707
1708
  const { showAll, contentMethod } = tooltipOpts;
1708
1709
  const customContent = contentMethod ? contentMethod(params) : null;
1709
1710
  const useCustom = contentMethod && !XEUtils.eqNull(customContent);
1710
- const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim();
1711
- const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
1712
- if (content && (showAll || useCustom || isCellOverflow)) {
1711
+ const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
1712
+ if (content && (showAll || useCustom || (tipOverEl.scrollWidth > tipOverEl.clientWidth))) {
1713
1713
  Object.assign(tooltipStore, {
1714
1714
  row,
1715
1715
  column,
@@ -1719,7 +1719,7 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1719
1719
  $xeTable.$nextTick(() => {
1720
1720
  const $tooltip = $xeTable.$refs.refTooltip;
1721
1721
  if ($tooltip && $tooltip.open) {
1722
- $tooltip.open(isCellOverflow ? overflowElem : (tipElem || overflowElem), formatText(content));
1722
+ $tooltip.open(tipOverEl, formatText(content));
1723
1723
  }
1724
1724
  });
1725
1725
  }
@@ -2408,10 +2408,11 @@ function handleRowExpandScroll($xeTable) {
2408
2408
  }
2409
2409
  const Methods = {
2410
2410
  callSlot(slotFunc, params, h, vNodes) {
2411
+ const $xeTable = this;
2412
+ const $xeGrid = $xeTable.$xeGrid;
2411
2413
  if (slotFunc) {
2412
- const { $xegrid } = this;
2413
- if ($xegrid) {
2414
- return $xegrid.callSlot(slotFunc, params, h, vNodes);
2414
+ if ($xeGrid) {
2415
+ return $xeGrid.callSlot(slotFunc, params, h, vNodes);
2415
2416
  }
2416
2417
  if (XEUtils.isFunction(slotFunc)) {
2417
2418
  return getSlotVNs(slotFunc.call(this, params, h, vNodes));
@@ -2427,15 +2428,17 @@ const Methods = {
2427
2428
  * 获取父容器元素
2428
2429
  */
2429
2430
  getParentElem() {
2430
- const { $el, $xegrid } = this;
2431
- return $xegrid ? $xegrid.$el.parentNode : $el.parentNode;
2431
+ const $xeTable = this;
2432
+ const $xeGrid = $xeTable.$xeGrid;
2433
+ const { $el } = this;
2434
+ return $xeGrid ? $xeGrid.$el.parentNode : $el.parentNode;
2432
2435
  },
2433
2436
  /**
2434
2437
  * 获取父容器的高度
2435
2438
  */
2436
2439
  getParentHeight() {
2437
2440
  const $xeTable = this;
2438
- const $xeGrid = $xeTable.xeGrid;
2441
+ const $xeGrid = $xeTable.$xeGrid;
2439
2442
  const props = $xeTable;
2440
2443
  const { height } = props;
2441
2444
  const el = $xeTable.$refs.refElem;
@@ -2461,8 +2464,9 @@ const Methods = {
2461
2464
  * 如果存在表尾合计滚动条,则需要排除滚动条高度
2462
2465
  */
2463
2466
  getExcludeHeight() {
2464
- const { $xegrid } = this;
2465
- return $xegrid ? $xegrid.getExcludeHeight() : 0;
2467
+ const $xeTable = this;
2468
+ const $xeGrid = $xeTable.$xeGrid;
2469
+ return $xeGrid ? $xeGrid.getExcludeHeight() : 0;
2466
2470
  },
2467
2471
  /**
2468
2472
  * 重置表格的一切数据状态
@@ -4031,9 +4035,9 @@ const Methods = {
4031
4035
  return this.refreshColumn(true);
4032
4036
  },
4033
4037
  handleCustomRestore(storeData) {
4034
- const $xetable = this;
4035
- const reactData = $xetable;
4036
- const internalData = $xetable;
4038
+ const $xeTable = this;
4039
+ const reactData = $xeTable;
4040
+ const internalData = $xeTable;
4037
4041
  let { collectColumn } = internalData;
4038
4042
  const { resizableData, sortData, visibleData, fixedData } = storeData;
4039
4043
  let hasCustomSort = false;
@@ -4835,6 +4839,8 @@ const Methods = {
4835
4839
  }
4836
4840
  },
4837
4841
  preventEvent(evnt, type, args, next, end) {
4842
+ const $xeTable = this;
4843
+ const $xeGrid = $xeTable.$xeGrid;
4838
4844
  let evntList = interceptor.get(type);
4839
4845
  // 兼容老版本
4840
4846
  if (!evntList.length && type === 'event.clearEdit') {
@@ -4850,7 +4856,7 @@ const Methods = {
4850
4856
  let isStop = false;
4851
4857
  for (let i = 0; i < evntList.length; i++) {
4852
4858
  const func = evntList[i];
4853
- const fnRest = func(Object.assign({ $grid: this.$xegrid, $table: this, $event: evnt }, args));
4859
+ const fnRest = func(Object.assign({ $grid: $xeGrid, $table: $xeTable, $event: evnt }, args));
4854
4860
  if (fnRest === false) {
4855
4861
  isStop = true;
4856
4862
  break;
@@ -4875,7 +4881,9 @@ const Methods = {
4875
4881
  * 全局按下事件处理
4876
4882
  */
4877
4883
  handleGlobalMousedownEvent(evnt) {
4878
- const { $el, $refs, $xegrid, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this;
4884
+ const $xeTable = this;
4885
+ const $xeGrid = $xeTable.$xeGrid;
4886
+ const { $el, $refs, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this;
4879
4887
  const { actived } = editStore;
4880
4888
  const { customWrapper, refValidTooltip } = $refs;
4881
4889
  const tableFilter = $refs.refTableFilter;
@@ -4965,7 +4973,7 @@ const Methods = {
4965
4973
  }
4966
4974
  }
4967
4975
  else if (mouseConfig) {
4968
- if (!getEventTargetNode(evnt, $el).flag && !($xegrid && getEventTargetNode(evnt, $xegrid.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
4976
+ if (!getEventTargetNode(evnt, $el).flag && !($xeGrid && getEventTargetNode(evnt, $xeGrid.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
4969
4977
  if (this.clearSelected) {
4970
4978
  this.clearSelected();
4971
4979
  }
@@ -4987,7 +4995,7 @@ const Methods = {
4987
4995
  if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
4988
4996
  this.closeMenu();
4989
4997
  }
4990
- const isActivated = getEventTargetNode(evnt, ($xegrid || this).$el).flag;
4998
+ const isActivated = getEventTargetNode(evnt, ($xeGrid || this).$el).flag;
4991
4999
  // 如果存在校验,点击了表格之外则清除
4992
5000
  if (!isActivated && editRules && validOpts.autoClear) {
4993
5001
  this.validErrorMaps = {};
@@ -5051,6 +5059,7 @@ const Methods = {
5051
5059
  handleGlobalKeydownEvent(evnt) {
5052
5060
  const $xeTable = this;
5053
5061
  const internalData = $xeTable;
5062
+ const $xeGrid = $xeTable.$xeGrid;
5054
5063
  // 该行为只对当前激活的表格有效
5055
5064
  if (this.isActivated) {
5056
5065
  this.preventEvent(evnt, 'event.keydown', null, () => {
@@ -5232,7 +5241,7 @@ const Methods = {
5232
5241
  column: selected.column,
5233
5242
  columnIndex: this.getColumnIndex(selected.column),
5234
5243
  $table: this,
5235
- $grid: this.$xegrid
5244
+ $grid: $xeGrid
5236
5245
  };
5237
5246
  // 是否被禁用
5238
5247
  if (!beforeEditMethod || beforeEditMethod(params)) {
@@ -5259,7 +5268,7 @@ const Methods = {
5259
5268
  column: selected.column,
5260
5269
  columnIndex: this.getColumnIndex(selected.column),
5261
5270
  $table: this,
5262
- $grid: this.$xegrid
5271
+ $grid: $xeGrid
5263
5272
  };
5264
5273
  // 是否被禁用
5265
5274
  if (!beforeEditMethod || beforeEditMethod(params)) {
@@ -5288,7 +5297,7 @@ const Methods = {
5288
5297
  rowIndex: this.getRowIndex(parentRow),
5289
5298
  $rowIndex: this.getVMRowIndex(parentRow),
5290
5299
  $table: this,
5291
- $grid: this.$xegrid
5300
+ $grid: $xeGrid
5292
5301
  };
5293
5302
  this.setTreeExpand(parentRow, false)
5294
5303
  .then(() => this.scrollToRow(parentRow))
@@ -5310,7 +5319,7 @@ const Methods = {
5310
5319
  column: selected.column,
5311
5320
  columnIndex: this.getColumnIndex(selected.column),
5312
5321
  $table: this,
5313
- $grid: this.$xegrid
5322
+ $grid: $xeGrid
5314
5323
  };
5315
5324
  if (!beforeEditMethod || beforeEditMethod(params)) {
5316
5325
  if (editMethod) {
@@ -5431,7 +5440,7 @@ const Methods = {
5431
5440
  return;
5432
5441
  }
5433
5442
  if (tooltipStore.column !== column || !tooltipStore.visible) {
5434
- handleTooltip($xeTable, evnt, thEl, cellEl, null, params);
5443
+ handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--title') || cellEl, params);
5435
5444
  }
5436
5445
  },
5437
5446
  /**
@@ -5461,7 +5470,7 @@ const Methods = {
5461
5470
  }
5462
5471
  }
5463
5472
  if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
5464
- handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), null, params);
5473
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
5465
5474
  }
5466
5475
  },
5467
5476
  /**
@@ -5472,10 +5481,10 @@ const Methods = {
5472
5481
  const reactData = $xeTable;
5473
5482
  const { column } = params;
5474
5483
  const { tooltipStore } = reactData;
5475
- const cell = evnt.currentTarget;
5484
+ const tdEl = evnt.currentTarget;
5476
5485
  handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
5477
5486
  if (tooltipStore.column !== column || !tooltipStore.visible) {
5478
- handleTooltip($xeTable, evnt, cell, cell.querySelector('.vxe-cell--wrapper') || cell.children[0], null, params);
5487
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
5479
5488
  }
5480
5489
  },
5481
5490
  openTooltip(target, content) {
@@ -8986,13 +8995,15 @@ const Methods = {
8986
8995
  * 更新表尾合计
8987
8996
  */
8988
8997
  updateFooter() {
8998
+ const $xeTable = this;
8999
+ const $xeGrid = $xeTable.$xeGrid;
8989
9000
  const { showFooter, visibleColumn, footerData, footerMethod } = this;
8990
9001
  let footData = [];
8991
9002
  if (showFooter && footerData && footerData.length) {
8992
9003
  footData = footerData.slice(0);
8993
9004
  }
8994
9005
  else if (showFooter && footerMethod) {
8995
- footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: this.afterFullData, $table: this, $grid: this.$xegrid }) : [];
9006
+ footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: this.afterFullData, $table: $xeTable, $grid: $xeGrid }) : [];
8996
9007
  }
8997
9008
  this.footerTableData = footData;
8998
9009
  return this.$nextTick();
@@ -9124,11 +9135,14 @@ const Methods = {
9124
9135
  },
9125
9136
  dispatchEvent(type, params, evnt) {
9126
9137
  const $xeTable = this;
9127
- $xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeTable.$xegrid }, params));
9138
+ const $xeGrid = $xeTable.$xeGrid;
9139
+ $xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid }, params));
9128
9140
  },
9129
9141
  // 已废弃,使用 dispatchEvent
9130
9142
  emitEvent(type, params, evnt) {
9131
- this.$emit(type, Object.assign({ $table: this, $grid: this.$xegrid, $event: evnt }, params));
9143
+ const $xeTable = this;
9144
+ const $xeGrid = $xeTable.$xeGrid;
9145
+ this.$emit(type, Object.assign({ $table: $xeTable, $grid: $xeGrid, $event: evnt }, params));
9132
9146
  },
9133
9147
  focus() {
9134
9148
  this.isActivated = true;
@@ -27,14 +27,14 @@ const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globa
27
27
  * 渲染浮固定列
28
28
  * 分别渲染左边固定列和右边固定列
29
29
  * 如果宽度足够情况下,则不需要渲染固定列
30
- * @param {Function} h 创建 VNode 函数
31
- * @param {Object} $xetable 表格实例
32
- * @param {String} fixedType 固定列类型
33
30
  */
34
- function renderFixed(h, $xetable, fixedType) {
35
- const { _e, tableData, tableColumn, tableGroupColumn, vSize, showHeader, showFooter, columnStore, footerTableData } = $xetable;
31
+ function renderFixed(h, $xeTable, fixedType) {
32
+ const props = $xeTable;
33
+ const reactData = $xeTable;
34
+ const { showHeader, showFooter } = props;
35
+ const { tableData, tableColumn, tableGroupColumn, columnStore, footerTableData } = reactData;
36
36
  const isFixedLeft = fixedType === 'left';
37
- const fixedColumn = columnStore[`${fixedType}List`];
37
+ const fixedColumn = isFixedLeft ? columnStore.leftList : columnStore.rightList;
38
38
  return h('div', {
39
39
  ref: isFixedLeft ? 'refLeftContainer' : 'refRightContainer',
40
40
  class: `vxe-table--fixed-${fixedType}-wrapper`
@@ -46,19 +46,17 @@ function renderFixed(h, $xetable, fixedType) {
46
46
  tableData,
47
47
  tableColumn,
48
48
  tableGroupColumn,
49
- size: vSize,
50
49
  fixedColumn
51
50
  },
52
51
  ref: `${fixedType}Header`
53
52
  })
54
- : _e(),
53
+ : renderEmptyElement($xeTable),
55
54
  h(TableBodyComponent, {
56
55
  props: {
57
56
  fixedType,
58
57
  tableData,
59
58
  tableColumn,
60
- fixedColumn,
61
- size: vSize
59
+ fixedColumn
62
60
  },
63
61
  ref: `${fixedType}Body`
64
62
  }),
@@ -68,12 +66,11 @@ function renderFixed(h, $xetable, fixedType) {
68
66
  footerTableData,
69
67
  tableColumn,
70
68
  fixedColumn,
71
- fixedType,
72
- size: vSize
69
+ fixedType
73
70
  },
74
71
  ref: `${fixedType}Footer`
75
72
  })
76
- : _e()
73
+ : renderEmptyElement($xeTable)
77
74
  ]);
78
75
  }
79
76
  function renderEmptyBody(h, _vm) {
@@ -395,7 +392,6 @@ export default {
395
392
  props: tableProps,
396
393
  provide() {
397
394
  return {
398
- $xetable: this,
399
395
  $xeTable: this,
400
396
  xecolgroup: null
401
397
  };
@@ -406,12 +402,6 @@ export default {
406
402
  },
407
403
  $xeGrid: {
408
404
  default: null
409
- },
410
- $xegrid: {
411
- default: null
412
- },
413
- xeGrid: {
414
- default: null
415
405
  }
416
406
  },
417
407
  data() {
@@ -1610,7 +1600,7 @@ export default {
1610
1600
  const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
1611
1601
  const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
1612
1602
  const $xeTable = this;
1613
- const $xeGrid = $xeTable.xeGrid;
1603
+ const $xeGrid = $xeTable.$xeGrid;
1614
1604
  const props = $xeTable;
1615
1605
  const slots = $xeTable.$scopedSlots;
1616
1606
  const reactData = $xeTable;
@@ -188,34 +188,41 @@ export const handleRowidOrRow = ($xeTable, rowidOrRow) => {
188
188
  };
189
189
  // 组装列配置
190
190
  export function assembleColumn(_vm) {
191
- const { $el, $xetable, $xecolumn, columnConfig } = _vm;
192
- const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
191
+ const $xeTable = _vm.$xeTable;
192
+ const reactData = $xeTable;
193
+ const { staticColumns } = reactData;
194
+ const { $el, $xeColumn, columnConfig } = _vm;
195
+ const groupConfig = $xeColumn ? $xeColumn.columnConfig : null;
193
196
  if (groupConfig) {
194
- if ($xecolumn.$options._componentTag === 'vxe-table-column') {
195
- errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
197
+ if ($xeColumn.$options._componentTag === 'vxe-table-column') {
198
+ errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xeColumn.title} ...>`, `<vxe-table-column title=${$xeColumn.title} ...>`]);
196
199
  }
197
- else if ($xecolumn.$options._componentTag === 'vxe-column') {
198
- warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
200
+ else if ($xeColumn.$options._componentTag === 'vxe-column') {
201
+ warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xeColumn.title} ...>`, `<vxe-column title=${$xeColumn.title} ...>`]);
199
202
  }
200
203
  if (!groupConfig.children) {
201
204
  groupConfig.children = [];
202
205
  }
203
- groupConfig.children.splice(XEUtils.arrayIndexOf($xecolumn.$el.children, $el), 0, columnConfig);
206
+ groupConfig.children.splice(XEUtils.arrayIndexOf($xeColumn.$el.children, $el), 0, columnConfig);
204
207
  }
205
208
  else {
206
- $xetable.staticColumns.splice(XEUtils.arrayIndexOf($xetable.$refs.hideColumn.children, $el), 0, columnConfig);
209
+ staticColumns.splice(XEUtils.arrayIndexOf($xeTable.$refs.hideColumn.children, $el), 0, columnConfig);
207
210
  }
208
211
  }
209
212
  // 销毁列
210
213
  export function destroyColumn(_vm) {
211
- const { $xetable, columnConfig } = _vm;
212
- const matchObj = XEUtils.findTree($xetable.staticColumns, column => column === columnConfig);
214
+ const $xeTable = _vm.$xeTable;
215
+ const reactData = $xeTable;
216
+ const { staticColumns } = reactData;
217
+ const { columnConfig } = _vm;
218
+ const matchObj = XEUtils.findTree(staticColumns, column => column === columnConfig);
213
219
  if (matchObj) {
214
220
  matchObj.items.splice(matchObj.index, 1);
215
221
  }
216
222
  }
217
- export function getRootColumn($xetable, column) {
218
- const fullColumnIdData = $xetable.fullColumnIdData;
223
+ export function getRootColumn($xeTable, column) {
224
+ const internalData = $xeTable;
225
+ const { fullColumnIdData } = internalData;
219
226
  if (!column) {
220
227
  return null;
221
228
  }
@@ -663,13 +663,13 @@ export default {
663
663
  $xeToolbar.$nextTick(() => {
664
664
  const { refresh } = props;
665
665
  const refreshOpts = $xeToolbar.computeRefreshOpts;
666
- const $xetable = this.fintTable();
666
+ const $xeTable = this.fintTable();
667
667
  const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
668
668
  if (refresh && !$xeGrid && !queryMethod) {
669
669
  warnLog('vxe.error.notFunc', ['queryMethod']);
670
670
  }
671
- if ($xetable) {
672
- $xetable.connect(this);
671
+ if ($xeTable) {
672
+ $xeTable.connect(this);
673
673
  }
674
674
  const customOpts = $xeToolbar.computeCustomOpts;
675
675
  if (customOpts.isFooter) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.14.0-beta.26";
3
+ export const version = "3.14.0-beta.28";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.14.0-beta.26"}`;
3
+ const version = `table v${"3.14.0-beta.28"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
@@ -432,8 +432,7 @@ var _default = exports.default = {
432
432
  }),
433
433
  provide() {
434
434
  return {
435
- $xeGrid: this,
436
- $xegrid: this
435
+ $xeGrid: this
437
436
  };
438
437
  },
439
438
  data() {