vxe-table 3.18.0-beta.6 → 3.18.0-beta.8

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 (170) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +30 -0
  4. package/es/locale/lang/de-DE.js +30 -0
  5. package/es/locale/lang/en-US.js +30 -0
  6. package/es/locale/lang/es-ES.js +30 -0
  7. package/es/locale/lang/fr-FR.js +30 -0
  8. package/es/locale/lang/hu-HU.js +30 -0
  9. package/es/locale/lang/hy-AM.js +30 -0
  10. package/es/locale/lang/id-ID.js +30 -0
  11. package/es/locale/lang/it-IT.js +30 -0
  12. package/es/locale/lang/ja-JP.js +30 -0
  13. package/es/locale/lang/ko-KR.js +30 -0
  14. package/es/locale/lang/ms-MY.js +30 -0
  15. package/es/locale/lang/nb-NO.js +30 -0
  16. package/es/locale/lang/pt-BR.js +30 -0
  17. package/es/locale/lang/ru-RU.js +30 -0
  18. package/es/locale/lang/th-TH.js +30 -0
  19. package/es/locale/lang/ug-CN.js +30 -0
  20. package/es/locale/lang/uk-UA.js +30 -0
  21. package/es/locale/lang/uz-UZ.js +30 -0
  22. package/es/locale/lang/vi-VN.js +30 -0
  23. package/es/locale/lang/zh-CHT.js +30 -0
  24. package/es/locale/lang/zh-CN.js +32 -0
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/table/module/custom/panel.js +0 -20
  28. package/es/table/src/anime.js +4 -4
  29. package/es/table/src/footer.js +2 -2
  30. package/es/table/src/header.js +2 -2
  31. package/es/table/src/methods.js +60 -17
  32. package/es/table/src/table.js +92 -58
  33. package/es/table/src/util.js +1 -1
  34. package/es/table/style.css +178 -163
  35. package/es/table/style.min.css +1 -1
  36. package/es/ui/index.js +1 -1
  37. package/es/ui/src/log.js +1 -1
  38. package/es/vxe-table/style.css +178 -163
  39. package/es/vxe-table/style.min.css +1 -1
  40. package/lib/index.css +1 -1
  41. package/lib/index.min.css +1 -1
  42. package/lib/index.umd.js +151 -66
  43. package/lib/index.umd.min.js +1 -1
  44. package/lib/locale/lang/ar-EG.js +30 -0
  45. package/lib/locale/lang/ar-EG.min.js +1 -1
  46. package/lib/locale/lang/ar-EG.umd.js +30 -0
  47. package/lib/locale/lang/de-DE.js +30 -0
  48. package/lib/locale/lang/de-DE.min.js +1 -1
  49. package/lib/locale/lang/de-DE.umd.js +30 -0
  50. package/lib/locale/lang/en-US.js +30 -0
  51. package/lib/locale/lang/en-US.min.js +1 -1
  52. package/lib/locale/lang/en-US.umd.js +30 -0
  53. package/lib/locale/lang/es-ES.js +30 -0
  54. package/lib/locale/lang/es-ES.min.js +1 -1
  55. package/lib/locale/lang/es-ES.umd.js +30 -0
  56. package/lib/locale/lang/fr-FR.js +30 -0
  57. package/lib/locale/lang/fr-FR.min.js +1 -1
  58. package/lib/locale/lang/fr-FR.umd.js +30 -0
  59. package/lib/locale/lang/hu-HU.js +30 -0
  60. package/lib/locale/lang/hu-HU.min.js +1 -1
  61. package/lib/locale/lang/hu-HU.umd.js +30 -0
  62. package/lib/locale/lang/hy-AM.js +30 -0
  63. package/lib/locale/lang/hy-AM.min.js +1 -1
  64. package/lib/locale/lang/hy-AM.umd.js +30 -0
  65. package/lib/locale/lang/id-ID.js +30 -0
  66. package/lib/locale/lang/id-ID.min.js +1 -1
  67. package/lib/locale/lang/id-ID.umd.js +30 -0
  68. package/lib/locale/lang/it-IT.js +30 -0
  69. package/lib/locale/lang/it-IT.min.js +1 -1
  70. package/lib/locale/lang/it-IT.umd.js +30 -0
  71. package/lib/locale/lang/ja-JP.js +30 -0
  72. package/lib/locale/lang/ja-JP.min.js +1 -1
  73. package/lib/locale/lang/ja-JP.umd.js +30 -0
  74. package/lib/locale/lang/ko-KR.js +30 -0
  75. package/lib/locale/lang/ko-KR.min.js +1 -1
  76. package/lib/locale/lang/ko-KR.umd.js +30 -0
  77. package/lib/locale/lang/ms-MY.js +30 -0
  78. package/lib/locale/lang/ms-MY.min.js +1 -1
  79. package/lib/locale/lang/ms-MY.umd.js +30 -0
  80. package/lib/locale/lang/nb-NO.js +30 -0
  81. package/lib/locale/lang/nb-NO.min.js +1 -1
  82. package/lib/locale/lang/nb-NO.umd.js +30 -0
  83. package/lib/locale/lang/pt-BR.js +30 -0
  84. package/lib/locale/lang/pt-BR.min.js +1 -1
  85. package/lib/locale/lang/pt-BR.umd.js +30 -0
  86. package/lib/locale/lang/ru-RU.js +30 -0
  87. package/lib/locale/lang/ru-RU.min.js +1 -1
  88. package/lib/locale/lang/ru-RU.umd.js +30 -0
  89. package/lib/locale/lang/th-TH.js +30 -0
  90. package/lib/locale/lang/th-TH.min.js +1 -1
  91. package/lib/locale/lang/th-TH.umd.js +30 -0
  92. package/lib/locale/lang/ug-CN.js +30 -0
  93. package/lib/locale/lang/ug-CN.min.js +1 -1
  94. package/lib/locale/lang/ug-CN.umd.js +30 -0
  95. package/lib/locale/lang/uk-UA.js +30 -0
  96. package/lib/locale/lang/uk-UA.min.js +1 -1
  97. package/lib/locale/lang/uk-UA.umd.js +30 -0
  98. package/lib/locale/lang/uz-UZ.js +30 -0
  99. package/lib/locale/lang/uz-UZ.min.js +1 -1
  100. package/lib/locale/lang/uz-UZ.umd.js +30 -0
  101. package/lib/locale/lang/vi-VN.js +30 -0
  102. package/lib/locale/lang/vi-VN.min.js +1 -1
  103. package/lib/locale/lang/vi-VN.umd.js +30 -0
  104. package/lib/locale/lang/zh-CHT.js +30 -0
  105. package/lib/locale/lang/zh-CHT.min.js +1 -1
  106. package/lib/locale/lang/zh-CHT.umd.js +30 -0
  107. package/lib/locale/lang/zh-CN.js +32 -0
  108. package/lib/locale/lang/zh-CN.min.js +1 -1
  109. package/lib/locale/lang/zh-CN.umd.js +32 -0
  110. package/lib/style.css +1 -1
  111. package/lib/style.min.css +1 -1
  112. package/lib/table/module/custom/panel.js +0 -22
  113. package/lib/table/module/custom/panel.min.js +1 -1
  114. package/lib/table/src/anime.js +4 -4
  115. package/lib/table/src/anime.min.js +1 -1
  116. package/lib/table/src/footer.js +1 -1
  117. package/lib/table/src/footer.min.js +1 -1
  118. package/lib/table/src/header.js +1 -1
  119. package/lib/table/src/header.min.js +1 -1
  120. package/lib/table/src/methods.js +62 -17
  121. package/lib/table/src/methods.min.js +1 -1
  122. package/lib/table/src/table.js +48 -18
  123. package/lib/table/src/table.min.js +1 -1
  124. package/lib/table/src/util.js +2 -2
  125. package/lib/table/src/util.min.js +1 -1
  126. package/lib/table/style/style.css +178 -163
  127. package/lib/table/style/style.min.css +1 -1
  128. package/lib/ui/index.js +1 -1
  129. package/lib/ui/index.min.js +1 -1
  130. package/lib/ui/src/log.js +1 -1
  131. package/lib/ui/src/log.min.js +1 -1
  132. package/lib/vxe-table/style/style.css +178 -163
  133. package/lib/vxe-table/style/style.min.css +1 -1
  134. package/package.json +1 -1
  135. package/packages/locale/lang/ar-EG.ts +30 -0
  136. package/packages/locale/lang/de-DE.ts +30 -0
  137. package/packages/locale/lang/en-US.ts +30 -0
  138. package/packages/locale/lang/es-ES.ts +30 -0
  139. package/packages/locale/lang/fr-FR.ts +30 -0
  140. package/packages/locale/lang/hu-HU.ts +30 -0
  141. package/packages/locale/lang/hy-AM.ts +30 -0
  142. package/packages/locale/lang/id-ID.ts +30 -0
  143. package/packages/locale/lang/it-IT.ts +30 -0
  144. package/packages/locale/lang/ja-JP.ts +30 -0
  145. package/packages/locale/lang/ko-KR.ts +30 -0
  146. package/packages/locale/lang/ms-MY.ts +30 -0
  147. package/packages/locale/lang/nb-NO.ts +30 -0
  148. package/packages/locale/lang/pt-BR.ts +30 -0
  149. package/packages/locale/lang/ru-RU.ts +30 -0
  150. package/packages/locale/lang/th-TH.ts +30 -0
  151. package/packages/locale/lang/ug-CN.ts +30 -0
  152. package/packages/locale/lang/uk-UA.ts +30 -0
  153. package/packages/locale/lang/uz-UZ.ts +30 -0
  154. package/packages/locale/lang/vi-VN.ts +30 -0
  155. package/packages/locale/lang/zh-CHT.ts +30 -0
  156. package/packages/locale/lang/zh-CN.ts +32 -0
  157. package/packages/table/module/custom/panel.ts +0 -21
  158. package/packages/table/src/anime.ts +4 -4
  159. package/packages/table/src/footer.ts +2 -2
  160. package/packages/table/src/header.ts +2 -2
  161. package/packages/table/src/methods.ts +60 -18
  162. package/packages/table/src/table.ts +93 -58
  163. package/packages/table/src/util.ts +1 -1
  164. package/styles/components/table.scss +166 -165
  165. /package/es/{iconfont.1755597272692.ttf → iconfont.1755775629306.ttf} +0 -0
  166. /package/es/{iconfont.1755597272692.woff → iconfont.1755775629306.woff} +0 -0
  167. /package/es/{iconfont.1755597272692.woff2 → iconfont.1755775629306.woff2} +0 -0
  168. /package/lib/{iconfont.1755597272692.ttf → iconfont.1755775629306.ttf} +0 -0
  169. /package/lib/{iconfont.1755597272692.woff → iconfont.1755775629306.woff} +0 -0
  170. /package/lib/{iconfont.1755597272692.woff2 → iconfont.1755775629306.woff2} +0 -0
