vxe-table 3.20.9 → 3.20.11

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 (63) 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 +76 -5
  6. package/es/table/module/custom/panel.js +18 -12
  7. package/es/table/module/keyboard/mixin.js +1 -3
  8. package/es/table/src/body.js +16 -15
  9. package/es/table/src/methods.js +52 -20
  10. package/es/table/src/table.js +23 -19
  11. package/es/table/src/util.js +6 -3
  12. package/es/table/style.css +14 -0
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +3 -2
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +14 -0
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/helper/vetur/attributes.json +1 -1
  19. package/helper/vetur/tags.json +1 -1
  20. package/lib/index.css +1 -1
  21. package/lib/index.min.css +1 -1
  22. package/lib/index.umd.js +160 -70
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/style.css +1 -1
  25. package/lib/style.min.css +1 -1
  26. package/lib/table/module/custom/mixin.js +81 -5
  27. package/lib/table/module/custom/mixin.min.js +1 -1
  28. package/lib/table/module/custom/panel.js +20 -12
  29. package/lib/table/module/custom/panel.min.js +1 -1
  30. package/lib/table/module/keyboard/mixin.js +1 -4
  31. package/lib/table/module/keyboard/mixin.min.js +1 -1
  32. package/lib/table/src/body.js +16 -11
  33. package/lib/table/src/body.min.js +1 -1
  34. package/lib/table/src/methods.js +13 -15
  35. package/lib/table/src/methods.min.js +1 -1
  36. package/lib/table/src/table.js +19 -17
  37. package/lib/table/src/table.min.js +1 -1
  38. package/lib/table/src/util.js +6 -3
  39. package/lib/table/src/util.min.js +1 -1
  40. package/lib/table/style/style.css +14 -0
  41. package/lib/table/style/style.min.css +1 -1
  42. package/lib/ui/index.js +3 -2
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/vxe-table/style/style.css +14 -0
  47. package/lib/vxe-table/style/style.min.css +1 -1
  48. package/package.json +1 -1
  49. package/packages/table/module/custom/mixin.ts +77 -6
  50. package/packages/table/module/custom/panel.ts +19 -13
  51. package/packages/table/module/keyboard/mixin.ts +1 -3
  52. package/packages/table/src/body.ts +18 -15
  53. package/packages/table/src/methods.ts +54 -20
  54. package/packages/table/src/table.ts +23 -19
  55. package/packages/table/src/util.ts +7 -3
  56. package/packages/ui/index.ts +2 -1
  57. package/styles/components/table-module/custom.scss +14 -0
  58. /package/es/{iconfont.1774420912543.ttf → iconfont.1775652058165.ttf} +0 -0
  59. /package/es/{iconfont.1774420912543.woff → iconfont.1775652058165.woff} +0 -0
  60. /package/es/{iconfont.1774420912543.woff2 → iconfont.1775652058165.woff2} +0 -0
  61. /package/lib/{iconfont.1774420912543.ttf → iconfont.1775652058165.ttf} +0 -0
  62. /package/lib/{iconfont.1774420912543.woff → iconfont.1775652058165.woff} +0 -0
  63. /package/lib/{iconfont.1774420912543.woff2 → iconfont.1775652058165.woff2} +0 -0
