pro-design-vue 1.4.0 → 1.4.1

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 (101) hide show
  1. package/dist/index.full.js +420 -296
  2. package/dist/index.full.min.js +7 -7
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +7 -7
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +420 -296
  7. package/es/components/table/src/components/Body/Body.vue.d.ts +12 -6
  8. package/es/components/table/src/components/Body/BodyCell.vue.d.ts +10 -6
  9. package/es/components/table/src/components/Body/BodyRow.vue.d.ts +12 -6
  10. package/es/components/table/src/components/Body/BodyRows.vue.d.ts +12 -6
  11. package/es/components/table/src/components/Body/BodyTextCell.d.ts +2 -0
  12. package/es/components/table/src/components/InteralTable.vue.d.ts +15 -6
  13. package/es/components/table/src/components/Table.d.ts +3 -0
  14. package/es/components/table/src/components/interface.d.ts +4 -1
  15. package/es/components/table/src/hooks/usePerf.d.ts +35 -0
  16. package/es/index.d.ts +5 -1
  17. package/es/packages/components/table/src/components/Body/Body.vue.mjs.map +1 -1
  18. package/es/packages/components/table/src/components/Body/Body.vue2.mjs +2 -17
  19. package/es/packages/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
  20. package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs +5 -20
  21. package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs.map +1 -1
  22. package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs +2 -2
  23. package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs.map +1 -1
  24. package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs +2 -3
  25. package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs.map +1 -1
  26. package/es/packages/components/table/src/components/Body/BodyTextCell.mjs +23 -56
  27. package/es/packages/components/table/src/components/Body/BodyTextCell.mjs.map +1 -1
  28. package/es/packages/components/table/src/components/Form/Form.mjs +9 -9
  29. package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
  30. package/es/packages/components/table/src/components/InteralTable.vue.mjs.map +1 -1
  31. package/es/packages/components/table/src/components/InteralTable.vue2.mjs +5 -1
  32. package/es/packages/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
  33. package/es/packages/components/table/src/components/Table.mjs +2 -2
  34. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  35. package/es/packages/components/table/src/components/interface.mjs +1 -0
  36. package/es/packages/components/table/src/components/interface.mjs.map +1 -1
  37. package/es/packages/components/table/src/hooks/useCal.mjs +6 -0
  38. package/es/packages/components/table/src/hooks/useCal.mjs.map +1 -1
  39. package/es/packages/components/table/src/hooks/useCellProps.mjs +76 -10
  40. package/es/packages/components/table/src/hooks/useCellProps.mjs.map +1 -1
  41. package/es/packages/components/table/src/hooks/useColumns.mjs +167 -180
  42. package/es/packages/components/table/src/hooks/useColumns.mjs.map +1 -1
  43. package/es/packages/components/table/src/hooks/useData.mjs +4 -0
  44. package/es/packages/components/table/src/hooks/useData.mjs.map +1 -1
  45. package/es/packages/components/table/src/hooks/useHScrollSync.mjs +4 -0
  46. package/es/packages/components/table/src/hooks/useHScrollSync.mjs.map +1 -1
  47. package/es/packages/components/table/src/hooks/usePerf.mjs +119 -0
  48. package/es/packages/components/table/src/hooks/usePerf.mjs.map +1 -0
  49. package/es/packages/components/table/src/hooks/useVScrollSync.mjs +4 -0
  50. package/es/packages/components/table/src/hooks/useVScrollSync.mjs.map +1 -1
  51. package/es/version.d.ts +1 -1
  52. package/es/version.mjs +1 -1
  53. package/es/version.mjs.map +1 -1
  54. package/lib/components/table/src/components/Body/Body.vue.d.ts +12 -6
  55. package/lib/components/table/src/components/Body/BodyCell.vue.d.ts +10 -6
  56. package/lib/components/table/src/components/Body/BodyRow.vue.d.ts +12 -6
  57. package/lib/components/table/src/components/Body/BodyRows.vue.d.ts +12 -6
  58. package/lib/components/table/src/components/Body/BodyTextCell.d.ts +2 -0
  59. package/lib/components/table/src/components/InteralTable.vue.d.ts +15 -6
  60. package/lib/components/table/src/components/Table.d.ts +3 -0
  61. package/lib/components/table/src/components/interface.d.ts +4 -1
  62. package/lib/components/table/src/hooks/usePerf.d.ts +35 -0
  63. package/lib/index.d.ts +5 -1
  64. package/lib/packages/components/table/src/components/Body/Body.vue.js.map +1 -1
  65. package/lib/packages/components/table/src/components/Body/Body.vue2.js +2 -17
  66. package/lib/packages/components/table/src/components/Body/Body.vue2.js.map +1 -1
  67. package/lib/packages/components/table/src/components/Body/BodyCell.vue.js +4 -19
  68. package/lib/packages/components/table/src/components/Body/BodyCell.vue.js.map +1 -1
  69. package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js +2 -2
  70. package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js.map +1 -1
  71. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js +2 -3
  72. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js.map +1 -1
  73. package/lib/packages/components/table/src/components/Body/BodyTextCell.js +22 -55
  74. package/lib/packages/components/table/src/components/Body/BodyTextCell.js.map +1 -1
  75. package/lib/packages/components/table/src/components/Form/Form.js +9 -9
  76. package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
  77. package/lib/packages/components/table/src/components/InteralTable.vue.js.map +1 -1
  78. package/lib/packages/components/table/src/components/InteralTable.vue2.js +4 -0
  79. package/lib/packages/components/table/src/components/InteralTable.vue2.js.map +1 -1
  80. package/lib/packages/components/table/src/components/Table.js +2 -2
  81. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  82. package/lib/packages/components/table/src/components/interface.js +1 -0
  83. package/lib/packages/components/table/src/components/interface.js.map +1 -1
  84. package/lib/packages/components/table/src/hooks/useCal.js +6 -0
  85. package/lib/packages/components/table/src/hooks/useCal.js.map +1 -1
  86. package/lib/packages/components/table/src/hooks/useCellProps.js +76 -10
  87. package/lib/packages/components/table/src/hooks/useCellProps.js.map +1 -1
  88. package/lib/packages/components/table/src/hooks/useColumns.js +166 -179
  89. package/lib/packages/components/table/src/hooks/useColumns.js.map +1 -1
  90. package/lib/packages/components/table/src/hooks/useData.js +4 -0
  91. package/lib/packages/components/table/src/hooks/useData.js.map +1 -1
  92. package/lib/packages/components/table/src/hooks/useHScrollSync.js +4 -0
  93. package/lib/packages/components/table/src/hooks/useHScrollSync.js.map +1 -1
  94. package/lib/packages/components/table/src/hooks/usePerf.js +123 -0
  95. package/lib/packages/components/table/src/hooks/usePerf.js.map +1 -0
  96. package/lib/packages/components/table/src/hooks/useVScrollSync.js +4 -0
  97. package/lib/packages/components/table/src/hooks/useVScrollSync.js.map +1 -1
  98. package/lib/version.d.ts +1 -1
  99. package/lib/version.js +1 -1
  100. package/lib/version.js.map +1 -1
  101. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.4.0 */
