pro-design-vue 1.4.0 → 1.4.2

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 (65) hide show
  1. package/dist/index.full.js +210 -284
  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 +210 -284
  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 +12 -6
  13. package/es/components/table/src/components/interface.d.ts +1 -1
  14. package/es/index.d.ts +1 -1
  15. package/es/packages/components/table/src/components/Body/Body.vue.mjs.map +1 -1
  16. package/es/packages/components/table/src/components/Body/Body.vue2.mjs +2 -17
  17. package/es/packages/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
  18. package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs +5 -20
  19. package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs.map +1 -1
  20. package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs +2 -2
  21. package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs.map +1 -1
  22. package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs +2 -3
  23. package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs.map +1 -1
  24. package/es/packages/components/table/src/components/Body/BodyTextCell.mjs +23 -56
  25. package/es/packages/components/table/src/components/Body/BodyTextCell.mjs.map +1 -1
  26. package/es/packages/components/table/src/components/Form/Form.mjs +9 -9
  27. package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
  28. package/es/packages/components/table/src/components/Table.mjs +2 -2
  29. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  30. package/es/packages/components/table/src/components/interface.mjs.map +1 -1
  31. package/es/packages/components/table/src/hooks/useColumns.mjs +167 -180
  32. package/es/packages/components/table/src/hooks/useColumns.mjs.map +1 -1
  33. package/es/version.d.ts +1 -1
  34. package/es/version.mjs +1 -1
  35. package/es/version.mjs.map +1 -1
  36. package/lib/components/table/src/components/Body/Body.vue.d.ts +12 -6
  37. package/lib/components/table/src/components/Body/BodyCell.vue.d.ts +10 -6
  38. package/lib/components/table/src/components/Body/BodyRow.vue.d.ts +12 -6
  39. package/lib/components/table/src/components/Body/BodyRows.vue.d.ts +12 -6
  40. package/lib/components/table/src/components/Body/BodyTextCell.d.ts +2 -0
  41. package/lib/components/table/src/components/InteralTable.vue.d.ts +12 -6
  42. package/lib/components/table/src/components/interface.d.ts +1 -1
  43. package/lib/index.d.ts +1 -1
  44. package/lib/packages/components/table/src/components/Body/Body.vue.js.map +1 -1
  45. package/lib/packages/components/table/src/components/Body/Body.vue2.js +2 -17
  46. package/lib/packages/components/table/src/components/Body/Body.vue2.js.map +1 -1
  47. package/lib/packages/components/table/src/components/Body/BodyCell.vue.js +4 -19
  48. package/lib/packages/components/table/src/components/Body/BodyCell.vue.js.map +1 -1
  49. package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js +2 -2
  50. package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js.map +1 -1
  51. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js +2 -3
  52. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js.map +1 -1
  53. package/lib/packages/components/table/src/components/Body/BodyTextCell.js +22 -55
  54. package/lib/packages/components/table/src/components/Body/BodyTextCell.js.map +1 -1
  55. package/lib/packages/components/table/src/components/Form/Form.js +9 -9
  56. package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
  57. package/lib/packages/components/table/src/components/Table.js +2 -2
  58. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  59. package/lib/packages/components/table/src/components/interface.js.map +1 -1
  60. package/lib/packages/components/table/src/hooks/useColumns.js +166 -179
  61. package/lib/packages/components/table/src/hooks/useColumns.js.map +1 -1
  62. package/lib/version.d.ts +1 -1
  63. package/lib/version.js +1 -1
  64. package/lib/version.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.4.0 */
1
+ /*! Pro Design Vue v1.4.2 */
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.2";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -27064,201 +27064,189 @@
27064
27064
  }
27065
27065
  mergeColumns.value = newColumns;
