vxe-table 3.19.3 → 3.19.5

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 (57) 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/edit/mixin.js +13 -11
  6. package/es/table/src/body.js +30 -14
  7. package/es/table/src/methods.js +122 -4
  8. package/es/table/src/table.js +9 -5
  9. package/es/table/src/util.js +0 -61
  10. package/es/table/style.css +4 -3
  11. package/es/table/style.min.css +1 -1
  12. package/es/ui/index.js +3 -2
  13. package/es/ui/src/dom.js +17 -0
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-table/style.css +4 -3
  16. package/es/vxe-table/style.min.css +1 -1
  17. package/lib/index.css +1 -1
  18. package/lib/index.min.css +1 -1
  19. package/lib/index.umd.js +209 -116
  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/edit/mixin.js +13 -11
  24. package/lib/table/module/edit/mixin.min.js +1 -1
  25. package/lib/table/src/body.js +28 -15
  26. package/lib/table/src/body.min.js +1 -1
  27. package/lib/table/src/methods.js +139 -3
  28. package/lib/table/src/methods.min.js +1 -1
  29. package/lib/table/src/table.js +8 -5
  30. package/lib/table/src/table.min.js +1 -1
  31. package/lib/table/src/util.js +0 -81
  32. package/lib/table/src/util.min.js +1 -1
  33. package/lib/table/style/style.css +4 -3
  34. package/lib/table/style/style.min.css +1 -1
  35. package/lib/ui/index.js +3 -2
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/dom.js +18 -0
  38. package/lib/ui/src/dom.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 +4 -3
  42. package/lib/vxe-table/style/style.min.css +1 -1
  43. package/package.json +2 -2
  44. package/packages/table/module/edit/mixin.ts +13 -11
  45. package/packages/table/src/body.ts +29 -14
  46. package/packages/table/src/methods.ts +127 -4
  47. package/packages/table/src/table.ts +9 -5
  48. package/packages/table/src/util.ts +0 -66
  49. package/packages/ui/index.ts +2 -1
  50. package/packages/ui/src/dom.ts +18 -0
  51. package/styles/components/table.scss +34 -3
  52. /package/es/{iconfont.1761545705692.ttf → iconfont.1761784799557.ttf} +0 -0
  53. /package/es/{iconfont.1761545705692.woff → iconfont.1761784799557.woff} +0 -0
  54. /package/es/{iconfont.1761545705692.woff2 → iconfont.1761784799557.woff2} +0 -0
  55. /package/lib/{iconfont.1761545705692.ttf → iconfont.1761784799557.ttf} +0 -0
  56. /package/lib/{iconfont.1761545705692.woff → iconfont.1761784799557.woff} +0 -0
  57. /package/lib/{iconfont.1761545705692.woff2 → iconfont.1761784799557.woff2} +0 -0
@@ -60,17 +60,17 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
60
60
  const { item: parentRow } = matchObj;
61
61
  const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)];
62
62
  const parentLevel = parentRest ? parentRest.level : 0;
63
- let parentChilds = parentRow[childrenField];
64
- let mapChilds = parentRow[mapChildrenField];
65
- if (!XEUtils.isArray(parentChilds)) {
66
- parentChilds = parentRow[childrenField] = [];
63
+ let pChilds = parentRow[childrenField];
64
+ let pMapChilds = parentRow[mapChildrenField];
65
+ if (!XEUtils.isArray(pChilds)) {
66
+ pChilds = parentRow[childrenField] = [];
67
67
  }
68
- if (!XEUtils.isArray(mapChilds)) {
69
- mapChilds = parentRow[childrenField] = [];
68
+ if (!XEUtils.isArray(pMapChilds)) {
69
+ pMapChilds = parentRow[mapChildrenField] = [];
70
70
  }
71
- parentChilds[funcName](item);
72
- mapChilds[funcName](item);
73
- const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: parentChilds, parent: parentRow, level: parentLevel + 1, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
71
+ pChilds[funcName](item);
72
+ pMapChilds[funcName](item);
73
+ const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: pChilds, parent: parentRow, level: parentLevel + 1, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
74
74
  fullDataRowIdData[rowid] = rest;
75
75
  fullAllDataRowIdData[rowid] = rest;
76
76
  }
@@ -174,14 +174,16 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
174
174
  treeRecords.forEach((row, i) => {
175
175
  if (parentRow) {
176
176
  if (row[parentField] !== parentRow[rowField]) {
177
- row[parentField] = parentRow[rowField];
178
177
  errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, `${parentField}=${parentRow[rowField]}`]);
178
+ row[parentField] = parentRow[rowField];
179
179
  }
180
180
  }
181
181
  else {
182
182
  if (row[parentField] !== null) {
183
+ if (!XEUtils.eqNull(row[parentField])) {
184
+ errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
185
+ }
183
186
  row[parentField] = null;
184
- errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
185
187
  }
186
188
  }
187
189
  let targetIndex = matchMapObj.index + i;
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { VxeUI } from '../../ui';
3
3
  import { isEnableConf, getClass } from '../../ui/src/utils';
4
- import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRestHeight } from './util';
4
+ import { getRowid, createHandleGetRowId, getCellRestHeight } from './util';
5
5
  import { updateCellTitle } from '../../ui/src/dom';
