vxe-table 4.18.9 → 4.18.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 (59) 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/hook.js +69 -6
  6. package/es/table/module/custom/panel.js +19 -14
  7. package/es/table/module/keyboard/hook.js +1 -2
  8. package/es/table/src/body.js +14 -13
  9. package/es/table/src/table.js +75 -39
  10. package/es/table/src/util.js +7 -3
  11. package/es/table/style.css +14 -0
  12. package/es/table/style.min.css +1 -1
  13. package/es/ui/index.js +3 -2
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-table/style.css +14 -0
  16. package/es/vxe-table/style.min.css +1 -1
  17. package/helper/vetur/attributes.json +1 -1
  18. package/helper/vetur/tags.json +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/index.min.css +1 -1
  21. package/lib/index.umd.js +143 -59
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/table/module/custom/hook.js +76 -6
  26. package/lib/table/module/custom/hook.min.js +1 -1
  27. package/lib/table/module/custom/panel.js +21 -13
  28. package/lib/table/module/custom/panel.min.js +1 -1
  29. package/lib/table/module/keyboard/hook.js +1 -3
  30. package/lib/table/module/keyboard/hook.min.js +1 -1
  31. package/lib/table/src/body.js +14 -9
  32. package/lib/table/src/body.min.js +1 -1
  33. package/lib/table/src/table.js +20 -22
  34. package/lib/table/src/table.min.js +1 -1
  35. package/lib/table/src/util.js +7 -3
  36. package/lib/table/src/util.min.js +1 -1
  37. package/lib/table/style/style.css +14 -0
  38. package/lib/table/style/style.min.css +1 -1
  39. package/lib/ui/index.js +3 -2
  40. package/lib/ui/index.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/lib/vxe-table/style/style.css +14 -0
  44. package/lib/vxe-table/style/style.min.css +1 -1
  45. package/package.json +1 -1
  46. package/packages/table/module/custom/hook.ts +70 -7
  47. package/packages/table/module/custom/panel.ts +20 -15
  48. package/packages/table/module/keyboard/hook.ts +1 -2
  49. package/packages/table/src/body.ts +16 -13
  50. package/packages/table/src/table.ts +76 -39
  51. package/packages/table/src/util.ts +9 -3
  52. package/packages/ui/index.ts +2 -1
  53. package/styles/components/table-module/custom.scss +14 -0
  54. /package/es/{iconfont.1774420952727.ttf → iconfont.1775652066125.ttf} +0 -0
  55. /package/es/{iconfont.1774420952727.woff → iconfont.1775652066125.woff} +0 -0
  56. /package/es/{iconfont.1774420952727.woff2 → iconfont.1775652066125.woff2} +0 -0
  57. /package/lib/{iconfont.1774420952727.ttf → iconfont.1775652066125.ttf} +0 -0
  58. /package/lib/{iconfont.1774420952727.woff → iconfont.1775652066125.woff} +0 -0
  59. /package/lib/{iconfont.1774420952727.woff2 → iconfont.1775652066125.woff2} +0 -0
@@ -2,6 +2,7 @@ import { nextTick } from 'vue';
2
2
  import { VxeUI } from '../../../ui';
3
3
  import XEUtils from 'xe-utils';
4
4
  import { getColumnList } from '../../src/util';
5
+ import { toCssUnit } from '../../../ui/src/dom';
5
6
  const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