@@ -1,5 +1,6 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { getColumnList } from '../../src/util';
3
+ import { toCssUnit } from '../../../ui/src/dom';
3
4
  function updatePopupStyle($xeTable) {
4
5
  const $xeGrid = $xeTable.$xeGrid;
5
6
  const $xeGantt = $xeTable.$xeGantt;
@@ -7,20 +8,29 @@ function updatePopupStyle($xeTable) {
7
8
  const reactData = $xeTable;
8
9
  const { customStore } = reactData;
9
10
  const customOpts = $xeTable.computeCustomOpts;
11
+ const { mode, placement, popupOptions } = customOpts;
12
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
13
+ const { transfer, maxHeight } = popupOptions || {};
10
14
  const customSimpleMode = $xeTable.computeCustomSimpleMode;
11
15
  const showCustomSimpleOutside = customSimpleMode === 'outside';
12
- const { popupOptions } = customOpts;
13
- const { maxHeight } = popupOptions || {};
16
+ const bodyEl = document.documentElement;
14
17
  let wrapperEl = $xeTable.$refs.refElem;
15
18
  let popupTop = 0;
16
19
  let popupMaxHeight = 0;
20
+ const popupStys = {};
17
21
  if ($xeGantt) {
18
22
  const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
19
23
  if (ganttContainerElem) {
20
24
  wrapperEl = ganttContainerElem;
21
25
  }
22
26
  }
23
- if (showCustomSimpleOutside) {
27
+ const tableRect = wrapperEl.getBoundingClientRect();
28
+ // 多种模式,指定元素插入
29
+ if (showSimple && transfer) {
30
+ popupTop = tableRect.top + bodyEl.scrollTop;
31
+ popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
32
+ }
33
+ else if (showCustomSimpleOutside) {
24
34
  if ($xeGGWrapper && wrapperEl) {
25
35
  popupTop = wrapperEl.offsetTop;
26
36
  }
@@ -33,8 +43,32 @@ function updatePopupStyle($xeTable) {
33
43
  }
34
44
  popupMaxHeight = Math.max(88, popupMaxHeight);
35
45
  }
36
- customStore.popupTop = popupTop;
37
- customStore.maxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
46
+ let popupMxHeight = 0;
47
+ if (!(placement === 'left' || placement === 'right')) {
48
+ popupMxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
49
+ }
50
+ if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
51
+ if (popupTop) {
52
+ popupStys.top = toCssUnit(popupTop);
53
+ }
54
+ }
55
+ if (showSimple && transfer) {
56
+ if (placement === 'bottom-left' || placement === 'bottom-right') {
57
+ popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
58
+ }
59
+ if (placement === 'top-left' || placement === 'bottom-left') {
60
+ popupStys.left = toCssUnit(tableRect.left);
61
+ }
62
+ else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
63
+ popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
64
+ }
65
+ }
66
+ if (popupMxHeight) {
67
+ popupStys.maxHeight = toCssUnit(popupMxHeight);
68
+ }
69
+ customStore.popupStyle = popupStys;
70
+ customStore.maxHeight = popupMxHeight;
71
+ return $xeTable.$nextTick();
38
72
  }
39
73
  function emitCustomEvent($xeTable, type, evnt) {
40
74
  const $xeGrid = $xeTable.$xeGrid;
@@ -53,7 +87,40 @@ export default {
53
87
  _openCustom() {
54
88
  const $xeTable = this;
55
89
  const reactData = $xeTable;
90
+ const internalData = $xeTable;
91
+ const $xeGrid = $xeTable.$xeGrid;
92
+ const $xeGantt = $xeTable.$xeGantt;
93
+ const $xeGGWrapper = $xeGrid || $xeGantt;
56
94
  const { initStore, customStore } = reactData;
95
+ const customOpts = $xeTable.computeCustomOpts;
96
+ const { mode, popupOptions } = customOpts;
97
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
98
+ const { transfer } = popupOptions || {};
99
+ const customSimpleMode = $xeTable.computeCustomSimpleMode;
100
+ const showCustomSimpleOutside = customSimpleMode === 'outside';
101
+ let cpToElem = $xeTable.$refs.refCustomContainerElem;
102
+ // 多种模式,指定元素插入
103
+ if (showSimple && transfer) {
104
+ cpToElem = document.body;
105
+ }
106
+ else {
107
+ if (showCustomSimpleOutside && $xeGGWrapper) {
108
+ const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem;
109
+ if (popupContainerElem) {
110
+ cpToElem = popupContainerElem;
111
+ }
112
+ }
113
+ }
114
+ if (cpToElem) {
115
+ const customPopupToElem = $xeTable.$refs.refCustomPopupToElem;
116
+ if (customPopupToElem && customPopupToElem.parentElement !== cpToElem) {
117
+ cpToElem.appendChild(customPopupToElem);
118
+ }
119
+ }
120
+ if (internalData.customPopupToElem !== cpToElem) {
121
+ reactData.ctPopupFlag++;
122
+ }
123
+ internalData.customPopupToElem = cpToElem;
57
124
  customStore.visible = true;
58
125
  initStore.custom = true;
59
126
  $xeTable.handleUpdateCustomColumn();
@@ -350,6 +417,10 @@ export default {
350
417
  customStore.oldVisibleMaps = visibleMaps;
351
418
  reactData.customColumnList = collectColumn.slice(0);
352
419
  }
420
+ },
421
+ handleCustomStyle() {
422
+ const $xeTable = this;
423
+ return updatePopupStyle($xeTable);
353
424
  }
354
425
  }
355
426
  };