@@ -894,8 +894,6 @@ export default {
894
894
  const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
895
895
  $xeTableCustomPanel.$nextTick(() => {
896
896
  const $xeTable = $xeTableCustomPanel.$xeTable;
897
- const $xeGantt = $xeTable.$xeGantt;
898
- const tableInternalData = $xeTable;
899
897
  const { customOpts } = $xeTable;
900
898
  const { mode } = customOpts;
901
899
  if (!VxeUIModalComponent && (mode === 'modal')) {
@@ -913,26 +911,8 @@ export default {
913
911
  if (!VxeUIRadioGroupComponent) {
914
912
  errLog('vxe.error.reqComp', ['vxe-radio-group']);
915
913
  }
916
- if ($xeGantt) {
917
- const { teleportToWrapperElem } = tableInternalData;
918
- const el = $xeTableCustomPanel.$refs.refElem;
919
- if (el && teleportToWrapperElem) {
920
- teleportToWrapperElem.appendChild(el);
921
- }
922
- }
923
914
  });
924
915
  },
925
- beforeDestroy() {
926
- const $xeTableCustomPanel = this;
927
- const $xeTable = $xeTableCustomPanel.$xeTable;
928
- const $xeGantt = $xeTable.$xeGantt;
929
- if ($xeGantt) {
930
- const el = $xeTableCustomPanel.$refs.refElem;
931
- if (el && el.parentElement) {
932
- el.parentElement.removeChild(el);
933
- }
934
- }
935
- },
936
916
  render(h) {
937
917
  const $xeTableCustomPanel = this;
938
918
  const $xeTable = $xeTableCustomPanel.$xeTable;
@@ -16,10 +16,10 @@ export function moveRowAnimateToTb(elemList, offsetTop) {
16
16
  });
17
17
  });
