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.
- package/dist/index.full.js +210 -284
- package/dist/index.full.min.js +7 -7
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -7
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +210 -284
- package/es/components/table/src/components/Body/Body.vue.d.ts +12 -6
- package/es/components/table/src/components/Body/BodyCell.vue.d.ts +10 -6
- package/es/components/table/src/components/Body/BodyRow.vue.d.ts +12 -6
- package/es/components/table/src/components/Body/BodyRows.vue.d.ts +12 -6
- package/es/components/table/src/components/Body/BodyTextCell.d.ts +2 -0
- package/es/components/table/src/components/InteralTable.vue.d.ts +12 -6
- package/es/components/table/src/components/interface.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/packages/components/table/src/components/Body/Body.vue.mjs.map +1 -1
- package/es/packages/components/table/src/components/Body/Body.vue2.mjs +2 -17
- package/es/packages/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
- package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs +5 -20
- package/es/packages/components/table/src/components/Body/BodyCell.vue.mjs.map +1 -1
- package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs +2 -2
- package/es/packages/components/table/src/components/Body/BodyCell.vue2.mjs.map +1 -1
- package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs +2 -3
- package/es/packages/components/table/src/components/Body/BodyCellTooltip.vue2.mjs.map +1 -1
- package/es/packages/components/table/src/components/Body/BodyTextCell.mjs +23 -56
- package/es/packages/components/table/src/components/Body/BodyTextCell.mjs.map +1 -1
- package/es/packages/components/table/src/components/Form/Form.mjs +9 -9
- package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
- package/es/packages/components/table/src/components/Table.mjs +2 -2
- package/es/packages/components/table/src/components/Table.mjs.map +1 -1
- package/es/packages/components/table/src/components/interface.mjs.map +1 -1
- package/es/packages/components/table/src/hooks/useColumns.mjs +167 -180
- package/es/packages/components/table/src/hooks/useColumns.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/table/src/components/Body/Body.vue.d.ts +12 -6
- package/lib/components/table/src/components/Body/BodyCell.vue.d.ts +10 -6
- package/lib/components/table/src/components/Body/BodyRow.vue.d.ts +12 -6
- package/lib/components/table/src/components/Body/BodyRows.vue.d.ts +12 -6
- package/lib/components/table/src/components/Body/BodyTextCell.d.ts +2 -0
- package/lib/components/table/src/components/InteralTable.vue.d.ts +12 -6
- package/lib/components/table/src/components/interface.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/packages/components/table/src/components/Body/Body.vue.js.map +1 -1
- package/lib/packages/components/table/src/components/Body/Body.vue2.js +2 -17
- package/lib/packages/components/table/src/components/Body/Body.vue2.js.map +1 -1
- package/lib/packages/components/table/src/components/Body/BodyCell.vue.js +4 -19
- package/lib/packages/components/table/src/components/Body/BodyCell.vue.js.map +1 -1
- package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js +2 -2
- package/lib/packages/components/table/src/components/Body/BodyCell.vue2.js.map +1 -1
- package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js +2 -3
- package/lib/packages/components/table/src/components/Body/BodyCellTooltip.vue2.js.map +1 -1
- package/lib/packages/components/table/src/components/Body/BodyTextCell.js +22 -55
- package/lib/packages/components/table/src/components/Body/BodyTextCell.js.map +1 -1
- package/lib/packages/components/table/src/components/Form/Form.js +9 -9
- package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
- package/lib/packages/components/table/src/components/Table.js +2 -2
- package/lib/packages/components/table/src/components/Table.js.map +1 -1
- package/lib/packages/components/table/src/components/interface.js.map +1 -1
- package/lib/packages/components/table/src/hooks/useColumns.js +166 -179
- package/lib/packages/components/table/src/hooks/useColumns.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
package/dist/index.full.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Pro Design Vue v1.4.
|
|
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.
|
|
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
|
-
|
|
27068
|
-
|
|
27069
|
-
|
|
27070
|
-
|
|
27071
|
-
|
|
27072
|
-
|
|
27073
|
-
|
|
27074
|
-
|
|
27075
|
-
|
|
27076
|
-
|
|
27077
|
-
|
|
27078
|
-
|
|
27079
|
-
|
|
27080
|
-
|
|
27081
|
-
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
|
|
27085
|
-
|
|
27086
|
-
|
|
27087
|
-
|
|
27088
|
-
|
|
27089
|
-
|
|
27090
|
-
|
|
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
|
-
|
|
27134
|
-
|
|
27092
|
+
const {
|
|
27093
|
+
width,
|
|
27094
|
+
fixed = fix,
|
|
27135
27095
|
children,
|
|
27136
|
-
|
|
27137
|
-
|
|
27138
|
-
|
|
27139
|
-
|
|
27140
|
-
|
|
27141
|
-
|
|
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
|
-
|
|
27144
|
-
|
|
27145
|
-
|
|
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
|
-
|
|
27148
|
-
|
|
27149
|
-
|
|
27150
|
-
|
|
27151
|
-
|
|
27152
|
-
|
|
27153
|
-
|
|
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
|
-
|
|
27156
|
-
|
|
27157
|
-
|
|
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
|
-
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
|
|
27172
|
-
|
|
27173
|
-
|
|
27174
|
-
|
|
27175
|
-
|
|
27176
|
-
|
|
27177
|
-
|
|
27178
|
-
|
|
27179
|
-
|
|
27180
|
-
|
|
27181
|
-
|
|
27182
|
-
|
|
27183
|
-
|
|
27184
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27225
|
-
|
|
27226
|
-
}
|
|
27227
|
-
|
|
27228
|
-
|
|
27229
|
-
|
|
27230
|
-
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
|
|
27234
|
-
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27239
|
-
|
|
27240
|
-
|
|
27241
|
-
|
|
27242
|
-
|
|
27243
|
-
|
|
27244
|
-
|
|
27245
|
-
|
|
27246
|
-
|
|
27247
|
-
|
|
27248
|
-
|
|
27249
|
-
|
|
27250
|
-
|
|
27251
|
-
|
|
27252
|
-
|
|
27253
|
-
|
|
27254
|
-
|
|
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
|
|
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
|
-
[
|
|
32579
|
-
[
|
|
32580
|
-
[
|
|
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
|
-
[
|
|
32598
|
-
[
|
|
32599
|
-
[
|
|
32600
|
-
[
|
|
32601
|
-
[
|
|
32602
|
-
[
|
|
32603
|
-
[
|
|
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
|
-
|
|
32677
|
-
|
|
32678
|
-
|
|
32679
|
-
|
|
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,
|
|
33228
|
-
item: { type: Object,
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
34856
|
-
|
|
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
|
|
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:
|
|
37893
|
-
...(
|
|
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,
|
|
37823
|
+
var _a2, _b;
|
|
37898
37824
|
submit(values, false);
|
|
37899
|
-
(
|
|
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,
|
|
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 = (
|
|
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,
|
|
37835
|
+
var _a2, _b, _c;
|
|
37910
37836
|
submit(values, true);
|
|
37911
37837
|
(_a2 = props.setFormAction) == null ? void 0 : _a2.call(props, action);
|
|
37912
|
-
(_c = (
|
|
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 {};
|