@@ -1,7 +1,7 @@
1
1
  import { defineVxeComponent } from '../../../ui/src/comp';
2
2
  import { VxeUI } from '../../../ui';
3
3
  import { formatText } from '../../../ui/src/utils';
4
- import { getTpImg, addClass, removeClass, hasControlKey, toCssUnit } from '../../../ui/src/dom';
4
+ import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
5
5
  import { errLog } from '../../../ui/src/log';
6
6
  import XEUtils from 'xe-utils';
7
7
  const { getI18n, getIcon, renderEmptyElement } = VxeUI;
@@ -364,10 +364,17 @@ export default {
364
364
  },
365
365
  sortDragstartEvent(evnt) {
366
366
  const $xeTableCustomPanel = this;
367
+ const $xeTable = $xeTableCustomPanel.$xeTable;
368
+ const tableReactData = $xeTable;
367
369
  const customPanelInternalData = $xeTableCustomPanel.internalData;
370
+ const { customDragTime } = customPanelInternalData;
368
371
  if (evnt.dataTransfer) {
369
372
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
370
373
  }
374
+ if (customDragTime) {
375
+ clearTimeout(customDragTime);
376
+ }
377
+ tableReactData.isCustomDragStatus = true;
371
378
  customPanelInternalData.prevDragGroupField = null;
372
379
  customPanelInternalData.prevDragAggFnColid = null;
373
380
  },
@@ -544,6 +551,10 @@ export default {
544
551
  tableReactData.customColumnList = collectColumn.slice(0);
545
552
  $xeTable.handleColDragSwapColumn();
546
553
  }
554
+ customPanelInternalData.customDragTime = setTimeout(() => {
555
+ tableReactData.isCustomDragStatus = false;
556
+ customPanelInternalData.customDragTime = undefined;
557
+ }, 350);
547
558
  }).catch(() => {
548
559
  });
549
560
  }
@@ -650,13 +661,14 @@ export default {
650
661
  const $xeGantt = $xeTable.$xeGantt;
651
662
  const { customStore } = props;
652
663
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
653
- const { isCustomStatus, customColumnList } = tableReactData;
664
+ const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
654
665
  const customOpts = $xeTable.computeCustomOpts;
655
666
  const { immediate } = customOpts;
656
667
  const columnDragOpts = $xeTable.computeColumnDragOpts;
657
- const { maxHeight, popupTop } = customStore;
668
+ const { popupStyle } = customStore;
658
669
  const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
659
670
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
671
+ const vSize = $xeTable.computeSize;
660
672
  const { isCrossDrag } = columnDragOpts;
661
673
  const slots = customOpts.slots || {};
662
674
  const headerSlot = slots.header;
@@ -809,20 +821,14 @@ export default {
809
821
  ]));
810
822
  }
811
823
  });
812
- const popupStys = {};
813
- if (maxHeight && !['left', 'right'].includes(placement || '')) {
814
- if (popupTop) {
815
- popupStys.top = toCssUnit(popupTop);
816
- }
817
- popupStys.maxHeight = toCssUnit(maxHeight);
818
- }
819
824
  return h('div', {
820
825
  ref: 'refElem',
821
826
  key: 'simple',
822
827
  class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
828
+ [`size--${vSize}`]: vSize,
823
829
  'is--active': customStore.visible
824
830
  }],
825
- style: popupStys
831
+ style: popupStyle
826
832
  }, customStore.visible