1
+ /*! Pro Design Vue v1.4.1 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.4.0";
35
+ const version$1 = "1.4.1";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -3551,7 +3551,7 @@
3551
3551
  };
3552
3552
  }
3553
3553
 
3554
- function NOOP() {
3554
+ function NOOP$1() {
3555
3555
  }
3556
3556
 
3557
3557
  const withInstall = (main, extra) => {
@@ -3568,7 +3568,7 @@
3568
3568
  return main;
3569
3569
  };
3570
3570
  const withNoopInstall = (component) => {
3571
- component.install = NOOP;
3571
+ component.install = NOOP$1;
3572
3572
  return component;
3573
3573
  };
3574
3574
 
@@ -24182,6 +24182,7 @@
24182
24182
  showHeaderScrollbar: Boolean,
24183
24183
  deepWatchDataSource: Boolean,
24184
24184
  deepWatchColumns: Boolean,
24185
+ perf: Boolean,
24185
24186
  prefixCls: String,
24186
24187
  columnDrag: {
24187
24188
  type: Boolean,
@@ -25690,6 +25691,121 @@
25690
25691
  frame && cancelRequestAnimationFrame(frame.id);
25691
25692
  };
25692
25693
 
25694
+ const PERF_KEY = Symbol("TablePerf");
25695
+ const MAX_ENTRIES = 200;
25696
+ const NOOP = () => {
25697
+ };
25698
+ const NOOP_CTX = {
25699
+ enabled: vue.shallowRef(false),
25700
+ metrics: vue.shallowRef({ entries: [], memory: null, scrollEventsPerSec: 0, fps: 0 }),
25701
+ markStart: NOOP,
25702
+ markEnd: NOOP,
25703
+ captureMemory: NOOP,
25704
+ recordScrollEvent: NOOP
25705
+ };
25706
+ let _activeCtx = NOOP_CTX;
25707
+ function createPerfContext(enabled) {
25708
+ const metrics = vue.shallowRef({
25709
+ entries: [],
25710
+ memory: null,
25711
+ scrollEventsPerSec: 0,
25712
+ fps: 0
25713
+ });
25714
+ let scrollCount = 0;
25715
+ let frameCount = 0;
25716
+ let lastFpsTime = 0;
25717
+ const pendingMarks = /* @__PURE__ */ new Map();
25718
+ const fpsLoop = (now) => {
25719
+ frameCount++;
25720
+ if (now - lastFpsTime >= 1e3) {
25721
+ const current = metrics.value;
25722
+ metrics.value = {
25723
+ ...current,
25724
+ fps: frameCount,
25725
+ scrollEventsPerSec: scrollCount
25726
+ };
25727
+ frameCount = 0;
25728
+ scrollCount = 0;
25729
+ lastFpsTime = now;
25730
+ }
25731
+ if (enabled.value) {
25732
+ requestAnimationFrame(fpsLoop);
25733
+ }
25734
+ };
25735
+ const start = () => {
25736
+ lastFpsTime = performance.now();
25737
+ frameCount = 0;
25738
+ scrollCount = 0;
25739
+ requestAnimationFrame(fpsLoop);
25740
+ };
25741
+ const markStart = (label) => {
25742
+ if (!enabled.value) return;
25743
+ pendingMarks.set(label, performance.now());
25744
+ };
25745
+ const markEnd = (label) => {
25746
+ if (!enabled.value) return;
25747
+ const startTime = pendingMarks.get(label);
25748
+ if (startTime === void 0) return;
25749
+ pendingMarks.delete(label);
25750
+ const duration = performance.now() - startTime;
25751
+ const current = metrics.value;
25752
+ const entries = current.entries.length >= MAX_ENTRIES ? current.entries.slice(-MAX_ENTRIES + 1) : [...current.entries];
25753
+ entries.push({ label, duration, timestamp: Date.now() });
25754
+ metrics.value = { ...current, entries };
25755
+ };
25756
+ const captureMemory = (rows, cells) => {
25757
+ var _a, _b, _c;
25758
+ if (!enabled.value) return;
25759
+ const mem = performance.memory;
25760
+ const current = metrics.value;
25761
+ metrics.value = {
25762
+ ...current,
25763
+ memory: {
25764
+ usedJSHeapSize: (_a = mem == null ? void 0 : mem.usedJSHeapSize) != null ? _a : 0,
25765
+ totalJSHeapSize: (_b = mem == null ? void 0 : mem.totalJSHeapSize) != null ? _b : 0,
25766
+ jsHeapSizeLimit: (_c = mem == null ? void 0 : mem.jsHeapSizeLimit) != null ? _c : 0,
25767
+ renderedRows: rows,
25768
+ renderedCells: cells,
25769
+ timestamp: Date.now()
25770
+ }
25771
+ };
25772
+ };
25773
+ const recordScrollEvent = () => {
25774
+ if (!enabled.value) return;
25775
+ scrollCount++;
25776
+ };
25777
+ if (enabled.value) start();
25778
+ const ctx = {
25779
+ enabled,
25780
+ metrics,
25781
+ markStart,
25782
+ markEnd,
25783
+ captureMemory,
25784
+ recordScrollEvent
25785
+ };
25786
+ _activeCtx = ctx;
25787
+ return ctx;
25788
+ }
25789
+ function providePerfContext(ctx) {
25790
+ vue.provide(PERF_KEY, ctx);
25791
+ }
25792
+ function usePerf() {
25793
+ const injected = vue.inject(PERF_KEY, null);
25794
+ if (injected) return injected;
25795
+ return {
25796
+ get enabled() {
25797
+ return _activeCtx.enabled;
25798
+ },
25799
+ get metrics() {
25800
+ return _activeCtx.metrics;
25801
+ },
25802
+ markStart: (l) => _activeCtx.markStart(l),
25803
+ markEnd: (l) => _activeCtx.markEnd(l),
25804
+ captureMemory: (r, c) => _activeCtx.captureMemory(r, c),
25805
+ recordScrollEvent: () => _activeCtx.recordScrollEvent()
25806
+ };
25807
+ }
25808
+
25693
25809
  const HScrollSymbolKey = Symbol("HScrollSymbolKey");