18
18
  }
19
- export function clearRowAnimate(elem) {
19
+ export function clearRowAnimate(elem, clss) {
20
20
  setTimeout(() => {
21
21
  if (elem) {
22
- XEUtils.arrayEach(elem.querySelectorAll(`.vxe-body--row.${rowMoveCls}`), elem => removeClass(elem, rowMoveCls));
22
+ XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, rowMoveCls));
23
23
  }
24
24
  }, 500);
25
25
  }
@@ -37,10 +37,10 @@ export function moveColAnimateToLr(elemList, offsetLeft) {
37
37
  });
38
38
  });
39
39
  }
40
- export function clearColAnimate(elem) {
40
+ export function clearColAnimate(elem, clss) {
41
41
  setTimeout(() => {
42
42
  if (elem) {
43
- XEUtils.arrayEach(elem.querySelectorAll(`.vxe-table--column.${colMoveClass}`), elem => removeClass(elem, colMoveClass));
43
+ XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, colMoveClass));
44
44
  }
45
45
  }, 500);
46
46
  }
@@ -2,7 +2,7 @@ import XEUtils from 'xe-utils';
2
2
  import { VxeUI } from '../../ui';
3
3
  import { getClass } from '../../ui/src/utils';
4
4
  import { updateCellTitle } from '../../ui/src/dom';