827
833
  ? [
828
834
  h('div', {
@@ -892,7 +898,7 @@ export default {
892
898
  : h('transition-group', {
893
899
  class: 'vxe-table-custom--panel-list',
894
900
  props: {
895
- name: 'vxe-table-custom--list',
901
+ name: isCustomDragStatus ? 'vxe-table-custom--list' : '',
896
902
  tag: 'ul'
897
903
  },
898
904
  on: customWrapperOns
@@ -376,11 +376,9 @@ export default {
376
376
  moveCurrentRow(isUpArrow, isDwArrow, evnt) {
377
377
  const $xeTable = this;
378
378
  const props = $xeTable;
379
- const reactData = $xeTable;
380
379
  const internalData = $xeTable;
381
380
  const { treeConfig } = props;
382
- const { currentRow } = reactData;
383
- const { afterFullData } = internalData;
381
+ const { afterFullData, currentRow } = internalData;
384
382
  const treeOpts = $xeTable.computeTreeOpts;
385
383
  const childrenField = treeOpts.children || treeOpts.childrenField;
386
384
  let targetRow;
@@ -319,6 +319,16 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
319
319
  if (treeConfig) {
320
320
  tdVNs.push(...renderLine(h, $xeTable, rowid, cellParams, cellHeight));
321
321
  }
322
+ const clVNs = [];
323
+ if (!isVNPreEmptyStatus) {
324
+ clVNs.push(h('div', {
325
+ attrs: {
326
+ colid,
327
+ rowid
328
+ },
329
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
330
+ }, column.renderCell(h, cellParams)));
331
+ }
322
332
  tdVNs.push(h('div', {
323
333
  key: 'tc',
324
334
  class: ['vxe-cell', {
@@ -330,17 +340,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
330
340
  attrs: {
331
341
  title: showTitle ? $xeTable.getCellLabel(row, column) : null
332
342
  }
333
- }, isVNPreEmptyStatus
334
- ? []
335
- : [
336
- h('div', {
337
- attrs: {
338
- colid,
339
- rowid
340
- },
341
- class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
342
- }, column.renderCell(h, cellParams))
343
- ]));
343
+ }, clVNs));
344
344
  if (showValidTip && errorValidItem) {
345
345
  const errRule = errorValidItem.rule;
346
346
  const validSlot = slots ? slots.valid : null;
@@ -440,8 +440,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
440
440
  const $xeGrid = $xeTable.$xeGrid;
441
441
  const $xeGantt = $xeTable.$xeGantt;
442
442
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
443
- const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
444
- const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
443
+ const { hasFixedColumn, treeExpandedFlag, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
444
+ const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps, currentRow } = tableInternalData;
445
445
  const checkboxOpts = $xeTable.computeCheckboxOpts;
446
446
  const radioOpts = $xeTable.computeRadioOpts;
447
447
  const treeOpts = $xeTable.computeTreeOpts;
@@ -533,7 +533,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
533
533
  'row--radio': radioOpts.highlight && selectRadioRow === row,
534
534
  'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
535
535
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
536
- 'row--group': hasRowGroupAggregate
536
+ 'row--group': hasRowGroupAggregate,
537
+ 'row--current': currentRow && rowid === getRowid($xeTable, currentRow)
537
538
  },
538
539
  rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
539
540
  ];
@@ -546,7 +547,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
546
547
  rowid
547
548
  },
548
549
  style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : undefined,
549
- key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
550
+ key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
550
551
  on: trOn
551
552
  }, tdVNs));
552
553
  // 如果行被展开了
@@ -960,8 +960,8 @@ function updateStyle($xeTable) {
960
960
  const reactData = $xeTable;
961
961
  const internalData = $xeTable;
962
962
  const { mouseConfig } = props;
963
- const { isGroup, currentRow, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData;
964
- const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
963
+ const { isGroup, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData;
964
+ const { visibleColumn, tableHeight, elemStore, currentRow, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
965
965
  const $xeGanttView = internalData.xeGanttView;
966
966
  const el = $xeTable.$refs.refElem;
967
967
  if (!el || (internalData.tBodyHeight && !el.clientHeight)) {
@@ -1565,8 +1565,8 @@ function handleReserveStatus($xeTable) {
1565
1565
  const reactData = $xeTable;
1566
1566
  const internalData = $xeTable;
1567
1567
  const { treeConfig } = props;
1568
- const { expandColumn, currentRow, selectRadioRow } = reactData;
1569
- const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps } = internalData;
1568
+ const { expandColumn, selectRadioRow } = reactData;
1569
+ const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps, currentRow } = internalData;
1570
1570
  const expandOpts = $xeTable.computeExpandOpts;
1571
1571
  const treeOpts = $xeTable.computeTreeOpts;
1572
1572
  const radioOpts = $xeTable.computeRadioOpts;
@@ -1590,7 +1590,7 @@ function handleReserveStatus($xeTable) {
1590
1590
  handleCheckedCheckboxRow($xeTable, handleReserveRow($xeTable, internalData.checkboxReserveRowMap), true, true);
1591
1591
  }
1592
1592
  if (currentRow && !fullAllDataRowIdData[getRowid($xeTable, currentRow)]) {
1593
- reactData.currentRow = null; // 刷新当前行状态
1593
+ internalData.currentRow = null; // 刷新当前行状态
1594
1594
  }
1595
1595
  // 行展开
1596
1596
  internalData.rowExpandedMaps = expandColumn ? getRecoverRowMaps($xeTable, rowExpandedMaps) : {}; // 刷新行展开状态
@@ -3014,8 +3014,10 @@ function handleRecalculateStyle($xeTable, reFull, reWidth, reHeight) {
3014
3014
  });
3015
3015
  }
3016
3016
  function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
3017
+ const reactData = $xeTable;
3017
3018
  const internalData = $xeTable;
3018
3019
  return new Promise(resolve => {
3020
+ const { customStore } = reactData;
3019
3021
  const { rceTimeout, rceRunTime } = internalData;
3020
3022
  const $xeGanttView = internalData.xeGanttView;
3021
3023
  const resizeOpts = $xeTable.computeResizeOpts;
@@ -3025,6 +3027,9 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
3025
3027
  autoCellWidth($xeTable);
3026
3028
  updateRowExpandStyle($xeTable);
3027
3029
  }
3030
+ if (customStore.visible && $xeTable.handleCustomStyle) {
3031
+ $xeTable.handleCustomStyle();
3032
+ }
3028
3033
  if (rceTimeout) {
3029
3034
  clearTimeout(rceTimeout);
3030
3035
  if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
@@ -4250,6 +4255,21 @@ function handleColumnVisible(visible) {
4250
4255
  return $xeTable.$nextTick();
4251
4256
  };
4252
4257
  }
4258
+ function reUpdateCustomStyleEvent($xeTable, evnt) {
4259
+ const reactData = $xeTable;
4260
+ const { customStore } = reactData;
4261
+ const customOpts = $xeTable.computeCustomOpts;
4262
+ const { popupOptions } = customOpts;
4263
+ const { transfer } = popupOptions || {};
4264
+ if (transfer && customStore.visible) {
4265
+ const tableCustom = $xeTable.$refs.refTableCustom;
4266
+ if (tableCustom && $xeTable.handleCustomStyle && !checkTargetElement(evnt.target, [tableCustom.$el], evnt.currentTarget)) {
4267
+ $xeTable.handleCustomStyle().then(() => {
4268
+ $xeTable.handleCustomStyle();
4269
+ });
4270
+ }
4271
+ }
4272
+ }
4253
4273
  const tableMethods = {
4254
4274
  callSlot(slotFunc, params, h, vNodes) {
4255
4275
  const $xeTable = this;
@@ -6897,13 +6917,19 @@ const tableMethods = {
6897
6917
  $xeTable.closeFilter();
6898
6918
  $xeTable.closeMenu();
6899
6919
  },
6920
+ handleGlobalScrollEvent(evnt) {
6921
+ const $xeTable = this;
6922
+ reUpdateCustomStyleEvent($xeTable, evnt);
6923
+ },
6900
6924
  /**
6901
6925
  * 全局滚动事件
6902
6926
  */
6903
6927
  handleGlobalMousewheelEvent() {
6904
6928
  const $xeTable = this;
6905
6929
  $xeTable.closeTooltip();
6906
- $xeTable.closeMenu();
6930
+ if ($xeTable.closeMenu) {
6931
+ $xeTable.closeMenu();
6932
+ }
6907
6933
  },
6908
6934
  /**
6909
6935
  * 表格键盘事件
@@ -6960,8 +6986,8 @@ const tableMethods = {
6960
6986
  if (internalData.isActivated) {
6961
6987
  $xeTable.preventEvent(evnt, 'event.keydown', null, () => {
6962
6988
  const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props;
6963
- const { ctxMenuStore, editStore, currentRow } = reactData;
6964
- const { afterFullData, visibleColumn } = internalData;
6989
+ const { ctxMenuStore, editStore } = reactData;
6990
+ const { afterFullData, visibleColumn, currentRow } = internalData;
6965
6991
  const isContentMenu = $xeTable.computeIsContentMenu;
6966
6992
  const bodyMenu = $xeTable.computeBodyMenu;
6967
6993
  const keyboardOpts = $xeTable.computeKeyboardOpts;
@@ -8417,8 +8443,8 @@ const tableMethods = {
8417
8443
  },
8418
8444
  triggerCurrentRowEvent(evnt, params) {
8419
8445
  const $xeTable = this;
8420
- const reactData = $xeTable;
8421
- const { currentRow: oldValue } = reactData;
8446
+ const internalData = $xeTable;
8447
+ const { currentRow: oldValue } = internalData;
8422
8448
  const rowOpts = $xeTable.computeRowOpts;
8423
8449
  const currentRowOpts = $xeTable.computeCurrentRowOpts;
8424
8450
  const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
@@ -8523,11 +8549,10 @@ const tableMethods = {
8523
8549
  */
8524
8550
  clearCurrentRow() {
8525
8551
  const $xeTable = this;
8526
- const reactData = $xeTable;
8527
8552
  const internalData = $xeTable;
8528
8553
  const $xeGanttView = internalData.xeGanttView;
8529
8554
  const el = $xeTable.$refs.refElem;
8530
- reactData.currentRow = null;
8555
+ internalData.currentRow = null;
8531
8556
  internalData.hoverRow = null;
8532
8557
  if (el) {
8533
8558
  XEUtils.arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'));
@@ -8550,10 +8575,8 @@ const tableMethods = {
8550
8575
  getCurrentRecord(isFull) {
8551
8576
  const $xeTable = this;
8552
8577
  const props = $xeTable;
8553
- const reactData = $xeTable;
8554
8578
  const internalData = $xeTable;
8555
- const { currentRow } = reactData;
8556
- const { fullDataRowIdData, afterFullRowMaps } = internalData;
8579
+ const { fullDataRowIdData, afterFullRowMaps, currentRow } = internalData;
8557
8580
  const rowOpts = $xeTable.computeRowOpts;
8558
8581
  if (rowOpts.isCurrent || props.highlightCurrentRow) {
8559
8582
  const rowid = getRowid($xeTable, currentRow);
@@ -11921,7 +11944,7 @@ const tableMethods = {
11921
11944
  rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
11922
11945
  }
11923
11946
  reactData.scrollYTop = scrollYTop;
11924
- reactData.scrollYHeight = ySpaceHeight;
11947
+ reactData.scrollYHeight = isScrollYBig ? sYHeight : ySpaceHeight;
11925
11948
  reactData.isScrollYBig = isScrollYBig;
11926
11949
  calcScrollbar($xeTable);
11927
11950
  if (isScrollYBig && mouseOpts.area) {
@@ -11989,17 +12012,26 @@ const tableMethods = {
11989
12012
  },
11990
12013
  /**
11991
12014
  * 如果有滚动条,则滚动到对应的行
11992
- * @param {Row} row 行对象
11993
- * @param {ColumnInfo} column 列配置
11994
12015
  */
11995
- scrollToRow(row, fieldOrColumn, options) {
12016
+ scrollToRow(rowOrRowid, fieldOrColumn, options) {
11996
12017
  const $xeTable = this;
11997
12018
  const props = $xeTable;
11998
12019
  const reactData = $xeTable;
11999
12020
  const internalData = $xeTable;
12000
12021
  const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
12001
- const { _sToTime } = internalData;
12022
+ const { fullAllDataRowIdData, _sToTime } = internalData;
12002
12023
  const rest = [];
12024
+ let row;
12025
+ if (XEUtils.isString(rowOrRowid) || XEUtils.isNumber(rowOrRowid)) {
12026
+ const rowid = rowOrRowid;
12027
+ const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
12028
+ if (rowRest) {
12029
+ row = rowRest.row;
12030
+ }
12031
+ }
12032
+ else {
12033
+ row = rowOrRowid;
12034
+ }
12003
12035
  if (row) {
12004
12036
  if (props.treeConfig) {
12005
12037
  rest.push($xeTable.scrollToTreeRow(row));
@@ -1811,6 +1811,7 @@ export default {
1811
1811
  globalEvents.on($xeTable, 'mousewheel', this.handleGlobalMousewheelEvent);
1812
1812
  globalEvents.on($xeTable, 'keydown', this.handleGlobalKeydownEvent);
1813
1813
  globalEvents.on($xeTable, 'resize', this.handleGlobalResizeEvent);
1814
+ globalEvents.on($xeTable, 'scroll', this.handleGlobalScrollEvent);
1814
1815
  globalEvents.on($xeTable, 'contextmenu', this.handleGlobalContextmenuEvent);
1815
1816
  $xeTable.preventEvent(null, 'created');
1816
1817
  },
@@ -1942,6 +1943,10 @@ export default {
1942
1943
  if (popupWrapperEl && popupWrapperEl.parentElement) {
1943
1944
  popupWrapperEl.parentElement.removeChild(popupWrapperEl);
1944
1945
  }
1946
+ const customPopupToElem = $xeTable.$refs.refCustomPopupToElem;
1947
+ if (customPopupToElem && customPopupToElem.parentElement) {
1948
+ customPopupToElem.parentElement.removeChild(customPopupToElem);
1949
+ }
1945
1950
  const tableViewportEl = $xeTable.$refs.refTableViewportElem;
1946
1951
  if (tableViewportEl) {
1947
1952
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
@@ -1960,6 +1965,7 @@ export default {
1960
1965
  globalEvents.off($xeTable, 'mousewheel');
1961
1966
  globalEvents.off($xeTable, 'keydown');
1962
1967
  globalEvents.off($xeTable, 'resize');
1968
+ globalEvents.off($xeTable, 'scroll');
1963
1969
  globalEvents.off($xeTable, 'contextmenu');
1964
1970
  $xeTable.preventEvent(null, 'beforeDestroy');
1965
1971
  XEUtils.assign(reactData, createReactData());
@@ -2011,8 +2017,6 @@ export default {
2011
2017
  const columnDragOpts = $xeTable.computeColumnDragOpts;
2012
2018
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
2013
2019
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
2014
- const customSimpleMode = $xeTable.computeCustomSimpleMode;
2015
- const showCustomSimpleOutside = customSimpleMode === 'outside';
2016
2020
  const { isCrossTableDrag } = rowDragOpts;
2017
2021
  const tbOns = {
2018
2022
  contextmenu: this.contextMenuEvent,
@@ -2161,18 +2165,6 @@ export default {
2161
2165
  })
2162
2166
  ]
2163
2167
  : []),
2164
- /**
2165
- * 自定义列
2166
- */
2167
- !showCustomSimpleOutside && initStore.custom
2168
- ? h(TableCustomPanelComponent, {
2169
- key: 'cs',
2170
- ref: 'refTableCustom',
2171
- props: {
2172
- customStore
2173
- }
2174
- })
2175
- : renderEmptyElement($xeTable),
2176
2168
  /**
2177
2169
  * 加载中
2178
2170
  */
@@ -2205,15 +2197,16 @@ export default {
2205
2197
  ])
2206
2198
  ]),
2207
2199
  h('div', {
2208
- key: 'tpw'
2200
+ key: 'fpw',
2201
+ ref: 'refCustomContainerElem'
2209
2202
  }, [
2210
2203
  h('div', {
2211
- ref: 'refPopupWrapperElem'
2204
+ ref: 'refCustomPopupToElem'
2212
2205
  }, [
2213
2206
  /**
2214
2207
  * 自定义列
2215
2208
  */
2216
- showCustomSimpleOutside && initStore.custom
2209
+ initStore.custom
2217
2210
  ? h(TableCustomPanelComponent, {
2218
2211
  key: 'cs',
2219
2212
  ref: 'refTableCustom',
@@ -2221,7 +2214,15 @@ export default {
2221
2214
  customStore
2222
2215
  }
2223
2216
  })
2224
- : renderEmptyElement($xeTable),
2217
+ : renderEmptyElement($xeTable)
2218
+ ])
2219
+ ]),
2220
+ h('div', {
2221
+ key: 'tpw'
2222
+ }, [
2223
+ h('div', {
2224
+ ref: 'refPopupWrapperElem'
2225
+ }, [
2225
2226
  /**
2226
2227
  * 筛选
2227
2228
  */
@@ -2301,7 +2302,10 @@ export default {
2301
2302
  minWidth: tableTipConfig.minWidth,
2302
2303
  minHeight: tableTipConfig.minHeight,
2303
2304
  maxWidth: tableTipConfig.maxWidth,
2304
- maxHeight: tableTipConfig.maxHeight
2305
+ maxHeight: tableTipConfig.maxHeight,
2306
+ placement: tableTipConfig.placement,
2307
+ defaultPlacement: tableTipConfig.defaultPlacement,
2308
+ popupClassName: tableTipConfig.popupClassName
2305
2309
  },
2306
2310
  scopedSlots: currTooltipSlot
2307
2311
  ? {
@@ -82,6 +82,8 @@ export function createInternalData() {
82
82
  sourceDataRowIdData: {},
83
83
  fullColumnIdData: {},
84
84
  fullColumnFieldData: {},
85
+ // 当前行
86
+ currentRow: null,
85
87
  // 合并表头单元格的数据
86
88
  mergeHeaderList: [],
87
89
  mergeHeaderMaps: {},
@@ -130,6 +132,7 @@ export function createInternalData() {
130
132
  tFooterHeight: 0,
131
133
  teleportToWrapperElem: null,
132
134
  popupToWrapperElem: null,
135
+ customPopupToElem: null,
133
136
  lastSTime: 0,
134
137
  inited: false,
135
138
  tooltipTimeout: null,
@@ -172,8 +175,6 @@ export function createReactData() {
172
175
  isAllSelected: false,
173
176
  // 复选框属性,有选中且非全选状态
174
177
  isIndeterminate: false,
175
- // 当前行
176
- currentRow: null,
177
178
  // 单选框属性,选中列
178
179
  currentColumn: null,
179
180
  // 单选框属性,选中行
@@ -209,7 +210,7 @@ export function createReactData() {
209
210
  activeWrapper: false,
210
211
  visible: false,
211
212
  maxHeight: null,
212
- popupTop: 0,
213
+ popupStyle: {},
213
214
  oldSortMaps: {},
214
215
  oldFixedMaps: {},
215
216
  oldVisibleMaps: {}
@@ -370,6 +371,8 @@ export function createReactData() {
370
371
  resizeHeightFlag: 1,
371
372
  resizeWidthFlag: 1,
372
373
  isCustomStatus: false,
374
+ isCustomDragStatus: true,
375
+ ctPopupFlag: 1,
373
376
  isCrossDragRow: false,
374
377
  dragRow: null,
375
378
  isCrossDragCol: false,
@@ -791,6 +791,7 @@
791
791
  text-align: left;
792
792
  background-color: var(--vxe-ui-layout-background-color);
793
793
  z-index: 19;
794
+ color: var(--vxe-ui-font-color);
794
795
  border: 1px solid var(--vxe-ui-table-border-color);
795
796
  border-radius: var(--vxe-ui-border-radius);
796
797
  box-shadow: var(--vxe-ui-base-popup-box-shadow);
@@ -1299,6 +1300,19 @@
1299
1300
  width: 200px;
1300
1301
  }
1301
1302
 
1303
+ .vxe-table-custom-wrapper {
1304
+ font-size: var(--vxe-ui-font-size-default);
1305
+ }
1306
+ .vxe-table-custom-wrapper.size--medium {
1307
+ font-size: var(--vxe-ui-font-size-medium);
1308
+ }
1309
+ .vxe-table-custom-wrapper.size--small {
1310
+ font-size: var(--vxe-ui-font-size-small);
1311
+ }
1312
+ .vxe-table-custom-wrapper.size--mini {
1313
+ font-size: var(--vxe-ui-font-size-mini);
1314
+ }
1315
+
1302
1316
  .vxe-table-export--panel-column > ul {
1303
1317
  list-style-type: none;
1304
1318
  overflow: auto;