27066
27066
  });
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);
27067
+ vue.watch(
27068
+ [mergeColumns, baseHeight, bodyScrollWidth, measureWidthRef],
27069
+ () => {
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;
27132
27091
  }
27133
- newMaxRowSpan = Math.max(newMaxRowSpan, rowSpan + 1);
27134
- genColumns(
27092
+ const {
27093
+ width,
27094
+ fixed = fix,
27135
27095
  children,
27136
- finallyColumn.children,
27137
- finallyColumn.children,
27138
- finallyColumn.children,
27139
- rowSpan + 1,
27140
- columnPos,
27141
- parseFiexed
27096
+ ellipsis = false,
27097
+ tooltip,
27098
+ minWidth,
27099
+ maxWidth
27100
+ } = originColumn;
27101
+ const columnWidth = columnWidthByString(
27102
+ measureWidthRef.value,
27103
+ bodyScrollWidth.value,
27104
+ width
27142
27105
  );
27143
- } else {
27144
- if (finallyColumn.width === void 0) {
27145
- autoWidthColumns.push(finallyColumn);
27106
+ const columnMinWidth = columnWidthByString(
27107
+ measureWidthRef.value,
27108
+ bodyScrollWidth.value,
27109
+ minWidth
27110
+ );
27111
+ const columnMaxWidth = maxWidth ? columnWidthByString(measureWidthRef.value, bodyScrollWidth.value, maxWidth) : 1 / 0;
27112
+ const finallyWidth = Math.min(Math.max(columnWidth, columnMinWidth), columnMaxWidth);
27113
+ const columnPos = getColumnPos(i, pos);
27114
+ const columnKey = originColumn.columnKey || originColumn.key || columnPos;
27115
+ const parseFiexed = fixed === true ? "left" : fixed;
27116
+ const finallyColumn = Object.assign({}, originColumn, {
27117
+ finallyWidth,
27118
+ columnKey,
27119
+ originColumn,
27120
+ showTitle: !tooltip && (ellipsis === true || typeof ellipsis === "object" && (ellipsis == null ? void 0 : ellipsis.showTitle) !== false),
27121
+ fixed: parseFiexed,
27122
+ hidden: true === originColumn.hidden
27123
+ });
27124
+ keyColumnMap.value.set(columnKey, finallyColumn);
27125
+ if (finallyColumn.hidden) {
27126
+ break;
27146
27127
  }
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);
27128
+ if (children && children.length) {
27129
+ finallyColumn.children = [];
27130
+ if (parseFiexed === "left") {
27131
+ leftHeaderCols.push(finallyColumn);
27132
+ } else if (parseFiexed === "right") {
27133
+ rightHeaderCols.push(finallyColumn);
27134
+ } else {
27135
+ centerHeaderCols.push(finallyColumn);
27136
+ }
27137
+ newMaxRowSpan = Math.max(newMaxRowSpan, rowSpan + 1);
27138
+ genColumns(
27139
+ children,
27140
+ finallyColumn.children,
27141
+ finallyColumn.children,
27142
+ finallyColumn.children,
27143
+ rowSpan + 1,
27144
+ columnPos,
27145
+ parseFiexed
27146
+ );
27154
27147
  } else {
27155
- newCenterColumns.push(finallyColumn);
27156
- if (finallyColumn.autoHeight) {
27157
- newAutoHeightColumns.push(finallyColumn);
27148
+ if (finallyColumn.width === void 0) {
27149
+ autoWidthColumns.push(finallyColumn);
27150
+ }
27151
+ finallyWidthTotal += finallyColumn.finallyWidth;
27152
+ if (parseFiexed === "left") {
27153
+ newLeftColumns.push(finallyColumn);
27154
+ leftHeaderCols.push(finallyColumn);
27155
+ } else if (parseFiexed === "right") {
27156
+ newRightColumns.push(finallyColumn);
27157
+ rightHeaderCols.push(finallyColumn);
27158
+ } else {
27159
+ newCenterColumns.push(finallyColumn);
27160
+ if (finallyColumn.autoHeight) {
27161
+ newAutoHeightColumns.push(finallyColumn);
27162
+ }
27163
+ centerHeaderCols.push(finallyColumn);
27158
27164
  }
27159
- centerHeaderCols.push(finallyColumn);
27160
27165
  }
27161
27166
  }
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
- );
27167
+ };
27168
+ genColumns(
27169
+ originMergeColumns,
27170
+ newLeftHeaderColumns,
27171
+ newCenterHeaderColumns,
27172
+ newRightHeaderColumns,
27173
+ 1,
27174
+ "__S_TABLE_COLUMN_Key__"
27175
+ );
27176
+ let differenceWidth = bodyScrollWidth.value - finallyWidthTotal;
27177
+ const nonResizableColumns = autoWidthColumns.length ? autoWidthColumns : newLeftColumns.concat(newCenterColumns, newRightColumns).filter((column) => !column.resizable || !column.__Internal__Column__);
27178
+ const widthDiffAverage = Math.floor(differenceWidth / nonResizableColumns.length);
27179
+ if (differenceWidth > 0) {
27180
+ for (let i = 0, len = nonResizableColumns.length; i < len; i++) {
27181
+ const column = nonResizableColumns[i];
27182
+ let finallyWidth = 0;
27183
+ if (i == len - 1 && differenceWidth > widthDiffAverage) {
27184
+ finallyWidth = column.finallyWidth + differenceWidth;
27185
+ } else {
27186
+ finallyWidth = Math.max(
27187
+ Math.min(column.finallyWidth + widthDiffAverage, (_a = column.maxWidth) != null ? _a : 1 / 0),
27188
+ (_b = column.minWidth) != null ? _b : 50
27189
+ );
27190
+ }
27191
+ differenceWidth -= finallyWidth - column.finallyWidth;
27192
+ column.finallyWidth = finallyWidth;
27186
27193
  }
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
27194
  } else {
27200
- headerHeight.value = new Array(newMaxRowSpan).fill(props.headerHeight);
27195
+ for (let i = 0, len = autoWidthColumns.length; i < len; i++) {
27196
+ const column = autoWidthColumns[i];
27197
+ column.finallyWidth = Math.min((_c = column.minWidth) != null ? _c : 50, (_d = column.maxWidth) != null ? _d : 1 / 0);
27198
+ }
27201
27199
  }
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
- );
27200
+ if (props.headerHeight !== void 0) {
27201
+ if (Array.isArray(props.headerHeight)) {
27202
+ headerHeight.value = props.headerHeight.concat(new Array(newMaxRowSpan).fill(baseHeight.value)).slice(0, newMaxRowSpan);
27220
27203
  } else {
27221
- column.rowSpan = rowSpan;
27222
- column.height = headerHeight.value.slice(newMaxRowSpan - rowSpan).reduce((pre, cur) => pre + cur, 0);
27204
+ headerHeight.value = new Array(newMaxRowSpan).fill(props.headerHeight);
27223
27205
  }
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
- });
27206
+ } else {
27207
+ headerHeight.value = new Array(newMaxRowSpan).fill(baseHeight.value);
27208
+ }
27209
+ const genHeaderColumns = (headerColumns, left, top, rowSpan) => {
27210
+ let totalFinallyWidth = 0;
27211
+ let totalLeft = left;
27212
+ headerColumns.forEach((column) => {
27213
+ column.left = totalLeft;
27214
+ column.top = top;
27215
+ if (column.children) {
27216
+ column.rowSpan = 1;
27217
+ column.height = headerHeight.value[newMaxRowSpan - rowSpan];
27218
+ column.finallyWidth = genHeaderColumns(
27219
+ column.children,
27220
+ totalLeft,
27221
+ column.height,
27222
+ rowSpan - 1
27223
+ );
27224
+ } else {
27225
+ column.rowSpan = rowSpan;
27226
+ column.height = headerHeight.value.slice(newMaxRowSpan - rowSpan).reduce((pre, cur) => pre + cur, 0);
27227
+ }
27228
+ totalLeft += column.finallyWidth;
27229
+ totalFinallyWidth += column.finallyWidth;
27230
+ });
27231
+ return totalFinallyWidth;
27232
+ };
27233
+ genHeaderColumns(
27234
+ newLeftHeaderColumns.concat(newCenterHeaderColumns, newRightHeaderColumns),
27235
+ 0,
27236
+ 0,
27237
+ newMaxRowSpan
27238
+ );
27239
+ leftColumns.value = newLeftColumns;
27240
+ rightColumns.value = newRightColumns;
27241
+ centerColumns.value = newCenterColumns;
27242
+ autoHeightColumns.value = newAutoHeightColumns;
27243
+ leftHeaderColumns.value = newLeftHeaderColumns;
27244
+ rightHeaderColumns.value = newRightHeaderColumns;
27245
+ centerHeaderColumns.value = newCenterHeaderColumns;
27246
+ maxRowSpan.value = newMaxRowSpan;
27256
27247
  },