6
6
  import { getSlotVNs } from '../../ui/src/vn';
7
7
  const { getI18n, renderer, renderEmptyElement } = VxeUI;
@@ -19,22 +19,38 @@ function renderLine(h, $xeTable, rowid, params, cellHeight) {
19
19
  const tableProps = $xeTable;
20
20
  const tableInternalData = $xeTable;
21
21
  const { column } = params;
22
- const { afterFullData } = tableInternalData;
23
22
  const { treeConfig } = tableProps;
23
+ const cellOpts = $xeTable.computeCellOpts;
24
+ const rowOpts = $xeTable.computeRowOpts;
25
+ const defaultRowHeight = $xeTable.computeDefaultRowHeight;
24
26
  const treeOpts = $xeTable.computeTreeOpts;
25
27
  const { slots, treeNode } = column;
26
28
  const { fullAllDataRowIdData } = tableInternalData;
27
- if (slots && slots.line) {
28
- return $xeTable.callSlot(slots.line, params, h);
29
- }
30
- const rowRest = fullAllDataRowIdData[rowid];
31
- let rLevel = 0;
32
- let prevRow = null;
33
- if (rowRest) {
34
- rLevel = rowRest.level;
35
- prevRow = rowRest.items[rowRest.treeIndex - 1];
36
- }
37
29
  if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
30
+ if (slots && slots.line) {
31
+ return $xeTable.callSlot(slots.line, params, h);
32
+ }
33
+ const rowRest = fullAllDataRowIdData[rowid];
34
+ let rLevel = 0;
35
+ let prevRow = null;
36
+ let parentRow = null;
37
+ let lineHeight = '';
38
+ if (rowRest) {
39
+ rLevel = rowRest.level;
40
+ prevRow = rowRest.items[rowRest.treeIndex - 1];
41
+ parentRow = rowRest.parent;
42
+ }
43
+ if (!rLevel && !treeOpts.showRootLine) {
44
+ return [];
45
+ }
46
+ if (prevRow) {
47
+ const prevRowRest = fullAllDataRowIdData[getRowid($xeTable, prevRow)] || {};
48
+ lineHeight = `${prevRowRest.lineHeight || 0}px`;
49
+ }
50
+ else if (rLevel && parentRow) {
51
+ const parentRowRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)] || {};
52
+ lineHeight = `calc(-1em + ${Math.floor(cellHeight / 2 + getCellRestHeight(parentRowRest, cellOpts, rowOpts, defaultRowHeight) / 2)}px)`;
53
+ }
38
54
  return [
39
55
  h('div', {
40
56
  key: 'tl',
@@ -43,9 +59,9 @@ function renderLine(h, $xeTable, rowid, params, cellHeight) {
43
59
  h('div', {
44
60
  class: 'vxe-tree--line',
45
61
  style: {
46
- height: `${getRowid($xeTable, afterFullData[0]) === rowid ? 1 : calcTreeLine(params, prevRow)}px`,
62
+ height: lineHeight,
47
63
  bottom: `-${Math.floor(cellHeight / 2)}px`,
48
- left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
64
+ left: `calc(${(rLevel * treeOpts.indent)}px + 1em)`
49
65
  }
50
66
  })
51
67
  ])
@@ -1,5 +1,5 @@
1
1
  import XEUtils from 'xe-utils';
2
- import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom';
2
+ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement } 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';
@@ -2424,6 +2424,9 @@ function autoCellWidth($xeTable) {
2424
2424
  updateColumnOffsetLeft($xeTable);
2425
2425
  updateHeight($xeTable);
2426
2426
  }
2427
+ /**
2428
+ * 计算自适应行高
2429
+ */
2427
2430
  const calcCellAutoHeight = (rowRest, wrapperEl) => {
2428
2431
  const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
2429
2432
  let colHeight = rowRest.height;
@@ -2441,14 +2444,20 @@ const calcCellAutoHeight = (rowRest, wrapperEl) => {
2441
2444
  }
2442
2445
  return colHeight;
2443
2446
  };
2447
+ /**
2448
+ * 自适应行高
2449
+ */
2444
2450
  const calcCellHeight = ($xeTable) => {
2451
+ const props = $xeTable;
2445
2452
  const reactData = $xeTable;
2446
2453
  const internalData = $xeTable;
2454
+ const { treeConfig } = props;
2447
2455
  const { tableData, isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
2448
2456
  const { fullAllDataRowIdData } = internalData;
2457
+ const treeOpts = $xeTable.computeTreeOpts;
2449
2458
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
2450
2459
  const el = $xeTable.$refs.refElem;
2451
- if (!isAllOverflow && (scrollYLoad || scrollXLoad) && el) {
2460
+ if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine)) && el) {
2452
2461
  const { handleGetRowId } = createHandleGetRowId($xeTable);
2453
2462
  tableData.forEach(row => {
2454
2463
  const rowid = handleGetRowId(row);
@@ -3286,6 +3295,7 @@ function loadTableData($xeTable, datas, isReset) {
3286
3295
  }
3287
3296
  reactData.isRowLoading = false;
3288
3297
  handleRecalculateStyle($xeTable, false, false, false);
3298
+ updateTreeLineStyle($xeTable);
3289
3299
  // 如果是自动行高,特殊情况需调用 recalculate 手动刷新
3290
3300
  if (!props.showOverflow) {
3291
3301
  setTimeout(() => {
@@ -3299,6 +3309,7 @@ function loadTableData($xeTable, datas, isReset) {
3299
3309
  .then(() => {
3300
3310
  handleRecalculateStyle($xeTable, false, true, true);
3301
3311
  updateRowOffsetTop($xeTable);
3312
+ updateTreeLineStyle($xeTable);
3302
3313
  resolve();
3303
3314
  });
3304
3315
  }
@@ -3308,6 +3319,7 @@ function loadTableData($xeTable, datas, isReset) {
3308
3319
  .then(() => {
3309
3320
  handleRecalculateStyle($xeTable, false, true, true);
3310
3321
  updateRowOffsetTop($xeTable);
3322
+ updateTreeLineStyle($xeTable);
3311
3323
  resolve();
3312
3324
  });
3313
3325
  });
@@ -3790,6 +3802,9 @@ function updateHeight($xeTable) {
3790
3802
  internalData.customHeight = 300;
3791
3803
  }
3792
3804
  }
3805
+ /**
3806
+ * 计算自适应列宽
3807
+ */
3793
3808
  function calcColumnAutoWidth($xeTable, column, wrapperEl) {
3794
3809
  const columnOpts = $xeTable.computeColumnOpts;
3795
3810
  const { autoOptions } = columnOpts;
@@ -3818,6 +3833,9 @@ function calcColumnAutoWidth($xeTable, column, wrapperEl) {
3818
3833
  }
3819
3834
  return colWidth + leftRightPadding;
3820
3835
  }
3836
+ /**
3837
+ * 自适应列宽
3838
+ */
3821
3839
  function calcCellWidth($xeTable) {
3822
3840
  const internalData = $xeTable;
3823
3841
  const autoWidthColumnList = $xeTable.computeAutoWidthColumnList;
@@ -3958,9 +3976,93 @@ function updateRowExpandStyle($xeTable) {
3958
3976
  /**
3959
3977
  * 更新树连接线样式
3960
3978
  */
3961
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
3962
3979
  function updateTreeLineStyle($xeTable) {
3963
- // 待优化
3980
+ const props = $xeTable;
3981
+ const reactData = $xeTable;
3982
+ const internalData = $xeTable;
3983
+ const { treeConfig } = props;
3984
+ if (!treeConfig) {
3985
+ return;
3986
+ }
3987
+ const { tableData } = reactData;
3988
+ const { fullAllDataRowIdData, treeExpandedMaps } = internalData;
3989
+ const cellOpts = $xeTable.computeCellOpts;
3990
+ const rowOpts = $xeTable.computeRowOpts;
3991
+ const defaultRowHeight = $xeTable.computeDefaultRowHeight;
3992
+ const treeOpts = $xeTable.computeTreeOpts;
3993
+ const { transform, mapChildrenField } = treeOpts;
3994
+ const childrenField = treeOpts.children || treeOpts.childrenField;
3995
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
3996
+ const expParentList = [];
3997
+ const handleNodeRow = (row, rIndex, rows) => {
3998
+ const rowid = handleGetRowId(row);
3999
+ const rowRest = fullAllDataRowIdData[rowid] || {};
4000
+ const childList = row[transform ? mapChildrenField : childrenField];
4001
+ const prevRow = rows[rIndex - 1] || null;
4002
+ const nextRow = rows[rIndex + 1] || null;
4003
+ if (childList && childList.length && treeExpandedMaps[rowid]) {
4004
+ expParentList.push({ row, prevRow, nextRow });
4005
+ childList.forEach((childRow, crIndex) => {
4006
+ const childRowid = handleGetRowId(childRow);
4007
+ if (treeExpandedMaps[childRowid]) {
4008
+ handleNodeRow(childRow, crIndex, childList);
4009
+ }
4010
+ });
4011
+ }
4012
+ else {
4013
+ if (nextRow) {
4014
+ const nextRowid = handleGetRowId(nextRow);
4015
+ const nextRowRest = fullAllDataRowIdData[nextRowid] || {};
4016
+ const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
4017
+ const nextCellHeight = getCellRestHeight(nextRowRest, cellOpts, rowOpts, defaultRowHeight);
4018
+ rowRest.oHeight = currCellHeight;
4019
+ rowRest.lineHeight = Math.floor(currCellHeight / 2 + nextCellHeight / 2);
4020
+ }
4021
+ else {
4022
+ rowRest.oHeight = 0;
4023
+ rowRest.lineHeight = 0;
4024
+ }
4025
+ }
4026
+ };
4027
+ tableData.forEach((row, rIndex) => {
4028
+ handleNodeRow(row, rIndex, tableData);
4029
+ });
4030
+ XEUtils.lastArrayEach(expParentList, ({ row, nextRow }) => {
4031
+ const rowid = handleGetRowId(row);
4032
+ const childList = row[transform ? mapChildrenField : childrenField];
4033
+ const rowRest = fullAllDataRowIdData[rowid];
4034
+ if (rowRest) {
4035
+ const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
4036
+ let countOffsetHeight = currCellHeight;
4037
+ let countLineHeight = 0;
4038
+ childList.forEach((childRow) => {
4039
+ const childRowid = handleGetRowId(childRow);
4040
+ const childRowRest = fullAllDataRowIdData[childRowid] || {};
4041
+ const childList = childRow[transform ? mapChildrenField : childrenField];
4042
+ if (treeExpandedMaps[childRowid] && childList && childList.length) {
4043
+ countOffsetHeight += (childRowRest.oHeight || 0);
4044
+ countLineHeight += (childRowRest.oHeight || 0);
4045
+ }
4046
+ else {
4047
+ const cellHeight = getCellRestHeight(childRowRest, cellOpts, rowOpts, defaultRowHeight);
4048
+ childRowRest.oHeight = cellHeight;
4049
+ childRowRest.lineHeight = cellHeight;
4050
+ countOffsetHeight += cellHeight;
4051
+ countLineHeight += cellHeight;
4052
+ }
4053
+ });
4054
+ if (nextRow) {
4055
+ const nextRowid = handleGetRowId(nextRow);
4056
+ const nextRowRest = fullAllDataRowIdData[nextRowid] || {};
4057
+ const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
4058
+ const nextCellHeight = getCellRestHeight(nextRowRest, cellOpts, rowOpts, defaultRowHeight);
4059
+ countOffsetHeight += currCellHeight;
4060
+ countLineHeight += Math.floor(currCellHeight / 2 + nextCellHeight / 2);
4061
+ }
4062
+ rowRest.lineHeight = countLineHeight;
4063
+ rowRest.oHeight = countOffsetHeight;
4064
+ }
4065
+ });
3964
4066
  }
3965
4067
  function handleRowExpandScroll($xeTable) {
3966
4068
  const internalData = $xeTable;
@@ -10831,6 +10933,7 @@ const Methods = {
10831
10933
  },
10832
10934
  triggerBodyWheelEvent(evnt) {
10833
10935
  const $xeTable = this;
10936
+ const $xeParentTable = $xeTable.$xeParentTable;
10834
10937
  const tableProps = $xeTable;
10835
10938
  const reactData = $xeTable;
10836
10939
  const internalData = $xeTable;
@@ -10889,6 +10992,21 @@ const Methods = {
10889
10992
  return;
10890
10993
  }
10891
10994
  }
10995
+ // 展开行处理,如果展开行嵌入表格中
10996
+ if ($xeParentTable) {
10997
+ if (isRollY) {
10998
+ if (checkTargetElement(evnt.target, [leftScrollElem, bodyScrollElem, rightScrollElem], evnt.currentTarget)) {
10999
+ evnt.stopPropagation();
11000
+ return;
11001
+ }
11002
+ }
11003
+ if (isRollX) {
11004
+ if (checkTargetElement(evnt.target, [headerScrollElem, bodyScrollElem, footerScrollElem], evnt.currentTarget)) {
11005
+ evnt.stopPropagation();
11006
+ return;
11007
+ }
11008
+ }
11009
+ }
10892
11010
  if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
10893
11011
  return;
10894
11012
  }
@@ -497,6 +497,10 @@ export default {
497
497
  $xeTabs: {
498
498
  default: null
499
499
  },
500
+ $xeParentTable: {
501
+ from: '$xeTable',
502
+ default: null
503
+ },
500
504
  $xeGrid: {
501
505
  default: null
502
506
  },
@@ -1376,7 +1380,7 @@ export default {
1376
1380
  const $xeTable = this;
1377
1381
  const reactData = $xeTable;
1378
1382
  const { initStatus } = this;
1379
- if (value && value.length >= 50000) {
1383
+ if (value && value.length >= 20000) {
1380
1384
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
1381
1385
  }
1382
1386
  this.loadTableData(value || [], true).then(() => {
@@ -1511,7 +1515,7 @@ export default {
1511
1515
  const internalData = $xeTable;
1512
1516
  XEUtils.assign(internalData, createInternalData());
1513
1517
  handleKeyField($xeTable);
1514
- const { data, exportConfig, importConfig, treeConfig, showOverflow, highlightCurrentRow, highlightCurrentColumn } = props;
1518
+ const { data, exportConfig, importConfig, treeConfig, highlightCurrentRow, highlightCurrentColumn } = props;
1515
1519
  const { scrollXStore, scrollYStore } = internalData;
1516
1520
  const columnOpts = $xeTable.computeColumnOpts;
1517
1521
  const editOpts = $xeTable.computeEditOpts;
@@ -1545,9 +1549,9 @@ export default {
1545
1549
  if (props.editConfig && editOpts.showStatus && !props.keepSource) {
1546
1550
  warnLog('vxe.error.reqProp', ['keep-source']);
1547
1551
  }
1548
- if (treeConfig && (treeOpts.showLine || treeOpts.line) && !showOverflow) {
1549
- warnLog('vxe.error.reqProp', ['show-overflow']);
1550
- }
1552
+ // if (treeConfig && (treeOpts.showLine || treeOpts.line) && !showOverflow) {
1553
+ // warnLog('vxe.error.reqProp', ['show-overflow'])
1554
+ // }
1551
1555
  if (treeConfig && !treeOpts.transform && props.stripe) {
1552
1556
  warnLog('vxe.error.noTree', ['stripe']);
1553
1557
  }
@@ -503,67 +503,6 @@ export function getLastChildColumn(column) {
503
503
  }
504
504
  return column;
505
505
  }
506
- const lineOffsetSizes = {
507
- mini: 3,
508
- small: 2,
509
- medium: 1,
510
- large: 0
511
- };
512
- function countTreeExpandSize(prevRow, params) {
513
- let count = 1;
514
- if (!prevRow) {
515
- return count;
516
- }
517
- const { $table } = params;
518
- const reactData = $table;
519
- const { treeExpandedFlag } = reactData;
520
- const internalData = $table;
521
- const { treeExpandedMaps } = internalData;
522
- const treeOpts = $table.computeTreeOpts;
523
- const { transform, mapChildrenField } = treeOpts;
524
- const childrenField = treeOpts.children || treeOpts.childrenField;
525
- const rowChildren = prevRow[transform ? mapChildrenField : childrenField];
526
- if (rowChildren && treeExpandedFlag && treeExpandedMaps[getRowid($table, prevRow)]) {
527
- for (let index = 0; index < rowChildren.length; index++) {
528
- count += countTreeExpandSize(rowChildren[index], params);
529
- }
530
- }
531
- return count;
532
- }
533
- export function getOffsetSize($xeTable) {
534
- const vSize = $xeTable.computeSize;
535
- if (vSize) {
536
- return lineOffsetSizes[vSize] || 0;
537
- }
538
- return 0;
539
- }
540
- export function calcTreeLine(params, prevRow) {
541
- const { $table, row } = params;
542
- const tableProps = $table;
543
- const tableReactData = $table;
544
- const tableInternalData = $table;
545
- const { showOverflow } = tableProps;
546
- const { scrollYLoad } = tableReactData;
547
- const { fullAllDataRowIdData } = tableInternalData;
548
- const rowOpts = $table.computeRowOpts;
549
- const cellOpts = $table.computeCellOpts;
550
- const defaultRowHeight = $table.computeDefaultRowHeight;
551
- const rowid = getRowid($table, row);
552
- const rowRest = fullAllDataRowIdData[rowid];
553
- const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
554
- let expandSize = 1;
555
- if (prevRow) {
556
- expandSize = countTreeExpandSize(prevRow, params);
557
- }
558
- let cellHeight = currCellHeight;
559
- const vnHeight = rowRest.height;
560
- if (scrollYLoad) {
561
- if (!showOverflow) {
562
- cellHeight = vnHeight || currCellHeight;
563
- }
564
- }
565
- return cellHeight * expandSize - (prevRow ? 1 : (12 - getOffsetSize($table)));
566
- }
567
506
  export function getCellValue(row, column) {
568
507
  return XEUtils.get(row, column.field);
569
508
  }
@@ -3547,13 +3547,14 @@
3547
3547
  left: 50%;
3548
3548
  font-size: 12px;
3549
3549
  line-height: 1em;
3550
- transform: translate(-50%, -50%);
3550
+ transform: translate(-50%, -2px);
3551
3551
  text-align: left;
3552
3552
  z-index: 4;
3553
3553
  padding: 0 var(--vxe-ui-table-cell-padding-default);
3554
3554
  pointer-events: none;
3555
3555
  }
3556
3556
  .vxe-table--render-default .vxe-body--column .vxe-cell--valid-error-wrapper {
3557
+ position: relative;
3557
3558
  display: inline-block;
3558
3559
  border-radius: var(--vxe-ui-border-radius);
3559
3560
  pointer-events: auto;
@@ -3584,11 +3585,11 @@
3584
3585
  }
3585
3586
  .vxe-table--render-default.valid-msg--single .vxe-body--row:last-child .vxe-cell--valid-error-tip {
3586
3587
  bottom: 100%;
3587
- transform: translate(-50%, 50%);
3588
+ transform: translate(-50%, 0);
3588
3589
  }
3589
3590
  .vxe-table--render-default.valid-msg--single .vxe-body--row:last-child:first-child .vxe-cell--valid-error-tip {
3590
3591
  bottom: auto;
3591
- transform: translate(-50%, -50%);
3592
+ transform: translate(-50%, -2px);
3592
3593
  }
3593
3594
  .vxe-table--render-default.valid-msg--full .vxe-body--row:last-child .vxe-cell--valid-error-tip {
3594
3595
  top: calc(100% - 1.3em);