25694
25810
  const useHScrollSyncProvide = ({
25695
25811
  scrollLeft,
@@ -25697,6 +25813,7 @@
25697
25813
  onScroll,
25698
25814
  bodyWidth
25699
25815
  }) => {
25816
+ const perf = usePerf();
25700
25817
  const domsSet = /* @__PURE__ */ new Set();
25701
25818
  const setAllDoms = (scrollLeft2) => {
25702
25819
  const left = Math.max(0, Math.min(scrollLeft2, maxScrollLeft.value));
@@ -25709,6 +25826,7 @@
25709
25826
  var _a;
25710
25827
  const left = (_a = e.target) == null ? void 0 : _a.scrollLeft;
25711
25828
  if (left !== scrollLeft.value) {
25829
+ perf.recordScrollEvent();
25712
25830
  setAllDoms(left);
25713
25831
  scrollLeft.value = left;
25714
25832
  onScroll(e);
@@ -25719,6 +25837,7 @@
25719
25837
  const left = (_a = e.target) == null ? void 0 : _a.scrollLeft;
25720
25838
  if (left !== scrollLeft.value) {
25721
25839
  raf.cancel(rafFrame);
25840
+ perf.recordScrollEvent();
25722
25841
  rafFrame = raf(() => {
25723
25842
  scrollLeft.value = left;
25724
25843
  onScroll(e);
@@ -25774,6 +25893,7 @@
25774
25893
  updateAnimate,
25775
25894
  bodyWidth
25776
25895
  }) => {
25896
+ const perf = usePerf();
25777
25897
  const domsSet = /* @__PURE__ */ new Set();
25778
25898
  const setAllDoms = (scrollTop2) => {
25779
25899
  const top = Math.max(0, Math.min(scrollTop2, maxScrollTop.value));
@@ -25786,6 +25906,7 @@
25786
25906
  var _a;
25787
25907
  const top = (_a = e.target) == null ? void 0 : _a.scrollTop;
25788
25908
  if (top !== scrollTop.value) {
25909
+ perf.recordScrollEvent();
25789
25910
  updateAnimate();
25790
25911
  setAllDoms(top);
25791
25912
  scrollTop.value = top;
@@ -25809,6 +25930,7 @@
25809
25930
  const top = (_a = e.target) == null ? void 0 : _a.scrollTop;
25810
25931
  if (top !== scrollTop.value) {
25811
25932
  raf.cancel(rafFrame);
25933
+ perf.recordScrollEvent();
25812
25934
  updateAnimate();
25813
25935
  rafFrame = raf(() => {
25814
25936
  scrollTop.value = top;
@@ -27064,201 +27186,189 @@
27064
27186
  }
27065
27187
  mergeColumns.value = newColumns;
27066
27188
  });
27067
- let columnsRafFrame;
27068
- let isFirstRun = true;
27069
- const recalcColumns = () => {
27070
- var _a, _b, _c, _d;
27071
- const originMergeColumns = mergeColumns.value;
27072
- let newMaxRowSpan = 1;
27073
- const newLeftColumns = [];
27074
- const newRightColumns = [];
27075
- const newCenterColumns = [];
27076
- const newAutoHeightColumns = [];
27077
- const newLeftHeaderColumns = [];
27078
- const newRightHeaderColumns = [];
27079
- const newCenterHeaderColumns = [];
27080
- keyColumnMap.value = /* @__PURE__ */ new Map();
27081
- if (!measureWidthRef.value) {
27082
- return;
27083
- }
27084
- const autoWidthColumns = [];
27085
- let finallyWidthTotal = 0;
27086
- const genColumns = (allCols, leftHeaderCols, centerHeaderCols, rightHeaderCols, rowSpan, pos, fix) => {
27087
- for (let i = 0, len = allCols.length; i < len; i++) {
27088
- const originColumn = allCols[i];
27089
- if (!originColumn) {
27090
- continue;
27091
- }
27092
- const {
27093
- width,
27094
- fixed = fix,
27095
- children,
27096
- ellipsis = false,
27097
- tooltip,
27098
- minWidth,
27099
- maxWidth
27100
- } = originColumn;
27101
- const columnWidth = columnWidthByString(measureWidthRef.value, bodyScrollWidth.value, width);
27102
- const columnMinWidth = columnWidthByString(
27103
- measureWidthRef.value,
27104
- bodyScrollWidth.value,
27105
- minWidth
27106
- );
27107
- const columnMaxWidth = maxWidth ? columnWidthByString(measureWidthRef.value, bodyScrollWidth.value, maxWidth) : 1 / 0;
27108
- const finallyWidth = Math.min(Math.max(columnWidth, columnMinWidth), columnMaxWidth);
27109
- const columnPos = getColumnPos(i, pos);
27110
- const columnKey = originColumn.columnKey || originColumn.key || columnPos;
27111
- const parseFiexed = fixed === true ? "left" : fixed;
27112
- const finallyColumn = Object.assign({}, originColumn, {
27113
- finallyWidth,
27114
- columnKey,
27115
- originColumn,
27116
- showTitle: !tooltip && (ellipsis === true || typeof ellipsis === "object" && (ellipsis == null ? void 0 : ellipsis.showTitle) !== false),
27117
- fixed: parseFiexed,
27118
- hidden: true === originColumn.hidden
27119
- });
27120
- keyColumnMap.value.set(columnKey, finallyColumn);
27121
- if (finallyColumn.hidden) {
27122
- break;
27123
- }
27124
- if (children && children.length) {
27125
- finallyColumn.children = [];
27126
- if (parseFiexed === "left") {
27127
- leftHeaderCols.push(finallyColumn);
27128
- } else if (parseFiexed === "right") {
27129
- rightHeaderCols.push(finallyColumn);
27130
- } else {
27131
- centerHeaderCols.push(finallyColumn);
27189
+ vue.watch(
27190
+ [mergeColumns, baseHeight, bodyScrollWidth, measureWidthRef],
27191
+ () => {
27192
+ var _a, _b, _c, _d;
27193
+ const originMergeColumns = mergeColumns.value;
27194
+ let newMaxRowSpan = 1;
27195
+ const newLeftColumns = [];
27196
+ const newRightColumns = [];
27197
+ const newCenterColumns = [];
27198
+ const newAutoHeightColumns = [];
27199
+ const newLeftHeaderColumns = [];
27200
+ const newRightHeaderColumns = [];
27201
+ const newCenterHeaderColumns = [];
27202
+ keyColumnMap.value = /* @__PURE__ */ new Map();
27203
+ if (!measureWidthRef.value) {
27204
+ return;
27205
+ }
27206
+ const autoWidthColumns = [];
27207
+ let finallyWidthTotal = 0;
27208
+ const genColumns = (allCols, leftHeaderCols, centerHeaderCols, rightHeaderCols, rowSpan, pos, fix) => {
27209
+ for (let i = 0, len = allCols.length; i < len; i++) {
27210
+ const originColumn = allCols[i];
27211
+ if (!originColumn) {
27212
+ continue;
27132
27213
  }
27133
- newMaxRowSpan = Math.max(newMaxRowSpan, rowSpan + 1);
27134
- genColumns(
27214
+ const {
27215
+ width,
27216
+ fixed = fix,
27135
27217
  children,
27136
- finallyColumn.children,
27137
- finallyColumn.children,
27138
- finallyColumn.children,
27139
- rowSpan + 1,
27140
- columnPos,
27141
- parseFiexed
27218
+ ellipsis = false,
27219
+ tooltip,
27220
+ minWidth,
27221
+ maxWidth
27222
+ } = originColumn;
27223
+ const columnWidth = columnWidthByString(
27224
+ measureWidthRef.value,
27225
+ bodyScrollWidth.value,
27226
+ width
27142
27227
  );
27143
- } else {
27144
- if (finallyColumn.width === void 0) {
27145
- autoWidthColumns.push(finallyColumn);
27228
+ const columnMinWidth = columnWidthByString(
27229
+ measureWidthRef.value,
27230
+ bodyScrollWidth.value,
27231
+ minWidth
27232
+ );
27233
+ const columnMaxWidth = maxWidth ? columnWidthByString(measureWidthRef.value, bodyScrollWidth.value, maxWidth) : 1 / 0;
27234
+ const finallyWidth = Math.min(Math.max(columnWidth, columnMinWidth), columnMaxWidth);
27235
+ const columnPos = getColumnPos(i, pos);
27236
+ const columnKey = originColumn.columnKey || originColumn.key || columnPos;
27237
+ const parseFiexed = fixed === true ? "left" : fixed;
27238
+ const finallyColumn = Object.assign({}, originColumn, {
27239
+ finallyWidth,
27240
+ columnKey,
27241
+ originColumn,
27242
+ showTitle: !tooltip && (ellipsis === true || typeof ellipsis === "object" && (ellipsis == null ? void 0 : ellipsis.showTitle) !== false),
27243
+ fixed: parseFiexed,
27244
+ hidden: true === originColumn.hidden
27245
+ });
27246
+ keyColumnMap.value.set(columnKey, finallyColumn);
27247
+ if (finallyColumn.hidden) {
27248
+ break;
27146
27249
  }
27147
- finallyWidthTotal += finallyColumn.finallyWidth;
27148
- if (parseFiexed === "left") {
27149
- newLeftColumns.push(finallyColumn);
27150
- leftHeaderCols.push(finallyColumn);
27151
- } else if (parseFiexed === "right") {
27152
- newRightColumns.push(finallyColumn);
27153
- rightHeaderCols.push(finallyColumn);
27250
+ if (children && children.length) {
27251
+ finallyColumn.children = [];
27252
+ if (parseFiexed === "left") {
27253
+ leftHeaderCols.push(finallyColumn);
27254
+ } else if (parseFiexed === "right") {
27255
+ rightHeaderCols.push(finallyColumn);
27256
+ } else {
27257
+ centerHeaderCols.push(finallyColumn);
27258
+ }
27259
+ newMaxRowSpan = Math.max(newMaxRowSpan, rowSpan + 1);
27260
+ genColumns(
27261
+ children,
27262
+ finallyColumn.children,
27263
+ finallyColumn.children,
27264
+ finallyColumn.children,
27265
+ rowSpan + 1,
27266
+ columnPos,
27267
+ parseFiexed
27268
+ );
27154
27269
  } else {
27155
- newCenterColumns.push(finallyColumn);
27156
- if (finallyColumn.autoHeight) {
27157
- newAutoHeightColumns.push(finallyColumn);
27270
+ if (finallyColumn.width === void 0) {
27271
+ autoWidthColumns.push(finallyColumn);
27272
+ }
27273
+ finallyWidthTotal += finallyColumn.finallyWidth;
27274
+ if (parseFiexed === "left") {
27275
+ newLeftColumns.push(finallyColumn);
27276
+ leftHeaderCols.push(finallyColumn);
27277
+ } else if (parseFiexed === "right") {
27278
+ newRightColumns.push(finallyColumn);
27279
+ rightHeaderCols.push(finallyColumn);
27280
+ } else {
27281
+ newCenterColumns.push(finallyColumn);
27282
+ if (finallyColumn.autoHeight) {
27283
+ newAutoHeightColumns.push(finallyColumn);
27284
+ }
27285
+ centerHeaderCols.push(finallyColumn);
27158
27286
  }
27159
- centerHeaderCols.push(finallyColumn);
27160
27287
  }
27161
27288
  }
27162
- }
27163
- };
27164
- genColumns(
27165
- originMergeColumns,
27166
- newLeftHeaderColumns,
27167
- newCenterHeaderColumns,
27168
- newRightHeaderColumns,
27169
- 1,
27170
- "__S_TABLE_COLUMN_Key__"
27171
- );
27172
- let differenceWidth = bodyScrollWidth.value - finallyWidthTotal;
27173
- const nonResizableColumns = autoWidthColumns.length ? autoWidthColumns : newLeftColumns.concat(newCenterColumns, newRightColumns).filter((column) => !column.resizable || !column.__Internal__Column__);
27174
- const widthDiffAverage = Math.floor(differenceWidth / nonResizableColumns.length);
27175
- if (differenceWidth > 0) {
27176
- for (let i = 0, len = nonResizableColumns.length; i < len; i++) {
27177
- const column = nonResizableColumns[i];
27178
- let finallyWidth = 0;
27179
- if (i == len - 1 && differenceWidth > widthDiffAverage) {
27180
- finallyWidth = column.finallyWidth + differenceWidth;
27181
- } else {
27182
- finallyWidth = Math.max(
27183
- Math.min(column.finallyWidth + widthDiffAverage, (_a = column.maxWidth) != null ? _a : 1 / 0),
27184
- (_b = column.minWidth) != null ? _b : 50
27185
- );
27289
+ };
27290
+ genColumns(
27291
+ originMergeColumns,
27292
+ newLeftHeaderColumns,
27293
+ newCenterHeaderColumns,
27294
+ newRightHeaderColumns,
27295
+ 1,
27296
+ "__S_TABLE_COLUMN_Key__"
27297
+ );
27298
+ let differenceWidth = bodyScrollWidth.value - finallyWidthTotal;
27299
+ const nonResizableColumns = autoWidthColumns.length ? autoWidthColumns : newLeftColumns.concat(newCenterColumns, newRightColumns).filter((column) => !column.resizable || !column.__Internal__Column__);
27300
+ const widthDiffAverage = Math.floor(differenceWidth / nonResizableColumns.length);
27301
+ if (differenceWidth > 0) {
27302
+ for (let i = 0, len = nonResizableColumns.length; i < len; i++) {
27303
+ const column = nonResizableColumns[i];
27304
+ let finallyWidth = 0;
27305
+ if (i == len - 1 && differenceWidth > widthDiffAverage) {
27306
+ finallyWidth = column.finallyWidth + differenceWidth;
27307
+ } else {
27308
+ finallyWidth = Math.max(
27309
+ Math.min(column.finallyWidth + widthDiffAverage, (_a = column.maxWidth) != null ? _a : 1 / 0),
27310
+ (_b = column.minWidth) != null ? _b : 50
27311
+ );
27312
+ }
27313
+ differenceWidth -= finallyWidth - column.finallyWidth;
27314
+ column.finallyWidth = finallyWidth;
27186
27315
  }
27187
- differenceWidth -= finallyWidth - column.finallyWidth;
27188
- column.finallyWidth = finallyWidth;
27189
- }
27190
- } else {
27191
- for (let i = 0, len = autoWidthColumns.length; i < len; i++) {
27192
- const column = autoWidthColumns[i];
27193
- column.finallyWidth = Math.min((_c = column.minWidth) != null ? _c : 50, (_d = column.maxWidth) != null ? _d : 1 / 0);
27194
- }
27195
- }
27196
- if (props.headerHeight !== void 0) {
27197
- if (Array.isArray(props.headerHeight)) {
27198
- headerHeight.value = props.headerHeight.concat(new Array(newMaxRowSpan).fill(baseHeight.value)).slice(0, newMaxRowSpan);
27199
27316
  } else {
27200
- headerHeight.value = new Array(newMaxRowSpan).fill(props.headerHeight);
27317
+ for (let i = 0, len = autoWidthColumns.length; i < len; i++) {
27318
+ const column = autoWidthColumns[i];
27319
+ column.finallyWidth = Math.min((_c = column.minWidth) != null ? _c : 50, (_d = column.maxWidth) != null ? _d : 1 / 0);
27320
+ }
27201
27321
  }
27202
- } else {
27203
- headerHeight.value = new Array(newMaxRowSpan).fill(baseHeight.value);
27204
- }
27205
- const genHeaderColumns = (headerColumns, left, top, rowSpan) => {
27206
- let totalFinallyWidth = 0;
27207
- let totalLeft = left;
27208
- headerColumns.forEach((column) => {
27209
- column.left = totalLeft;
27210
- column.top = top;
27211
- if (column.children) {
27212
- column.rowSpan = 1;
27213
- column.height = headerHeight.value[newMaxRowSpan - rowSpan];
27214
- column.finallyWidth = genHeaderColumns(
27215
- column.children,
27216
- totalLeft,
27217
- column.height,
27218
- rowSpan - 1
27219
- );
27322
+ if (props.headerHeight !== void 0) {
27323
+ if (Array.isArray(props.headerHeight)) {
27324
+ headerHeight.value = props.headerHeight.concat(new Array(newMaxRowSpan).fill(baseHeight.value)).slice(0, newMaxRowSpan);
27220
27325
  } else {
27221
- column.rowSpan = rowSpan;
27222
- column.height = headerHeight.value.slice(newMaxRowSpan - rowSpan).reduce((pre, cur) => pre + cur, 0);
27326
+ headerHeight.value = new Array(newMaxRowSpan).fill(props.headerHeight);
27223
27327
  }
27224
- totalLeft += column.finallyWidth;
27225
- totalFinallyWidth += column.finallyWidth;
27226
- });
27227
- return totalFinallyWidth;
27228
- };
27229
- genHeaderColumns(
27230
- newLeftHeaderColumns.concat(newCenterHeaderColumns, newRightHeaderColumns),
27231
- 0,
27232
- 0,
27233
- newMaxRowSpan
27234
- );
27235
- leftColumns.value = newLeftColumns;
27236
- rightColumns.value = newRightColumns;
27237
- centerColumns.value = newCenterColumns;
27238
- autoHeightColumns.value = newAutoHeightColumns;
27239
- leftHeaderColumns.value = newLeftHeaderColumns;
27240
- rightHeaderColumns.value = newRightHeaderColumns;
27241
- centerHeaderColumns.value = newCenterHeaderColumns;
27242
- maxRowSpan.value = newMaxRowSpan;
27243
- };
27244
- vue.watch(
27245
- [mergeColumns, baseHeight, bodyScrollWidth, measureWidthRef],
27246
- () => {
27247
- if (isFirstRun) {
27248
- isFirstRun = false;
27249
- recalcColumns();
27250
- return;
27251
- }
27252
- raf.cancel(columnsRafFrame);
27253
- columnsRafFrame = raf(() => {
27254
- recalcColumns();
27255
- });
27328
+ } else {
27329
+ headerHeight.value = new Array(newMaxRowSpan).fill(baseHeight.value);
27330
+ }
27331
+ const genHeaderColumns = (headerColumns, left, top, rowSpan) => {
27332
+ let totalFinallyWidth = 0;
27333
+ let totalLeft = left;
27334
+ headerColumns.forEach((column) => {
27335
+ column.left = totalLeft;
27336
+ column.top = top;
27337
+ if (column.children) {
27338
+ column.rowSpan = 1;
27339
+ column.height = headerHeight.value[newMaxRowSpan - rowSpan];
27340
+ column.finallyWidth = genHeaderColumns(
27341
+ column.children,
27342
+ totalLeft,
27343
+ column.height,
27344
+ rowSpan - 1
27345
+ );
27346
+ } else {
27347
+ column.rowSpan = rowSpan;
27348
+ column.height = headerHeight.value.slice(newMaxRowSpan - rowSpan).reduce((pre, cur) => pre + cur, 0);
27349
+ }
27350
+ totalLeft += column.finallyWidth;
27351
+ totalFinallyWidth += column.finallyWidth;
27352
+ });
27353
+ return totalFinallyWidth;
27354
+ };
27355
+ genHeaderColumns(
27356
+ newLeftHeaderColumns.concat(newCenterHeaderColumns, newRightHeaderColumns),
27357
+ 0,
27358
+ 0,
27359
+ newMaxRowSpan
27360
+ );
27361
+ leftColumns.value = newLeftColumns;
27362
+ rightColumns.value = newRightColumns;
27363
+ centerColumns.value = newCenterColumns;
27364
+ autoHeightColumns.value = newAutoHeightColumns;
27365
+ leftHeaderColumns.value = newLeftHeaderColumns;
27366
+ rightHeaderColumns.value = newRightHeaderColumns;
27367
+ centerHeaderColumns.value = newCenterHeaderColumns;
27368
+ maxRowSpan.value = newMaxRowSpan;
27256
27369
  },
27257
27370
  { immediate: true }
27258
27371
  );
27259
- vue.onBeforeUnmount(() => {
27260
- raf.cancel(columnsRafFrame);
27261
- });
27262
27372
  const allColumns = vue.shallowRef([]);
27263
27373
  let cacheColumnKeyPositonMap = {};
27264
27374
  const columnKeyIndexMap = vue.shallowRef({});
@@ -27773,6 +27883,7 @@
27773
27883
  }
27774
27884
 
27775
27885
  function useCal(props, flattenData, scrollHeight, scrollTop, virtual, keyEntities) {
27886
+ const perf = usePerf();
27776
27887
  const rowPosition = vue.shallowRef([]);
27777
27888
  const rowHeights = vue.shallowRef({});
27778
27889
  const mergedRowHeights = vue.shallowRef({});
@@ -27877,6 +27988,7 @@
27877
27988
  raf.cancel(refreshRaf);
27878
27989
  refreshRaf = raf(
27879
27990
  () => {
27991
+ perf.markStart("rowPositionRecalc");
27880
27992
  const defaultHeight = currentSizeHeight.value;
27881
27993
  const crhs = currentRowHeights.value;
27882
27994
  const rhs = rowHeights.value;
@@ -27896,6 +28008,7 @@
27896
28008
  mergedRowHeights.value = newMergedRowHeights;
27897
28009
  viewportHeight.value = newViewportHeight;
27898
28010
  rowPosition.value = newRowPosition;
28011
+ perf.markEnd("rowPositionRecalc");
27899
28012
  },
27900
28013
  isRaf.value ? 0 : 1
27901
28014
  );
@@ -27906,6 +28019,7 @@
27906
28019
  });
27907
28020
  const calculationRowHeights = (data) => {
27908
28021
  var _a, _b;
28022
+ perf.markStart("calculationRowHeights");
27909
28023
  const newRowHeights = {};
27910
28024
  const defaultHeight = currentSizeHeight.value;
27911
28025
  const newCurrentRowHeights = {};
@@ -27938,6 +28052,7 @@
27938
28052
  }
27939
28053
  rowHeights.value = newRowHeights;
27940
28054
  currentRowHeights.value = newCurrentRowHeights;
28055
+ perf.markEnd("calculationRowHeights");
27941
28056
  };
27942
28057
  vue.watch(
27943
28058
  [flattenData, mergeRowHeight],
@@ -28264,6 +28379,7 @@
28264
28379
  function useData(_props, rowPosition, flattenData, startIndex, endIndex, draggingRowKey, useAnimate, getRowFlattenIndexByKey, latestRangeStartCell) {
28265
28380
  const data = vue.shallowRef([]);
28266
28381
  const pos = vue.shallowRef([]);
28382
+ const perf = usePerf();
28267
28383
  let rowKeyIndexMap = {};
28268
28384
  let exchange = true;
28269
28385
  vue.watch(
@@ -28273,6 +28389,7 @@
28273
28389
  if (flattenData.value.length !== rowPosition.value.length) {
28274
28390
  return;
28275
28391
  }
28392
+ perf.markStart("useData-slice");
28276
28393
  const newData = [];
28277
28394
  const newPos = [];
28278
28395
  const recordPositionArr = [];
@@ -28327,6 +28444,7 @@
28327
28444
  rowKeyIndexMap = newRowKeyIndexMap;
28328
28445
  data.value = newData;
28329
28446
  pos.value = newPos;
28447
+ perf.markEnd("useData-slice");
28330
28448
  },
28331
28449
  { immediate: true }
28332
28450
  );
@@ -28379,16 +28497,37 @@
28379
28497
  const allCellProps = vue.shallowRef({});
28380
28498
  const hasMultiRowSpanInfo = vue.shallowRef({});
28381
28499
  const centerRowColumnsMap = vue.shallowRef(/* @__PURE__ */ new Map());
28500
+ const perf = usePerf();
28501
+ const EMPTY_OBJ = Object.freeze({});
28502
+ const cellPropsCache = /* @__PURE__ */ new Map();
28503
+ let prevLeftCols = [];
28504
+ let prevRightCols = [];
28505
+ let prevCenterCols = [];
28506
+ let prevAllCols = [];
28507
+ let prevBodyWidth = 0;
28508
+ let prevLeftWidth = 0;
28509
+ let prevCenterWidth = 0;
28510
+ let prevCustomCell = void 0;
28511
+ let prevMergedRowHeights = {};
28382
28512
  const computedCellProps = (offsetLeft, column, rowIndex, record, overflow) => {
28383
- var _a, _b, _c, _d;
28513
+ var _a, _b, _c;
28384
28514
  const { customRender, originColumn, dataIndex, columnIndex, left, customCell } = column;
28385
28515
  const cellProps = {};
28386
- const customCellProps = (_b = (_a = customCell || contextCustomCell.value) == null ? void 0 : _a({ record, rowIndex, column })) != null ? _b : {};
28387
- const mergeCellStyles = Object.assign(
28388
- { overflow },
28389
- parseStyleText(customCellProps.style || {})
28390
- );
28391
- const copyCustomCellProps = Object.assign({}, customCellProps);
28516
+ const hasCustomCell = !!(customCell || contextCustomCell.value);
28517
+ const customCellProps = hasCustomCell ? (_a = (customCell || contextCustomCell.value)({ record, rowIndex, column })) != null ? _a : EMPTY_OBJ : EMPTY_OBJ;
28518
+ if (customCellProps === EMPTY_OBJ && !customRender) {
28519
+ const { width: width2 } = getColumnPosition(columnIndex, 1);
28520
+ const style = {
28521
+ overflow,
28522
+ width: `${width2}px`,
28523
+ left: `${left - offsetLeft}px`
28524
+ };
28525
+ if (width2 === 0) style.display = "none";
28526
+ cellProps.props = { colSpan: 1, rowSpan: 1, style };
28527
+ return cellProps;
28528
+ }
28529
+ const mergeCellStyles = customCellProps !== EMPTY_OBJ ? Object.assign({ overflow }, parseStyleText(customCellProps.style || {})) : { overflow };
28530
+ const copyCustomCellProps = customCellProps !== EMPTY_OBJ ? Object.assign({}, customCellProps) : {};
28392
28531
  if (customRender) {
28393
28532
  const value = getPathValue(record, dataIndex);
28394
28533
  const customCellRender = customRender({
@@ -28409,8 +28548,8 @@
28409
28548
  cellProps.children = customCellRender;
28410
28549
  }
28411
28550
  }
28412
- copyCustomCellProps.colSpan = (_c = copyCustomCellProps.colSpan) != null ? _c : 1;
28413
- copyCustomCellProps.rowSpan = (_d = copyCustomCellProps.rowSpan) != null ? _d : 1;
28551
+ copyCustomCellProps.colSpan = (_b = copyCustomCellProps.colSpan) != null ? _b : 1;
28552
+ copyCustomCellProps.rowSpan = (_c = copyCustomCellProps.rowSpan) != null ? _c : 1;
28414
28553
  const { width } = getColumnPosition(columnIndex, copyCustomCellProps.colSpan);
28415
28554
  Object.assign(mergeCellStyles, { width: `${width}px`, left: left - offsetLeft + "px" });
28416
28555
  if (width === 0) {
@@ -28428,6 +28567,29 @@
28428
28567
  return cellProps;
28429
28568
  };
28430
28569
  vue.watchEffect(() => {
28570
+ perf.markStart("useCellProps");
28571
+ const curLeft = leftColumns.value;
28572
+ const curRight = rightColumns.value;
28573
+ const curCenter = visibleCenterColumns.value;
28574
+ const curAll = allColumns.value;
28575
+ const curBodyW = bodyWidth.value;
28576
+ const curLeftW = leftWidth.value;
28577
+ const curCenterW = centerWidth.value;
28578
+ const curCustomCell = contextCustomCell.value;
28579
+ const curMergedH = mergedRowHeights.value;
28580
+ const columnsChanged = curLeft !== prevLeftCols || curRight !== prevRightCols || curCenter !== prevCenterCols || curAll !== prevAllCols || curBodyW !== prevBodyWidth || curLeftW !== prevLeftWidth || curCenterW !== prevCenterWidth || curCustomCell !== prevCustomCell || curMergedH !== prevMergedRowHeights;
28581
+ if (columnsChanged) {
28582
+ cellPropsCache.clear();
28583
+ prevLeftCols = curLeft;
28584
+ prevRightCols = curRight;
28585
+ prevCenterCols = curCenter;
28586
+ prevAllCols = curAll;
28587
+ prevBodyWidth = curBodyW;
28588
+ prevLeftWidth = curLeftW;
28589
+ prevCenterWidth = curCenterW;
28590
+ prevCustomCell = curCustomCell;
28591
+ prevMergedRowHeights = curMergedH;
28592
+ }
28431
28593
  const rawAllCellProps = {};
28432
28594
  const rawRowSpanInfo = {};
28433
28595
  const genAllCellProps = (index, offsetLeft, finallyColumns, rowKey, rowIndex, record, overflow, rowColumnsMap2) => {
@@ -28480,8 +28642,15 @@
28480
28642
  for (let i = 0; i < len; i++) {
28481
28643
  if (!data.value[i]) continue;
28482
28644
  const { record, isExpandRow, rowKey, rowIndex } = data.value[i];
28483
- rawAllCellProps[rowKey] = {};
28484
28645
  const overflow = mergedRowHeights.value[rowKey] ? "hidden" : "initial";
28646
+ const cached = cellPropsCache.get(rowKey);
28647
+ if (cached && cached.overflow === overflow) {
28648
+ rawAllCellProps[rowKey] = cached.cellProps;
28649
+ if (cached.hasRowSpan) rawRowSpanInfo[rowKey] = true;
28650
+ if (cached.centerColumns) rowColumnsMap.set(rowKey, cached.centerColumns);
28651
+ continue;
28652
+ }
28653
+ rawAllCellProps[rowKey] = {};
28485
28654
  if (isExpandRow) {
28486
28655
  rawAllCellProps[rowKey][ExpandColumnKey] = {
28487
28656
  props: {
@@ -28510,10 +28679,24 @@
28510
28679
  overflow
28511
28680
  );
28512
28681
  }
28682
+ cellPropsCache.set(rowKey, {
28683
+ cellProps: rawAllCellProps[rowKey],
28684
+ hasRowSpan: !!rawRowSpanInfo[rowKey],
28685
+ centerColumns: rowColumnsMap.get(rowKey),
28686
+ overflow
28687
+ });
28513
28688
  }
28514
28689
  allCellProps.value = rawAllCellProps;
28515
28690
  hasMultiRowSpanInfo.value = rawRowSpanInfo;
28516
28691
  centerRowColumnsMap.value = rowColumnsMap;
28692
+ if (perf.enabled.value) {
28693
+ const totalCells = Object.values(rawAllCellProps).reduce(
28694
+ (sum, row) => sum + Object.keys(row).length,
28695
+ 0
28696
+ );
28697
+ perf.captureMemory(len, totalCells);
28698
+ }
28699
+ perf.markEnd("useCellProps");
28517
28700
  });
28518
28701
  return { allCellProps, hasMultiRowSpanInfo, centerRowColumnsMap };
28519
28702
  };
@@ -32491,8 +32674,8 @@
32491
32674
  rowIndex: { type: Number, required: true },
32492
32675
  flattenRowIndex: { type: Number, required: true },
32493
32676
  rowKey: { type: [Number, String] },
32494
- column: { type: Object },
32495
- item: { type: Object },
32677
+ column: { type: Object, default: () => ({}) },
32678
+ item: { type: Object, default: () => ({}) },
32496
32679
  wrapText: { type: Boolean, default: false },
32497
32680
  type: { type: String },
32498
32681
  height: Number,
@@ -32518,39 +32701,6 @@
32518
32701
  error: "#e8353e",
32519
32702
  warning: "#eb8903"
32520
32703
  };
32521
- let cachedPrefixCls = "";
32522
- let cls = {
32523
- cellInner: "",
32524
- cellContent: "",
32525
- cellWrapText: "",
32526
- cellTextEllipsis: "",
32527
- cell: "",
32528
- firstCell: "",
32529
- bodyCell: "",
32530
- cellMulti: "",
32531
- cellHidden: "",
32532
- columnSort: "",
32533
- withAppend: ""
32534
- };
32535
- function getCls(prefixCls) {
32536
- if (prefixCls !== cachedPrefixCls) {
32537
- cachedPrefixCls = prefixCls;
32538
- cls = {
32539
- cellInner: `${prefixCls}-cell-inner`,
32540
- cellContent: `${prefixCls}-cell-content`,
32541
- cellWrapText: `${prefixCls}-cell-wrap-text`,
32542
- cellTextEllipsis: `${prefixCls}-cell-text-ellipsis`,
32543
- cell: `${prefixCls}-cell`,
32544
- firstCell: `${prefixCls}-first-cell`,
32545
- bodyCell: `${prefixCls}-body-cell`,
32546
- cellMulti: `${prefixCls}-cell-multi`,
32547
- cellHidden: `${prefixCls}-cell-hidden`,
32548
- columnSort: `${prefixCls}-column-sort`,
32549
- withAppend: `${prefixCls}-with-append`
32550
- };
32551
- }
32552
- return cls;
32553
- }
32554
32704
  const BodyCell$1 = (props, { slots, emit }) => {
32555
32705
  var _a, _b, _c, _d, _e, _f, _g, _h;
32556
32706
  const { table } = useProConfigInject();
@@ -32571,13 +32721,11 @@
32571
32721
  let tooltipTitle = value;
32572
32722
  const valueStatus = runFunction(column == null ? void 0 : column.valueStatus, value, props.item, valueEnum == null ? void 0 : valueEnum[value]);
32573
32723
  const recordIndexs = tableContext.getIndexsByKey(rowKey);
32574
- const c = getCls(prefixCls);
32575
- const cellInnerClass = c.cellInner;
32576
- const isWrapText = column.wrapText === void 0 ? wrapText : column.wrapText;
32724
+ const cellInnerClass = { [`${prefixCls}-cell-inner`]: true };
32577
32725
  const cellContentClass = {
32578
- [c.cellContent]: true,
32579
- [c.cellWrapText]: isWrapText,
32580
- [c.cellTextEllipsis]: !!column.ellipsis
32726
+ [`${prefixCls}-cell-content`]: true,
32727
+ [`${prefixCls}-cell-wrap-text`]: column.wrapText === void 0 ? wrapText : column.wrapText,
32728
+ [`${prefixCls}-cell-text-ellipsis`]: !!column.ellipsis
32581
32729
  };
32582
32730
  const cellContentStyle = {
32583
32731
  textAlign: `${column.align}`,
@@ -32594,13 +32742,13 @@
32594
32742
  const cellProps2 = cellRender.props || {};
32595
32743
  const cellRowSpan = cellProps2.rowSpan;
32596
32744
  const cellClass = {
32597
- [c.cell]: true,
32598
- [c.firstCell]: column.columnIndex === 0,
32599
- [c.bodyCell]: true,
32600
- [c.cellMulti]: cellRowSpan > 1,
32601
- [c.cellHidden]: cellRowSpan === 0,
32602
- [c.columnSort]: sorterInfo.sorterOrder,
32603
- [c.withAppend]: hasAppendNode
32745
+ [`${prefixCls}-cell`]: true,
32746
+ [`${prefixCls}-first-cell`]: column.columnIndex === 0,
32747
+ [`${prefixCls}-body-cell`]: true,
32748
+ [`${prefixCls}-cell-multi`]: cellRowSpan > 1,
32749
+ [`${prefixCls}-cell-hidden`]: cellRowSpan === 0,
32750
+ [`${prefixCls}-column-sort`]: sorterInfo.sorterOrder,
32751
+ [`${prefixCls}-with-append`]: hasAppendNode
32604
32752
  };
32605
32753
  const cellRenderArgs = {
32606
32754
  record: item,
@@ -32608,7 +32756,7 @@
32608
32756
  text: value,
32609
32757
  value,
32610
32758
  index: rowIndex,
32611
- recordIndexs,
32759
+ recordIndexs: tableContext.getIndexsByKey(rowKey),
32612
32760
  key,
32613
32761
  valueStatus,
32614
32762
  cancelEditable: tableContext.cancelEditable,
@@ -32672,12 +32820,14 @@
32672
32820
  [
32673
32821
  vue.createVNode(
32674
32822
  "div",
32675
- {
32676
- class: cellContentClass,
32677
- style: cellContentStyle,
32678
- title: altTitle,
32679
- ...cellKeyProps
32680
- },
32823
+ vue.mergeProps(
32824
+ {
32825
+ class: cellContentClass,
32826
+ style: cellContentStyle,
32827
+ title: altTitle
32828
+ },
32829
+ cellKeyProps
32830
+ ),
32681
32831
  [hasAppendNode ? (_h = slots.appendNode) == null ? void 0 : _h.call(slots) : null, bodyCell]
32682
32832
  )
32683
32833
  ]
@@ -33224,8 +33374,8 @@
33224
33374
  rowIndex: { type: Number, required: true },
33225
33375
  flattenRowIndex: { type: Number, required: true },
33226
33376
  rowKey: { type: [Number, String] },
33227
- column: { type: Object, required: true },
33228
- item: { type: Object, required: true },
33377
+ column: { type: Object, default: () => ({}) },
33378
+ item: { type: Object, default: () => ({}) },
33229
33379
  wrapText: { type: Boolean, default: false },
33230
33380
  type: { type: String },
33231
33381
  height: Number,
@@ -33351,33 +33501,18 @@
33351
33501
  "edit-row": _ctx.editRow,
33352
33502
  "editable-keys": _ctx.editableKeys,
33353
33503
  "is-row-edit": _ctx.isRowEdit
33354
- }, null, 8, ["prefixCls", "rowIndex", "flattenRowIndex", "rowKey", "column", "item", "edit-row", "editable-keys", "is-row-edit"])) : (vue.openBlock(), vue.createBlock(_component_BodyTextCell, {
33355
- key: 1,
33356
- prefixCls: _ctx.prefixCls,
33357
- rowIndex: _ctx.rowIndex,
33358
- flattenRowIndex: _ctx.flattenRowIndex,
33359
- rowKey: _ctx.rowKey,
33360
- column: _ctx.column,
33361
- item: _ctx.item,
33362
- wrapText: _ctx.wrapText,
33363
- type: _ctx.type,
33364
- height: _ctx.height,
33365
- hasAppendNode: _ctx.hasAppendNode,
33366
- resizeObserver: _ctx.resizeObserver,
33367
- calMaxHeight: _ctx.calMaxHeight,
33368
- tooltipOpen: _ctx.tooltipOpen,
33369
- getPopupContainer: _ctx.getPopupContainer,
33370
- style: vue.normalizeStyle({ cursor: _ctx.editable ? "poiner" : "" }),
33504
+ }, null, 8, ["prefixCls", "rowIndex", "flattenRowIndex", "rowKey", "column", "item", "edit-row", "editable-keys", "is-row-edit"])) : (vue.openBlock(), vue.createBlock(_component_BodyTextCell, vue.mergeProps({ key: 1 }, _ctx.props, {
33505
+ style: { cursor: _ctx.editable ? "poiner" : "" },
33371
33506
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onCellEvent($event, "click")),
33372
33507
  onDblClick: _cache[1] || (_cache[1] = ($event) => _ctx.onCellEvent($event, "dblClick")),
33373
33508
  onContextmenu: _cache[2] || (_cache[2] = ($event) => _ctx.onCellEvent($event, "contextmenu"))
33374
- }, {
33509
+ }), {
33375
33510
  appendNode: vue.withCtx(() => [
33376
33511
  vue.renderSlot(_ctx.$slots, "appendNode")
33377
33512
  ]),
33378
33513
  _: 3
33379
33514
  /* FORWARDED */
33380
- }, 8, ["prefixCls", "rowIndex", "flattenRowIndex", "rowKey", "column", "item", "wrapText", "type", "height", "hasAppendNode", "resizeObserver", "calMaxHeight", "tooltipOpen", "getPopupContainer", "style"]));
33515
+ }, 16, ["style"]));
33381
33516
  }
33382
33517
  var BodyCell = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$j]]);
33383
33518
 
@@ -34846,25 +34981,11 @@
34846
34981
  return summaryStyle.value;
34847
34982
  });
34848
34983
  const emptyStyle = vue.computed(() => ({ width: `${props.bodyWidth}px` }));
34849
- let resizeRafFrame;
34850
- let pendingWidth = 0;
34851
- let pendingHeight = 0;
34852
34984
  useResizeObserver(measureDomRef, (entries) => {
34853
34985
  var _a;
34854
34986
  const contentRect = (_a = entries[0]) == null ? void 0 : _a.contentRect;
34855
- const w = Math.floor((contentRect == null ? void 0 : contentRect.width) || 0);
34856
- const h = Math.floor((contentRect == null ? void 0 : contentRect.height) || 0);
34857
- if (w === pendingWidth && h === pendingHeight) return;
34858
- pendingWidth = w;
34859
- pendingHeight = h;
34860
- raf.cancel(resizeRafFrame);
34861
- resizeRafFrame = raf(() => {
34862
- emit("update:bodyWidth", pendingWidth);
34863
- emit("update:bodyHeight", pendingHeight);
34864
- });
34865
- });
34866
- vue.onBeforeUnmount(() => {
34867
- raf.cancel(resizeRafFrame);
34987
+ emit("update:bodyWidth", (contentRect == null ? void 0 : contentRect.width) || 0);
34988
+ emit("update:bodyHeight", (contentRect == null ? void 0 : contentRect.height) || 0);
34868
34989
  });
34869
34990
  return {
34870
34991
  bodyContainerStyle,
@@ -35561,6 +35682,9 @@
35561
35682
  slots: {},
35562
35683
  setup(props, { expose, emit, slots }) {
35563
35684
  const { table } = useProConfigInject();
35685
+ const perfEnabled = vue.shallowRef(!!props.perf);
35686
+ const perfContext = createPerfContext(perfEnabled);
35687
+ providePerfContext(perfContext);
35564
35688
  const counter = useInjectContainer();
35565
35689
  const rowKey = vue.computed(() => {
35566
35690
  var _a, _b, _c;
@@ -37877,7 +38001,7 @@
37877
38001
  [`${props.prefixCls}-card-bordered`]: isCard.value && isBordered("search", props.cardBordered)
37878
38002
  }));
37879
38003
  return () => {
37880
- var _a, _b;
38004
+ var _a;
37881
38005
  return vue.createVNode("div", {
37882
38006
  "class": className.value,
37883
38007
  "style": {
@@ -37889,27 +38013,27 @@
37889
38013
  "items": props.items,
37890
38014
  "loading": props.loading,
37891
38015
  "style": {
37892
- marginBlockEnd: ((_a = props.search) == null ? void 0 : _a.cardProps) !== false && props.tableShowCard ? 0 : "16px",
37893
- ...(_b = props.search) == null ? void 0 : _b.style
38016
+ marginBlockEnd: isCard.value ? 0 : "16px",
38017
+ ...(_a = props.search) == null ? void 0 : _a.style
37894
38018
  },
37895
38019
  "onReset": props.onReset,
37896
38020
  "onFinish": (values) => {
37897
- var _a2, _b2;
38021
+ var _a2, _b;
37898
38022
  submit(values, false);
37899
- (_b2 = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b2.call(_a2, values);
38023
+ (_b = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b.call(_a2, values);
37900
38024
  },
37901
38025
  "onValuesChange": (values) => {
37902
- var _a2, _b2, _c;
38026
+ var _a2, _b, _c;
37903
38027
  if (((_a2 = props.search) == null ? void 0 : _a2.submitter) === false) {
37904
38028
  submit(values, true);
37905
38029
  }
37906
- (_c = (_b2 = props.search) == null ? void 0 : _b2.onValuesChange) == null ? void 0 : _c.call(_b2, values);
38030
+ (_c = (_b = props.search) == null ? void 0 : _b.onValuesChange) == null ? void 0 : _c.call(_b, values);
37907
38031
  },
37908
38032
  "onInit": (values, action) => {
37909
- var _a2, _b2, _c;
38033
+ var _a2, _b, _c;
37910
38034
  submit(values, true);
37911
38035
  (_a2 = props.setFormAction) == null ? void 0 : _a2.call(props, action);
37912
- (_c = (_b2 = props.search) == null ? void 0 : _b2.onInit) == null ? void 0 : _c.call(_b2, values, action);
38036
+ (_c = (_b = props.search) == null ? void 0 : _b.onInit) == null ? void 0 : _c.call(_b, values, action);
37913
38037
  },
37914
38038
  "onCollapse": props.onCollapse
37915
38039
  }), slots)]);
@@ -38198,11 +38322,11 @@
38198
38322
  return false;
38199
38323
  });
38200
38324
  const showTableCard = vue.computed(() => {
38201
- var _a2, _b2;
38325
+ var _a2, _b2, _c;
38202
38326
  if (counter.hasFullScreen.value) {
38203
38327
  return false;
38204
38328
  }
38205
- return !!((_b2 = props.cardProps) != null ? _b2 : (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.cardProps) && !notNeedCardDom.value;
38329
+ return !!((_c = (_b2 = props.cardProps) != null ? _b2 : (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.cardProps) != null ? _c : true) && !notNeedCardDom.value;
38206
38330
  });
38207
38331
  const cardBodyStyle = vue.computed(() => {
38208
38332
  if (!showTableCard.value) return {};