27257
27248
  { immediate: true }
27258
27249
  );
27259
- vue.onBeforeUnmount(() => {
27260
- raf.cancel(columnsRafFrame);
27261
- });
27262
27250
  const allColumns = vue.shallowRef([]);
27263
27251
  let cacheColumnKeyPositonMap = {};
27264
27252
  const columnKeyIndexMap = vue.shallowRef({});
@@ -32491,8 +32479,8 @@
32491
32479
  rowIndex: { type: Number, required: true },
32492
32480
  flattenRowIndex: { type: Number, required: true },
32493
32481
  rowKey: { type: [Number, String] },
32494
- column: { type: Object },
32495
- item: { type: Object },
32482
+ column: { type: Object, default: () => ({}) },
32483
+ item: { type: Object, default: () => ({}) },
32496
32484
  wrapText: { type: Boolean, default: false },
32497
32485
  type: { type: String },
32498
32486
  height: Number,
@@ -32518,39 +32506,6 @@
32518
32506
  error: "#e8353e",
32519
32507
  warning: "#eb8903"
32520
32508
  };
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
32509
  const BodyCell$1 = (props, { slots, emit }) => {
32555
32510
  var _a, _b, _c, _d, _e, _f, _g, _h;
32556
32511
  const { table } = useProConfigInject();
@@ -32571,13 +32526,11 @@
32571
32526
  let tooltipTitle = value;
32572
32527
  const valueStatus = runFunction(column == null ? void 0 : column.valueStatus, value, props.item, valueEnum == null ? void 0 : valueEnum[value]);
32573
32528
  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;
32529
+ const cellInnerClass = { [`${prefixCls}-cell-inner`]: true };
32577
32530
  const cellContentClass = {
32578
- [c.cellContent]: true,
32579
- [c.cellWrapText]: isWrapText,
32580
- [c.cellTextEllipsis]: !!column.ellipsis
32531
+ [`${prefixCls}-cell-content`]: true,
32532
+ [`${prefixCls}-cell-wrap-text`]: column.wrapText === void 0 ? wrapText : column.wrapText,
32533
+ [`${prefixCls}-cell-text-ellipsis`]: !!column.ellipsis
32581
32534
  };
32582
32535
  const cellContentStyle = {
32583
32536
  textAlign: `${column.align}`,
@@ -32594,13 +32547,13 @@
32594
32547
  const cellProps2 = cellRender.props || {};
32595
32548
  const cellRowSpan = cellProps2.rowSpan;
32596
32549
  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
32550
+ [`${prefixCls}-cell`]: true,
32551
+ [`${prefixCls}-first-cell`]: column.columnIndex === 0,
32552
+ [`${prefixCls}-body-cell`]: true,
32553
+ [`${prefixCls}-cell-multi`]: cellRowSpan > 1,
32554
+ [`${prefixCls}-cell-hidden`]: cellRowSpan === 0,
32555
+ [`${prefixCls}-column-sort`]: sorterInfo.sorterOrder,
32556
+ [`${prefixCls}-with-append`]: hasAppendNode
32604
32557
  };
32605
32558
  const cellRenderArgs = {
32606
32559
  record: item,
@@ -32608,7 +32561,7 @@
32608
32561
  text: value,
32609
32562
  value,
32610
32563
  index: rowIndex,
32611
- recordIndexs,
32564
+ recordIndexs: tableContext.getIndexsByKey(rowKey),
32612
32565
  key,
32613
32566
  valueStatus,
32614
32567
  cancelEditable: tableContext.cancelEditable,
@@ -32672,12 +32625,14 @@
32672
32625
  [
32673
32626
  vue.createVNode(
32674
32627
  "div",
32675
- {
32676
- class: cellContentClass,
32677
- style: cellContentStyle,
32678
- title: altTitle,
32679
- ...cellKeyProps
32680
- },
32628
+ vue.mergeProps(
32629
+ {
32630
+ class: cellContentClass,
32631
+ style: cellContentStyle,
32632
+ title: altTitle
32633
+ },
32634
+ cellKeyProps
32635
+ ),
32681
32636
  [hasAppendNode ? (_h = slots.appendNode) == null ? void 0 : _h.call(slots) : null, bodyCell]
32682
32637
  )
32683
32638
  ]
@@ -33224,8 +33179,8 @@
33224
33179
  rowIndex: { type: Number, required: true },
33225
33180
  flattenRowIndex: { type: Number, required: true },
33226
33181
  rowKey: { type: [Number, String] },
33227
- column: { type: Object, required: true },
33228
- item: { type: Object, required: true },
33182
+ column: { type: Object, default: () => ({}) },
33183
+ item: { type: Object, default: () => ({}) },
33229
33184
  wrapText: { type: Boolean, default: false },
33230
33185
  type: { type: String },
33231
33186
  height: Number,
@@ -33351,33 +33306,18 @@
33351
33306
  "edit-row": _ctx.editRow,
33352
33307
  "editable-keys": _ctx.editableKeys,
33353
33308
  "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" : "" }),