5
- import { getCellHeight } from './util';
5
+ import { getCalcHeight } from './util';
6
6
  const renderType = 'footer';
7
7
  const { renderer, renderEmptyElement } = VxeUI;
8
8
  function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) {
@@ -25,7 +25,7 @@ function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $
25
25
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
26
26
  const cellOpts = $xeTable.computeCellOpts;
27
27
  const footerCellOpts = $xeTable.computeFooterCellOpts;
28
- const currCellHeight = getCellHeight(footerCellOpts.height) || defaultRowHeight;
28
+ const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight;
29
29
  return tableColumn.map((column, $columnIndex) => {
30
30
  const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
31
31
  const colid = column.id;
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { VxeUI } from '../../ui';
3
3
  import { getClass } from '../../ui/src/utils';
4
- import { getCellHeight, convertHeaderColumnToRows } from './util';
4
+ import { getCalcHeight, convertHeaderColumnToRows } from './util';
5
5
  const { renderer, renderEmptyElement } = VxeUI;
6
6
  const cellType = 'header';
7
7
  const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
@@ -22,7 +22,7 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
22
22
  const cellOpts = $xeTable.computeCellOpts;
23
23
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
24
24
  const headerCellOpts = $xeTable.computeHeaderCellOpts;
25
- const currCellHeight = getCellHeight(headerCellOpts.height) || defaultRowHeight;
25
+ const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
26
26
  const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
27
27
  return cols.map((column, $columnIndex) => {
28
28
  const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
@@ -2442,19 +2442,26 @@ function updateColDropTipContent($xeTable, tdEl) {
2442
2442
  reactData.dragTipText = tipContent;
2443
2443
  }
2444
2444
  function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
2445
+ const $xeGantt = $xeTable.$xeGantt;
2445
2446
  const reactData = $xeTable;
2446
2447
  const internalData = $xeTable;
2447
- const el = $xeTable.$refs.refElem;
2448
- if (!el) {
2448
+ let wrapperEl = $xeTable.$refs.refElem;
2449
+ if ($xeGantt && trEl) {
2450
+ const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
2451
+ if (ganttContainerElem) {
2452
+ wrapperEl = ganttContainerElem;
2453
+ }
2454
+ }
2455
+ if (!wrapperEl) {
2449
2456
  return;
2450
2457
  }
2451
2458
  const { overflowX, scrollbarWidth, overflowY, scrollbarHeight } = reactData;
2452
2459
  const { prevDragToChild } = internalData;
2453
- const wrapperRect = el.getBoundingClientRect();
2460
+ const wrapperRect = wrapperEl.getBoundingClientRect();
2454
2461
  const osbWidth = overflowY ? scrollbarWidth : 0;
2455
2462
  const osbHeight = overflowX ? scrollbarHeight : 0;
2456
- const tableWrapperWidth = el.clientWidth;
2457
- const tableWrapperHeight = el.clientHeight;
2463
+ const tableWrapperWidth = wrapperEl.clientWidth;
2464
+ const tableWrapperHeight = wrapperEl.clientHeight;
2458
2465
  if (trEl) {
2459
2466
  const rdLineEl = $xeTable.$refs.refDragRowLineElem;
2460
2467
  if (rdLineEl) {
@@ -2522,8 +2529,8 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
2522
2529
  const rdTipEl = $xeTable.$refs.refDragTipElem;
2523
2530
  if (rdTipEl) {
2524
2531
  rdTipEl.style.display = 'block';
2525
- rdTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
2526
- rdTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - rdTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
2532
+ rdTipEl.style.top = `${Math.min(wrapperEl.clientHeight - wrapperEl.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
2533
+ rdTipEl.style.left = `${Math.min(wrapperEl.clientWidth - wrapperEl.scrollLeft - rdTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
2527
2534
  rdTipEl.setAttribute('drag-status', showLine ? (prevDragToChild ? 'sub' : 'normal') : 'disabled');
2528
2535
  }
2529
2536
  }
@@ -5515,7 +5522,7 @@ const Methods = {
5515
5522
  if (!cell) {
5516
5523
  return;
5517
5524
  }
5518
- const cellParams = XEUtils.assign(params, { cell });
5525
+ const cellParams = XEUtils.assign(params, { cell, $table: $xeTable });
5519
5526
  let dragLeft = 0;
5520
5527
  const tableRect = tableEl.getBoundingClientRect();
5521
5528
  const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
@@ -5645,7 +5652,7 @@ const Methods = {
5645
5652
  const colRest = fullColumnIdData[colid];
5646
5653
  const dragBtnElem = evnt.target;
5647
5654
  const cell = dragBtnElem.parentNode;
5648
- const cellParams = Object.assign(params, { cell });
5655
+ const cellParams = Object.assign(params, { cell, $table: $xeTable });
5649
5656
  const colMinWidth = getColReMinWidth(cellParams);
5650
5657
  el.setAttribute('data-calc-col', 'Y');
5651
5658
  let resizeWidth = calcColumnAutoWidth($xeTable, resizeColumn, el);
@@ -5673,6 +5680,7 @@ const Methods = {
5673
5680
  const internalData = $xeTable;
5674
5681
  evnt.stopPropagation();
5675
5682
  evnt.preventDefault();
5683
+ const $xeGantt = $xeTable.$xeGantt;
5676
5684
  const { row } = params;
5677
5685
  const { showOverflow } = props;
5678
5686
  const { overflowX, scrollbarWidth, overflowY, scrollbarHeight } = reactData;
@@ -5683,7 +5691,13 @@ const Methods = {
5683
5691
  const resizableOpts = $xeTable.computeResizableOpts;
5684
5692
  const rowOpts = $xeTable.computeRowOpts;
5685
5693
  const cellOpts = $xeTable.computeCellOpts;
5686
- const tableEl = $xeTable.$refs.refElem;
5694
+ let tableEl = $xeTable.$refs.refElem;
5695
+ if ($xeGantt) {
5696
+ const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
5697
+ if (ganttContainerElem) {
5698
+ tableEl = ganttContainerElem;
5699
+ }
5700
+ }
5687
5701
  const resizeBarElem = $xeTable.$refs.refRowResizeBar;
5688
5702
  if (!resizeBarElem) {
5689
5703
  return;
@@ -8115,6 +8129,7 @@ const Methods = {
8115
8129
  },
8116
8130
  handleRowDragSwapEvent(evnt, isSyncRow, dragRow, prevDragRow, prevDragPos, prevDragToChild) {
8117
8131
  const $xeTable = this;
8132
+ const $xeGantt = $xeTable.$xeGantt;
8118
8133
  const props = $xeTable;
8119
8134
  const reactData = $xeTable;
8120
8135
  const internalData = $xeTable;
@@ -8307,6 +8322,13 @@ const Methods = {
8307
8322
  const _newRowIndex = dragRowRest._index;
8308
8323
  const firstRow = tableData[0];
8309
8324
  const firstRowRest = fullAllDataRowIdData[getRowid($xeTable, firstRow)];
8325
+ let wrapperEl = el;
8326
+ if ($xeGantt) {
8327
+ const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
8328
+ if (ganttContainerElem) {
8329
+ wrapperEl = ganttContainerElem;
8330
+ }
8331
+ }
8310
8332
  if (firstRowRest) {
8311
8333
  const _firstRowIndex = firstRowRest._index;
8312
8334
  const _lastRowIndex = _firstRowIndex + tableData.length;
@@ -8340,14 +8362,26 @@ const Methods = {
8340
8362
  }
8341
8363
  const dragRangeList = tableData.slice(rsIndex, reIndex);
8342
8364
  if (dragRangeList.length) {
8343
- const dtTrList = el.querySelectorAll(dragRangeList.map(row => `.vxe-body--row[rowid="${getRowid($xeTable, row)}"]`).join(','));
8365
+ const dtClss = [];
8366
+ dragRangeList.forEach(row => {
8367
+ const rowid = getRowid($xeTable, row);
8368
+ dtClss.push(`.vxe-body--row[rowid="${rowid}"]`);
8369
+ if ($xeGantt) {
8370
+ dtClss.push(`.vxe-gantt-view--body-row[rowid="${rowid}"]`, `.vxe-gantt-view--chart-row[rowid="${rowid}"]`);
8371
+ }
8372
+ });
8373
+ const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
8344
8374
  moveRowAnimateToTb(dtTrList, offsetRate * dragRowHeight);
8345
8375
  }
8346
8376
  }
8347
- const newTrList = el.querySelectorAll(`.vxe-body--row[rowid="${dragRowid}"]`);
8348
- const newTrEl = newTrList[0];
8377
+ const drClss = [`.vxe-body--row[rowid="${dragRowid}"]`];
8378
+ if ($xeGantt) {
8379
+ drClss.push(`.vxe-gantt-view--body-row[rowid="${dragRowid}"]`, `.vxe-gantt-view--chart-row[rowid="${dragRowid}"]`);
8380
+ }
8381
+ const newDtTrList = wrapperEl.querySelectorAll(drClss.join(','));
8382
+ const newTrEl = newDtTrList[0];
8349
8383
  if (dragOffsetTop > -1 && newTrEl) {
8350
- moveRowAnimateToTb(newTrList, dragOffsetTop - newTrEl.offsetTop);
8384
+ moveRowAnimateToTb(newDtTrList, dragOffsetTop - newTrEl.offsetTop);
8351
8385
  }
8352
8386
  }
8353
8387
  updateRowOffsetTop($xeTable);
@@ -8367,6 +8401,7 @@ const Methods = {
8367
8401
  },
8368
8402
  handleRowDragDragendEvent(evnt) {
8369
8403
  const $xeTable = this;
8404
+ const $xeGantt = $xeTable.$xeGantt;
8370
8405
  const props = $xeTable;
8371
8406
  const reactData = $xeTable;
8372
8407
  const internalData = $xeTable;
@@ -8377,7 +8412,7 @@ const Methods = {
8377
8412
  const { lazy } = treeOpts;
8378
8413
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
8379
8414
  const { prevDragRow, prevDragPos } = internalData;
8380
- const el = $xeTable.$refs.refElem;
8415
+ let wrapperEl = $xeTable.$refs.refElem;
8381
8416
  if (treeConfig && lazy && prevDragToChild) {
8382
8417
  // 懒加载
8383
8418
  const newRowid = getRowid($xeTable, prevDragRow);
@@ -8394,9 +8429,17 @@ const Methods = {
8394
8429
  else {
8395
8430
  $xeTable.handleRowDragSwapEvent(evnt, true, dragRow, prevDragRow, prevDragPos, prevDragToChild);
8396
8431
  }
8432
+ const dtClss = ['.vxe-body--row'];
8433
+ if ($xeGantt) {
8434
+ const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
8435
+ if (ganttContainerElem) {
8436
+ wrapperEl = ganttContainerElem;
8437
+ }
8438
+ dtClss.push('.vxe-gantt-view--body-row', '.vxe-gantt-view--chart-row');
8439
+ }
8397
8440
  hideDropTip($xeTable);
8398
8441
  clearRowDropOrigin($xeTable);
8399
- clearRowAnimate(el);
8442
+ clearRowAnimate(wrapperEl, dtClss);
8400
8443
  internalData.prevDragToChild = false;
8401
8444
  reactData.dragRow = null;
8402
8445
  reactData.dragCol = null;
@@ -8785,7 +8828,7 @@ const Methods = {
8785
8828
  $xeTable.handleColDragSwapEvent(evnt, true, dragCol, prevDragCol, prevDragPos, prevDragToChild);
8786
8829
  hideDropTip($xeTable);
8787
8830
  clearColDropOrigin($xeTable);
8788
- clearColAnimate(el);
8831
+ clearColAnimate(el, ['.vxe-table--column']);
8789
8832
  internalData.prevDragToChild = false;
8790
8833
  reactData.dragRow = null;
8791
8834
  reactData.dragCol = null;
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { getFuncText, isEnableConf } from '../../ui/src/utils';
3
3
  import { initTpImg } from '../../ui/src/dom';
4
- import { createInternalData, createHandleGetRowId, getCellHeight, hasDeepKey } from './util';
4
+ import { createInternalData, createHandleGetRowId, getCalcHeight, hasDeepKey } from './util';
5
5
  import { VxeUI } from '../../ui';
6
6
  import methods from './methods';
7
7
  import TableBodyComponent from './body';
@@ -864,10 +864,20 @@ export default {
864
864
  },
865
865
  computeHeaderCellOpts() {
866
866
  const $xeTable = this;
867
+ const $xeGantt = $xeTable.$xeGantt;
867
868
  const props = $xeTable;
868
869
  const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig);
870
+ const defaultRowHeight = $xeTable.computeDefaultRowHeight;
869
871
  const cellOpts = $xeTable.computeCellOpts;
870
- headerCellOpts.height = XEUtils.toNumber(getCellHeight(headerCellOpts.height || cellOpts.height));
872
+ let headCellHeight = XEUtils.toNumber(getCalcHeight(headerCellOpts.height || cellOpts.height));
873
+ if ($xeGantt) {
874
+ const taskScaleConfs = $xeGantt.computeTaskScaleConfs;
875
+ if (taskScaleConfs && taskScaleConfs.length > 2) {
876
+ const ganttMinHeadCellHeight = defaultRowHeight / 2 * taskScaleConfs.length;
877
+ headCellHeight = Math.max(ganttMinHeadCellHeight, headCellHeight);
878
+ }
879
+ }
880
+ headerCellOpts.height = headCellHeight;
871
881
  return headerCellOpts;
872
882
  },
873
883
  computeFooterCellOpts() {
@@ -875,7 +885,7 @@ export default {
875
885
  const props = $xeTable;
876
886
  const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig);
877
887
  const cellOpts = $xeTable.computeCellOpts;
878
- footerCellOpts.height = XEUtils.toNumber(getCellHeight(footerCellOpts.height || cellOpts.height));
888
+ footerCellOpts.height = XEUtils.toNumber(getCalcHeight(footerCellOpts.height || cellOpts.height));
879
889
  return footerCellOpts;
880
890
  },
881
891
  rowOpts() {
@@ -1568,6 +1578,14 @@ export default {
1568
1578
  if (checkboxOpts.halfField) {
1569
1579
  warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
1570
1580
  }
1581
+ if (treeConfig) {
1582
+ XEUtils.arrayEach(['rowField', 'parentField', 'childrenField', 'hasChildField', 'mapChildrenField'], key => {
1583
+ const val = treeOpts[key];
1584
+ if (val && val.indexOf('.') > -1) {
1585
+ errLog('vxe.error.errProp', [`${key}=${val}`, `${key}=${val.split('.')[0]}`]);
1586
+ }
1587
+ });
1588
+ }
1571
1589
  // 在 v3.0 中废弃 context-menu
1572
1590
  if (this.contextMenu) {
1573
1591
  warnLog('vxe.error.delProp', ['context-menu', 'menu-config']);
@@ -1680,7 +1698,11 @@ export default {
1680
1698
  const virtualYOpts = $xeTable.computeVirtualYOpts;
1681
1699
  if ($xeGantt) {
1682
1700
  const classifyWrapperEl = $xeGantt.$refs.refClassifyWrapperElem;
1701
+ const teleportWrapperEl = $xeTable.$refs.refTeleportWrapper;
1683
1702
  if (classifyWrapperEl) {
1703
+ if (teleportWrapperEl) {
1704
+ classifyWrapperEl.appendChild(teleportWrapperEl);
1705
+ }
1684
1706
  internalData.teleportToWrapperElem = classifyWrapperEl;
1685
1707
  }
1686
1708
  }
@@ -1758,6 +1780,10 @@ export default {
1758
1780
  },
1759
1781
  beforeDestroy() {
1760
1782
  const $xeTable = this;
1783
+ const teleportWrapperEl = $xeTable.$refs.refTeleportWrapper;
1784
+ if (teleportWrapperEl && teleportWrapperEl.parentElement) {
1785
+ teleportWrapperEl.parentElement.removeChild(teleportWrapperEl);
1786
+ }
1761
1787
  const tableViewportEl = $xeTable.$refs.refTableViewportElem;
1762
1788
  if (tableViewportEl) {
1763
1789
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
@@ -1928,57 +1954,69 @@ export default {
1928
1954
  })
1929
1955
  ]
1930
1956
  : []),
1931
- /**
1932
- * 行高线
1933
- */
1934
1957
  h('div', {
1935
- key: 'trl',
1936
- ref: 'refRowResizeBar',
1937
- class: 'vxe-table--resizable-row-bar'
1938
- }, resizableOpts.showDragTip
1939
- ? [
1958
+ key: 'ttw'
1959
+ }, [
1960
+ h('div', {
1961
+ ref: 'refTeleportWrapper'
1962
+ }, [
1963
+ /**
1964
+ * 行高线
1965
+ */
1940
1966
  h('div', {
1941
- class: 'vxe-table--resizable-number-tip'
1942
- })
1943
- ]
1944
- : []),
1945
- /**
1946
- * 加载中
1947
- */
1948
- VxeUILoadingComponent
1949
- ? h(VxeUILoadingComponent, {
1950
- key: 'lg',
1951
- class: 'vxe-table--loading',
1952
- props: {
1953
- value: currLoading,
1954
- icon: loadingOpts.icon,
1955
- text: loadingOpts.text
1956
- },
1957
- scopedSlots: loadingSlot
1958
- ? {
1959
- default: () => $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h)
1960
- }
1961
- : {}
1962
- })
1963
- : loadingSlot
1964
- ? h('div', {
1965
- class: ['vxe-loading--custom-wrapper', {
1966
- 'is--visible': currLoading
1967
- }]
1968
- }, $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h))
1969
- : renderEmptyElement($xeTable),
1970
- /**
1971
- * 自定义列
1972
- */
1973
- initStore.custom
1974
- ? h(TableCustomPanelComponent, {
1975
- key: 'cs',
1976
- ref: 'refTableCustom',
1977
- props: {
1978
- customStore
1979
- }
1980
- })
1981
- : renderEmptyElement($xeTable),
1967
+ key: 'trl',
1968
+ ref: 'refRowResizeBar',
1969
+ class: 'vxe-table--resizable-row-bar'
1970
+ }, resizableOpts.showDragTip
1971
+ ? [
1972
+ h('div', {
1973
+ class: 'vxe-table--resizable-number-tip'
1974
+ })
1975
+ ]
1976
+ : []),
1977
+ /**
1978
+ * 自定义列
1979
+ */
1980
+ initStore.custom
1981
+ ? h(TableCustomPanelComponent, {
1982
+ key: 'cs',
1983
+ ref: 'refTableCustom',
1984
+ props: {
1985
+ customStore
1986
+ }
1987
+ })
1988
+ : renderEmptyElement($xeTable),
1989
+ /**
1990
+ * 加载中
1991
+ */
1992
+ VxeUILoadingComponent
1993
+ ? h(VxeUILoadingComponent, {
1994
+ key: 'lg',
1995
+ class: 'vxe-table--loading',
1996
+ props: {
1997
+ value: currLoading,
1998
+ icon: loadingOpts.icon,
1999
+ text: loadingOpts.text
2000
+ },
2001
+ scopedSlots: loadingSlot
2002
+ ? {
2003
+ default: () => $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h)
2004
+ }
2005
+ : {}
2006
+ })
2007
+ : loadingSlot
2008
+ ? h('div', {
2009
+ class: ['vxe-loading--custom-wrapper', {
2010
+ 'is--visible': currLoading
2011
+ }]
2012
+ }, $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }, h))
2013
+ : renderEmptyElement($xeTable),
2014
+ /**
2015
+ * 拖拽提示
2016
+ */
2017
+ renderDragTip(h, this)
2018
+ ])
2019
+ ]),
1982
2020
  /**
1983
2021
  * 筛选
1984
2022
  */
@@ -2016,8 +2054,8 @@ export default {
2016
2054
  })
2017
2055
  : renderEmptyElement($xeTable),
2018
2056
  /**
2019
- * 快捷菜单
2020
- */
2057
+ * 快捷菜单
2058
+ */
2021
2059
  isMenu
2022
2060
  ? h(TableMenuPanelComponent, {
2023
2061
  key: 'tm',
@@ -2028,10 +2066,6 @@ export default {
2028
2066
  }
2029
2067
  })
2030
2068
  : renderEmptyElement($xeTable),
2031
- /**
2032
- * 拖拽提示
2033
- */
2034
- renderDragTip(h, this),
2035
2069
  h('div', {}, [
2036
2070
  /**
2037
2071
  * 提示相关
@@ -286,7 +286,7 @@ function getElementMarginAndWidth(elem) {
286
286
  }
287
287
  return 0;
288
288
  }
289
- export function getCellHeight(height) {
289
+ export function getCalcHeight(height) {
290
290
  if (height === 'unset') {
291
291
  return 0;
292
292
  }