6
7
  VxeUI.hooks.add('tableCustomModule', {
7
8
  setupTable($xeTable) {
@@ -14,13 +15,16 @@ VxeUI.hooks.add('tableCustomModule', {
14
15
  const updatePopupStyle = () => {
15
16
  const { customStore } = reactData;
16
17
  const customOpts = computeCustomOpts.value;
18
+ const { mode, placement, popupOptions } = customOpts;
19
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
20
+ const { transfer, maxHeight } = popupOptions || {};
17
21
  const customSimpleMode = computeCustomSimpleMode.value;
18
22
  const showCustomSimpleOutside = customSimpleMode === 'outside';
19
- const { popupOptions } = customOpts;
20
- const { maxHeight } = popupOptions || {};
23
+ const bodyEl = document.documentElement;
21
24
  let wrapperEl = refElem.value;
22
25
  let popupTop = 0;
23
26
  let popupMaxHeight = 0;
27
+ const popupStys = {};
24
28
  if ($xeGantt) {
25
29
  const { refGanttContainerElem } = $xeGantt.getRefMaps();
26
30
  const ganttContainerElem = refGanttContainerElem.value;
@@ -28,7 +32,13 @@ VxeUI.hooks.add('tableCustomModule', {
28
32
  wrapperEl = ganttContainerElem;
29
33
  }
30
34
  }
31
- if (showCustomSimpleOutside) {
35
+ const tableRect = wrapperEl.getBoundingClientRect();
36
+ // 多种模式,指定元素插入
37
+ if (showSimple && transfer) {
38
+ popupTop = tableRect.top + bodyEl.scrollTop;
39
+ popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
40
+ }
41
+ else if (showCustomSimpleOutside) {
32
42
  if ($xeGGWrapper && wrapperEl) {
33
43
  popupTop = wrapperEl.offsetTop;
34
44
  }
@@ -41,11 +51,59 @@ VxeUI.hooks.add('tableCustomModule', {
41
51
  }
42
52
  popupMaxHeight = Math.max(88, popupMaxHeight);
43
53
  }
44
- customStore.popupTop = popupTop;
45
- customStore.maxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
54
+ let popupMxHeight = 0;
55
+ if (!(placement === 'left' || placement === 'right')) {
56
+ popupMxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
57
+ }
58
+ if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
59
+ if (popupTop) {
60
+ popupStys.top = toCssUnit(popupTop);
61
+ }
62
+ }
63
+ if (showSimple && transfer) {
64
+ if (placement === 'bottom-left' || placement === 'bottom-right') {
65
+ popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
66
+ }
67
+ if (placement === 'top-left' || placement === 'bottom-left') {
68
+ popupStys.left = toCssUnit(tableRect.left);
69
+ }
70
+ else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
71
+ popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
72
+ }
73
+ }
74
+ if (popupMxHeight) {
75
+ popupStys.maxHeight = toCssUnit(popupMxHeight);
76
+ }
77
+ customStore.popupStyle = popupStys;
78
+ customStore.maxHeight = popupMxHeight;
79
+ return nextTick();
46
80
  };
47
81
  const openCustom = () => {
48
82
  const { initStore, customStore } = reactData;
83
+ const customOpts = computeCustomOpts.value;
84
+ const { mode, popupOptions } = customOpts;
85
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
86
+ const { transfer } = popupOptions || {};
87
+ const customSimpleMode = computeCustomSimpleMode.value;
88
+ const showCustomSimpleOutside = customSimpleMode === 'outside';
89
+ let cpToElem = null;
90
+ // 多种模式,指定元素插入
91
+ if (showSimple && transfer) {
92
+ cpToElem = document.body;
93
+ }
94
+ else {
95
+ if (showCustomSimpleOutside && $xeGGWrapper) {
96
+ const { refPopupContainerElem } = $xeGGWrapper.getRefMaps();
97
+ const popupContainerElem = refPopupContainerElem.value;
98
+ if (popupContainerElem) {
99
+ cpToElem = popupContainerElem;
100
+ }
101
+ }
102
+ }
103
+ if (internalData.customPopupToElem !== cpToElem) {
104
+ reactData.ctPopupFlag++;
105
+ }
106
+ internalData.customPopupToElem = cpToElem;
49
107
  customStore.visible = true;
50
108
  initStore.custom = true;
51
109
  handleUpdateCustomColumn();
@@ -333,7 +391,12 @@ VxeUI.hooks.add('tableCustomModule', {
333
391
  $xeTable.emitCustomEvent('close', evnt);
334
392
  }
335
393
  },
336
- handleUpdateCustomColumn
394
+ handleUpdateCustomColumn,
395
+ handleCustomStyle() {
396
+ const reactData = $xeTable.reactData;
397
+ reactData.isCustomDragStatus = false;
398
+ return updatePopupStyle();
399
+ }
337
400
  };
338
401
  return Object.assign(Object.assign({}, customMethods), customPrivateMethods);
339
402
  },
@@ -2,7 +2,7 @@ import { h, inject, ref, provide, nextTick, TransitionGroup, reactive, onUnmount
2
2
  import { defineVxeComponent } from '../../../ui/src/comp';
3
3
  import { VxeUI } from '../../../ui';
4
4
  import { formatText } from '../../../ui/src/utils';
5
- import { getTpImg, addClass, removeClass, hasControlKey, toCssUnit } from '../../../ui/src/dom';
5
+ import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
6
6
  import { errLog } from '../../../ui/src/log';
7
7
  import XEUtils from 'xe-utils';
8
8
  const { getI18n, getIcon, renderEmptyElement } = VxeUI;
@@ -13,7 +13,8 @@ export function createInternalData() {
13
13
  // prevDragGroupField: undefined,
14
14
  // prevDragAggFnColid: undefined,
15
15
  // prevDragToChild: false,
16
- // prevDragPos: null
16
+ // prevDragPos: null,
17
+ // customDragTime: null
17
18
  };
18
19
  }
19
20
  export default defineVxeComponent({
@@ -33,7 +34,7 @@ export default defineVxeComponent({
33
34
  const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
34
35
  const $xeTable = inject('$xeTable', {});
35
36
  const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
36
- const { computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts } = $xeTable.getComputeMaps();
37
+ const { computeSize, computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts } = $xeTable.getComputeMaps();
37
38
  const refElem = ref();
38
39
  const refBodyWrapperElem = ref();
39
40
  const refCustomBodyElem = ref();
@@ -302,9 +303,14 @@ export default defineVxeComponent({
302
303
  removeClass(trEl, 'active--drag-origin');
303
304
  };
304
305
  const sortDragstartEvent = (evnt) => {
306
+ const { customDragTime } = customPanelInternalData;
305
307
  if (evnt.dataTransfer) {
306
308
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
307
309
  }
310
+ if (customDragTime) {
311
+ clearTimeout(customDragTime);
312
+ }
313
+ tableReactData.isCustomDragStatus = true;
308
314
  customPanelInternalData.prevDragGroupField = null;
309
315
  customPanelInternalData.prevDragAggFnColid = null;
310
316
  };
@@ -474,6 +480,10 @@ export default defineVxeComponent({
474
480
  tableReactData.customColumnList = collectColumn.slice(0);
475
481
  $xeTable.handleColDragSwapColumn();
476
482
  }
483
+ customPanelInternalData.customDragTime = setTimeout(() => {
484
+ tableReactData.isCustomDragStatus = false;
485
+ customPanelInternalData.customDragTime = undefined;
486
+ }, 350);
477
487
  }).catch(() => {
478
488
  });
479
489
  }
@@ -568,13 +578,14 @@ export default defineVxeComponent({
568
578
  const tableProps = $xeTable.props;
569
579
  const { customStore } = props;
570
580
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
571
- const { isCustomStatus, customColumnList } = tableReactData;
581
+ const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
572
582
  const customOpts = computeCustomOpts.value;
573
583
  const { immediate } = customOpts;
574
584
  const columnDragOpts = computeColumnDragOpts.value;
575
- const { maxHeight, popupTop } = customStore;
585
+ const { popupStyle } = customStore;
576
586
  const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
577
587
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
588
+ const vSize = computeSize.value;
578
589
  const { isCrossDrag } = columnDragOpts;
579
590
  const slots = customOpts.slots || {};
580
591
  const headerSlot = slots.header;
@@ -704,20 +715,14 @@ export default defineVxeComponent({
704
715
  ]));
705
716
  }
706
717
  });
707
- const popupStys = {};
708
- if (maxHeight && !['left', 'right'].includes(placement || '')) {
709
- if (popupTop) {
710
- popupStys.top = toCssUnit(popupTop);
711
- }
712
- popupStys.maxHeight = toCssUnit(maxHeight);
713
- }
714
718
  return h('div', {
715
719
  ref: refElem,
716
720
  key: 'simple',
717
721
  class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
722
+ [`size--${vSize}`]: vSize,
718
723
  'is--active': customStore.visible
719
724
  }],
720
- style: popupStys
725
+ style: popupStyle
721
726
  }, customStore.visible
722
727
  ? [
723
728
  h('div', {
@@ -778,7 +783,7 @@ export default defineVxeComponent({
778
783
  ? h('div', {
779
784
  class: 'vxe-table-custom--panel-body'
780
785
  }, $xeTable.callSlot(defaultSlot, params))
781
- : h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
786
+ : h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: isCustomDragStatus ? 'vxe-table-custom--list' : '', tag: 'ul' }, customWrapperOns), {
782
787
  default: () => colVNs
783
788
  }),
784
789
  bottomSlot
@@ -392,8 +392,7 @@ hooks.add('tableKeyboardModule', {
392
392
  // 处理当前行方向键移动
393
393
  moveCurrentRow(isUpArrow, isDwArrow, evnt) {
394
394
  const { treeConfig } = props;
395
- const { currentRow } = reactData;
396
- const { afterFullData } = internalData;
395
+ const { afterFullData, currentRow } = internalData;
397
396
  const treeOpts = computeTreeOpts.value;
398
397
  const childrenField = treeOpts.children || treeOpts.childrenField;
399
398
  let targetRow;
@@ -337,6 +337,14 @@ export default defineVxeComponent({
337
337
  if (treeConfig) {
338
338
  tdVNs.push(...renderLine(rowid, cellParams, cellHeight));
339
339
  }
340
+ const clVNs = [];
341
+ if (!isVNPreEmptyStatus) {
342
+ clVNs.push(h('div', {
343
+ colid,
344
+ rowid,
345
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
346
+ }, column.renderCell(cellParams)));
347
+ }
340
348
  tdVNs.push(h('div', {
341
349
  key: 'tc',
342
350
  class: ['vxe-cell', {
@@ -346,15 +354,7 @@ export default defineVxeComponent({
346
354
  }],
347
355
  style: tcStyle,
348
356
  title: showTitle ? $xeTable.getCellLabel(row, column) : null
349
- }, isVNPreEmptyStatus
350
- ? []
351
- : [
352
- h('div', {
353
- colid,
354
- rowid,
355
- class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
356
- }, column.renderCell(cellParams))
357
- ]));
357
+ }, clVNs));
358
358
  if (showValidTip && errorValidItem) {
359
359
  const errRule = errorValidItem.rule;
360
360
  const validSlot = slots ? slots.valid : null;
@@ -440,8 +440,8 @@ export default defineVxeComponent({
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 = computeCheckboxOpts.value;
446
446
  const radioOpts = computeRadioOpts.value;
447
447
  const treeOpts = computeTreeOpts.value;
@@ -532,14 +532,15 @@ export default defineVxeComponent({
532
532
  'row--radio': radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
533
533
  'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
534
534
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
535
- 'row--group': hasRowGroupAggregate
535
+ 'row--group': hasRowGroupAggregate,
536
+ 'row--current': currentRow && rowid === getRowid($xeTable, currentRow)
536
537
  },
537
538
  getPropClass(rowClassName, params)
538
539
  ];
539
540
  const tdVNs = tableColumn.map((column, $columnIndex) => {
540
541
  return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
541
542
  });
542
- rows.push(h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
543
+ rows.push(h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
543
544
  // 如果行被展开了
544
545
  if (isExpandRow) {
545
546
  const expandOpts = computeExpandOpts.value;
@@ -77,6 +77,7 @@ export default defineVxeComponent({
77
77
  const refTableRightFooter = ref();
78
78
  const refTeleportWrapper = ref();
79
79
  const refPopupWrapperElem = ref();
80
+ const refCustomContainerElem = ref();
80
81
  const refLeftContainer = ref();
81
82
  const refRightContainer = ref();
82
83
  const refColResizeBar = ref();
@@ -682,6 +683,7 @@ export default defineVxeComponent({
682
683
  refRightContainer,
683
684
  refColResizeBar,
684
685
  refRowResizeBar,
686
+ refCustomContainerElem,
685
687
  refScrollXVirtualElem,
686
688
  refScrollYVirtualElem,
687
689
  refScrollXHandleElem,
@@ -2354,8 +2356,8 @@ export default defineVxeComponent({
2354
2356
  };
2355
2357
  const updateStyle = () => {
2356
2358
  const { mouseConfig } = props;
2357
- const { isGroup, currentRow, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData;
2358
- const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
2359
+ const { isGroup, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData;
2360
+ const { visibleColumn, tableHeight, elemStore, currentRow, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
2359
2361
  const $xeGanttView = internalData.xeGanttView;
2360
2362
  const el = refElem.value;
2361
2363
  if (!el || (internalData.tBodyHeight && !el.clientHeight)) {
@@ -2943,8 +2945,8 @@ export default defineVxeComponent({
2943
2945
  // 还原展开、选中等相关状态
2944
2946
  const handleReserveStatus = () => {
2945
2947
  const { treeConfig } = props;
2946
- const { expandColumn, currentRow, selectRadioRow } = reactData;
2947
- const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps } = internalData;
2948
+ const { expandColumn, selectRadioRow } = reactData;
2949
+ const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps, currentRow } = internalData;
2948
2950
  const expandOpts = computeExpandOpts.value;
2949
2951
  const treeOpts = computeTreeOpts.value;
2950
2952
  const radioOpts = computeRadioOpts.value;
@@ -2968,7 +2970,7 @@ export default defineVxeComponent({
2968
2970
  handleCheckedCheckboxRow(handleReserveRow(internalData.checkboxReserveRowMap), true, true);
2969
2971
  }
2970
2972
  if (currentRow && !fullAllDataRowIdData[getRowid($xeTable, currentRow)]) {
2971
- reactData.currentRow = null; // 刷新当前行状态
2973
+ internalData.currentRow = null; // 刷新当前行状态
2972
2974
  }
2973
2975
  // 行展开
2974
2976
  internalData.rowExpandedMaps = expandColumn ? getRecoverRowMaps(rowExpandedMaps) : {}; // 刷新行展开状态
@@ -3282,6 +3284,7 @@ export default defineVxeComponent({
3282
3284
  const handleLazyRecalculate = (reFull, reWidth, reHeight) => {
3283
3285
  return new Promise(resolve => {
3284
3286
  const $xeGanttView = internalData.xeGanttView;
3287
+ const { customStore } = reactData;
3285
3288
  const { rceTimeout, rceRunTime } = internalData;
3286
3289
  const resizeOpts = computeResizeOpts.value;
3287
3290
  const refreshDelay = resizeOpts.refreshDelay || 20;
@@ -3290,6 +3293,9 @@ export default defineVxeComponent({
3290
3293
  autoCellWidth();
3291
3294
  updateRowExpandStyle();
3292
3295
  }
3296
+ if (customStore.visible && $xeTable.handleCustomStyle) {
3297
+ $xeTable.handleCustomStyle();
3298
+ }
3293
3299
  if (rceTimeout) {
3294
3300
  clearTimeout(rceTimeout);
3295
3301
  if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
@@ -6226,7 +6232,7 @@ export default defineVxeComponent({
6226
6232
  const el = refElem.value;
6227
6233
  $xeTable.clearCurrentRow();
6228
6234
  // $xeTable.clearCurrentColumn()
6229
- reactData.currentRow = row;
6235
+ internalData.currentRow = row;
6230
6236
  if (rowOpts.isCurrent || props.highlightCurrentRow) {
6231
6237
  if (el) {
6232
6238
  XEUtils.arrayEach(el.querySelectorAll(`[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--current'));
@@ -6276,7 +6282,7 @@ export default defineVxeComponent({
6276
6282
  clearCurrentRow() {
6277
6283
  const $xeGanttView = internalData.xeGanttView;
6278
6284
  const el = refElem.value;
6279
- reactData.currentRow = null;
6285
+ internalData.currentRow = null;
6280
6286
  internalData.hoverRow = null;
6281
6287
  if (el) {
6282
6288
  XEUtils.arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'));
@@ -6297,8 +6303,7 @@ export default defineVxeComponent({
6297
6303
  * 用于当前行,获取当前行的数据
6298
6304
  */
6299
6305
  getCurrentRecord(isFull) {
6300
- const { currentRow } = reactData;
6301
- const { fullDataRowIdData, afterFullRowMaps } = internalData;
6306
+ const { fullDataRowIdData, afterFullRowMaps, currentRow } = internalData;
6302
6307
  const rowOpts = computeRowOpts.value;
6303
6308
  if (rowOpts.isCurrent || props.highlightCurrentRow) {
6304
6309
  const rowid = getRowid($xeTable, currentRow);
@@ -7280,10 +7285,21 @@ export default defineVxeComponent({
7280
7285
  /**
7281
7286
  * 如果有滚动条,则滚动到对应的行
7282
7287
  */
7283
- scrollToRow(row, fieldOrColumn, options) {
7288
+ scrollToRow(rowOrRowid, fieldOrColumn, options) {
7284
7289
  const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
7285
- const { _sToTime } = internalData;
7290
+ const { fullAllDataRowIdData, _sToTime } = internalData;
7286
7291
  const rest = [];
7292
+ let row;
7293
+ if (XEUtils.isString(rowOrRowid) || XEUtils.isNumber(rowOrRowid)) {
7294
+ const rowid = rowOrRowid;
7295
+ const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
7296
+ if (rowRest) {
7297
+ row = rowRest.row;
7298
+ }
7299
+ }
7300
+ else {
7301
+ row = rowOrRowid;
7302
+ }
7287
7303
  if (row) {
7288
7304
  if (props.treeConfig) {
7289
7305
  rest.push($xeTable.scrollToTreeRow(row));
@@ -7883,6 +7899,23 @@ export default defineVxeComponent({
7883
7899
  $xeTable.closeMenu();
7884
7900
  }
7885
7901
  };
7902
+ const reUpdateCustomStyleEvent = (evnt) => {
7903
+ const { customStore } = reactData;
7904
+ const customOpts = computeCustomOpts.value;
7905
+ const { popupOptions } = customOpts;
7906
+ const { transfer } = popupOptions || {};
7907
+ if (transfer && customStore.visible) {
7908
+ const tableCustom = refTableCustom.value;
7909
+ if (tableCustom && $xeTable.handleCustomStyle && !checkTargetElement(evnt.target, [tableCustom.getRefMaps().refElem.value], evnt.currentTarget)) {
7910
+ $xeTable.handleCustomStyle().then(() => {
7911
+ $xeTable.handleCustomStyle();
7912
+ });
7913
+ }
7914
+ }
7915
+ };
7916
+ const handleGlobalScrollEvent = (evnt) => {
7917
+ reUpdateCustomStyleEvent(evnt);
7918
+ };
7886
7919
  /**
7887
7920
  * 全局滚动事件
7888
7921
  */
@@ -7943,8 +7976,8 @@ export default defineVxeComponent({
7943
7976
  if (internalData.isActivated) {
7944
7977
  $xeTable.preventEvent(evnt, 'event.keydown', null, () => {
7945
7978
  const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props;
7946
- const { ctxMenuStore, editStore, currentRow } = reactData;
7947
- const { afterFullData, visibleColumn } = internalData;
7979
+ const { ctxMenuStore, editStore } = reactData;
7980
+ const { afterFullData, visibleColumn, currentRow } = internalData;
7948
7981
  const isContentMenu = computeIsContentMenu.value;
7949
7982
  const bodyMenu = computeBodyMenu.value;
7950
7983
  const keyboardOpts = computeKeyboardOpts.value;
@@ -10270,7 +10303,7 @@ export default defineVxeComponent({
10270
10303
  }
10271
10304
  },
10272
10305
  triggerCurrentRowEvent(evnt, params) {
10273
- const { currentRow: oldValue } = reactData;
10306
+ const { currentRow: oldValue } = internalData;
10274
10307
  const rowOpts = computeRowOpts.value;
10275
10308
  const currentRowOpts = computeCurrentRowOpts.value;
10276
10309
  const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
@@ -12292,7 +12325,7 @@ export default defineVxeComponent({
12292
12325
  rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
12293
12326
  }
12294
12327
  reactData.scrollYTop = scrollYTop;
12295
- reactData.scrollYHeight = ySpaceHeight;
12328
+ reactData.scrollYHeight = isScrollYBig ? sYHeight : ySpaceHeight;
12296
12329
  reactData.isScrollYBig = isScrollYBig;
12297
12330
  calcScrollbar();
12298
12331
  if (isScrollYBig && mouseOpts.area) {
@@ -12824,7 +12857,7 @@ export default defineVxeComponent({
12824
12857
  const renderVN = () => {
12825
12858
  const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
12826
12859
  const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
12827
- const { teleportToWrapperElem, popupToWrapperElem } = internalData;
12860
+ const { teleportToWrapperElem, popupToWrapperElem, customPopupToElem } = internalData;
12828
12861
  const { leftList, rightList } = columnStore;
12829
12862
  const loadingSlot = slots.loading;
12830
12863
  const tipSlots = {
@@ -12854,8 +12887,6 @@ export default defineVxeComponent({
12854
12887
  const columnDragOpts = computeColumnDragOpts.value;
12855
12888
  const scrollbarXToTop = computeScrollbarXToTop.value;
12856
12889
  const scrollbarYToLeft = computeScrollbarYToLeft.value;
12857
- const customSimpleMode = computeCustomSimpleMode.value;
12858
- const showCustomSimpleOutside = customSimpleMode === 'outside';
12859
12890
  const { isCrossTableDrag } = rowDragOpts;
12860
12891
  const tbOns = {
12861
12892
  onKeydown: keydownEvent,
@@ -12996,16 +13027,6 @@ export default defineVxeComponent({
12996
13027
  })
12997
13028
  ]
12998
13029
  : []),
12999
- /**
13000
- * 自定义列
13001
- */
13002
- !showCustomSimpleOutside && initStore.custom
13003
- ? h(TableCustomPanelComponent, {
13004
- key: 'cs',
13005
- ref: refTableCustom,
13006
- customStore
13007
- })
13008
- : renderEmptyElement($xeTable),
13009
13030
  /**
13010
13031
  * 加载中
13011
13032
  */
@@ -13035,6 +13056,26 @@ export default defineVxeComponent({
13035
13056
  ])
13036
13057
  ])
13037
13058
  ]),
13059
+ h('div', {
13060
+ key: 'fpw',
13061
+ ref: refCustomContainerElem
13062
+ }, [
13063
+ h(Teleport, {
13064
+ to: customPopupToElem,
13065
+ disabled: !!reactData.ctPopupFlag && !customPopupToElem
13066
+ }, [
13067
+ /**
13068
+ * 自定义列
13069
+ */
13070
+ initStore.custom
13071
+ ? h(TableCustomPanelComponent, {
13072
+ key: 'cs',
13073
+ ref: refTableCustom,
13074
+ customStore
13075
+ })
13076
+ : renderEmptyElement($xeTable)
13077
+ ])
13078
+ ]),
13038
13079
  h('div', {
13039
13080
  key: 'tpw'
13040
13081
  }, [
@@ -13045,16 +13086,6 @@ export default defineVxeComponent({
13045
13086
  h('div', {
13046
13087
  ref: refPopupWrapperElem
13047
13088
  }, [
13048
- /**
13049
- * 自定义列
13050
- */
13051
- showCustomSimpleOutside && initStore.custom
13052
- ? h(TableCustomPanelComponent, {
13053
- key: 'cs',
13054
- ref: refTableCustom,
13055
- customStore
13056
- })
13057
- : renderEmptyElement($xeTable),
13058
13089
  /**
13059
13090
  * 筛选
13060
13091
  */
@@ -13127,7 +13158,10 @@ export default defineVxeComponent({
13127
13158
  minWidth: tableTipConfig.minWidth,
13128
13159
  minHeight: tableTipConfig.minHeight,
13129
13160
  maxWidth: tableTipConfig.maxWidth,
13130
- maxHeight: tableTipConfig.maxHeight
13161
+ maxHeight: tableTipConfig.maxHeight,
13162
+ placement: tableTipConfig.placement,
13163
+ defaultPlacement: tableTipConfig.defaultPlacement,
13164
+ popupClassName: tableTipConfig.popupClassName
13131
13165
  }, currTooltipSlot
13132
13166
  ? {
13133
13167
  content: () => {
@@ -13695,6 +13729,7 @@ export default defineVxeComponent({
13695
13729
  globalEvents.on($xeTable, 'mousewheel', handleGlobalMousewheelEvent);
13696
13730
  globalEvents.on($xeTable, 'keydown', handleGlobalKeydownEvent);
13697
13731
  globalEvents.on($xeTable, 'resize', handleGlobalResizeEvent);
13732
+ globalEvents.on($xeTable, 'scroll', handleGlobalScrollEvent);
13698
13733
  globalEvents.on($xeTable, 'contextmenu', $xeTable.handleGlobalContextmenuEvent);
13699
13734
  $xeTable.preventEvent(null, 'mounted', { $table: $xeTable });
13700
13735
  });
@@ -13726,6 +13761,7 @@ export default defineVxeComponent({
13726
13761
  globalEvents.off($xeTable, 'mousewheel');
13727
13762
  globalEvents.off($xeTable, 'keydown');
13728
13763
  globalEvents.off($xeTable, 'resize');
13764
+ globalEvents.off($xeTable, 'scroll');
13729
13765
  globalEvents.off($xeTable, 'contextmenu');
13730
13766
  $xeTable.preventEvent(null, 'beforeUnmount', { $table: $xeTable });
13731
13767
  XEUtils.assign(reactData, createReactData());
@@ -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,7 +132,9 @@ export function createInternalData() {
130
132
  tFooterHeight: 0,
131
133
  teleportToWrapperElem: null,
132
134
  popupToWrapperElem: null,
135
+ customPopupToElem: null,
133
136
  lastSTime: 0,
137
+ // isCustomDragStatus: false,
134
138
  inited: false,
135
139
  tooltipTimeout: null,
136
140
  initStatus: false,
@@ -172,8 +176,6 @@ export function createReactData() {
172
176
  isAllSelected: false,
173
177
  // 复选框属性,有选中且非全选状态
174
178
  isIndeterminate: false,
175
- // 当前行
176
- currentRow: null,
177
179
  // 单选框属性,选中列
178
180
  currentColumn: null,
179
181
  // 单选框属性,选中行
@@ -209,7 +211,7 @@ export function createReactData() {
209
211
  activeWrapper: false,
210
212
  visible: false,
211
213
  maxHeight: null,
212
- popupTop: 0,
214
+ popupStyle: {},
213
215
  oldSortMaps: {},
214
216
  oldFixedMaps: {},
215
217
  oldVisibleMaps: {}
@@ -370,6 +372,8 @@ export function createReactData() {
370
372
  resizeHeightFlag: 1,
371
373
  resizeWidthFlag: 1,
372
374
  isCustomStatus: false,
375
+ isCustomDragStatus: true,
376
+ ctPopupFlag: 1,
373
377
  isCrossDragRow: false,
374
378
  dragRow: null,
375
379
  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;