33309
+ }, 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, {
33310
+ style: { cursor: _ctx.editable ? "poiner" : "" },
33371
33311
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onCellEvent($event, "click")),
33372
33312
  onDblClick: _cache[1] || (_cache[1] = ($event) => _ctx.onCellEvent($event, "dblClick")),
33373
33313
  onContextmenu: _cache[2] || (_cache[2] = ($event) => _ctx.onCellEvent($event, "contextmenu"))
33374
- }, {
33314
+ }), {
33375
33315
  appendNode: vue.withCtx(() => [
33376
33316
  vue.renderSlot(_ctx.$slots, "appendNode")
33377
33317
  ]),
33378
33318
  _: 3
33379
33319
  /* FORWARDED */
33380
- }, 8, ["prefixCls", "rowIndex", "flattenRowIndex", "rowKey", "column", "item", "wrapText", "type", "height", "hasAppendNode", "resizeObserver", "calMaxHeight", "tooltipOpen", "getPopupContainer", "style"]));
33320
+ }, 16, ["style"]));
33381
33321
  }
33382
33322
  var BodyCell = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$j]]);
33383
33323
 
@@ -34846,25 +34786,11 @@
34846
34786
  return summaryStyle.value;
34847
34787
  });
34848
34788
  const emptyStyle = vue.computed(() => ({ width: `${props.bodyWidth}px` }));
34849
- let resizeRafFrame;
34850
- let pendingWidth = 0;
34851
- let pendingHeight = 0;
34852
34789
  useResizeObserver(measureDomRef, (entries) => {
34853
34790
  var _a;
34854
34791
  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);
34792
+ emit("update:bodyWidth", (contentRect == null ? void 0 : contentRect.width) || 0);
34793
+ emit("update:bodyHeight", (contentRect == null ? void 0 : contentRect.height) || 0);
34868
34794
  });
34869
34795
  return {
34870
34796
  bodyContainerStyle,
@@ -37877,7 +37803,7 @@
37877
37803
  [`${props.prefixCls}-card-bordered`]: isCard.value && isBordered("search", props.cardBordered)
37878
37804
  }));
37879
37805
  return () => {
37880
- var _a, _b;
37806
+ var _a;
37881
37807
  return vue.createVNode("div", {
37882
37808
  "class": className.value,
37883
37809
  "style": {
@@ -37889,27 +37815,27 @@
37889
37815
  "items": props.items,
37890
37816
  "loading": props.loading,
37891
37817
  "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
37818
+ marginBlockEnd: isCard.value ? 0 : "16px",
37819
+ ...(_a = props.search) == null ? void 0 : _a.style
37894
37820
  },
37895
37821
  "onReset": props.onReset,
37896
37822
  "onFinish": (values) => {
37897
- var _a2, _b2;
37823
+ var _a2, _b;
37898
37824
  submit(values, false);
37899
- (_b2 = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b2.call(_a2, values);
37825
+ (_b = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b.call(_a2, values);
37900
37826
  },
37901
37827
  "onValuesChange": (values) => {
37902
- var _a2, _b2, _c;
37828
+ var _a2, _b, _c;
37903
37829
  if (((_a2 = props.search) == null ? void 0 : _a2.submitter) === false) {
37904
37830
  submit(values, true);
37905
37831
  }
37906
- (_c = (_b2 = props.search) == null ? void 0 : _b2.onValuesChange) == null ? void 0 : _c.call(_b2, values);
37832
+ (_c = (_b = props.search) == null ? void 0 : _b.onValuesChange) == null ? void 0 : _c.call(_b, values);
37907
37833
  },
37908
37834
  "onInit": (values, action) => {
37909
- var _a2, _b2, _c;
37835
+ var _a2, _b, _c;
37910
37836
  submit(values, true);
37911
37837
  (_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);
37838
+ (_c = (_b = props.search) == null ? void 0 : _b.onInit) == null ? void 0 : _c.call(_b, values, action);
37913
37839
  },
37914
37840
  "onCollapse": props.onCollapse
37915
37841
  }), slots)]);
@@ -38198,11 +38124,11 @@
38198
38124
  return false;
38199
38125
  });
38200
38126
  const showTableCard = vue.computed(() => {
38201
- var _a2, _b2;
38127
+ var _a2, _b2, _c;
38202
38128
  if (counter.hasFullScreen.value) {
38203
38129
  return false;
38204
38130
  }
38205
- return !!((_b2 = props.cardProps) != null ? _b2 : (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.cardProps) && !notNeedCardDom.value;
38131
+ 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
38132
  });
38207
38133
  const cardBodyStyle = vue.computed(() => {
38208
38134
  if (!showTableCard.value) return {};