ztxkui 4.2.18-65 → 4.2.18-67
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.
|
@@ -402,6 +402,9 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
402
402
|
if (!_column.hideColumn) {
|
|
403
403
|
_newColumns.push(_column);
|
|
404
404
|
}
|
|
405
|
+
if (tableNumberFormatter === null || tableNumberFormatter === void 0 ? void 0 : tableNumberFormatter(columnTitle)) {
|
|
406
|
+
_column.align = 'right';
|
|
407
|
+
}
|
|
405
408
|
// 添加render字段
|
|
406
409
|
appendRender(_column, {
|
|
407
410
|
columnTitle: columnTitle,
|
|
@@ -718,6 +718,7 @@ function Table(props) {
|
|
|
718
718
|
var title = summary.title, key = summary.key, titleIndex = summary.titleIndex, list = summary.list, columnList = summary.columnList, onClickHandle = summary.onClickHandle;
|
|
719
719
|
return (React.createElement(AntTable.Summary.Row, { key: key }, Array.isArray(list) &&
|
|
720
720
|
list.map(function (item, index) {
|
|
721
|
+
var _a, _b;
|
|
721
722
|
var data = {
|
|
722
723
|
index: index,
|
|
723
724
|
column: Array.isArray(columnList)
|
|
@@ -726,10 +727,14 @@ function Table(props) {
|
|
|
726
727
|
num: item,
|
|
727
728
|
};
|
|
728
729
|
if (titleIndex === index) {
|
|
729
|
-
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index
|
|
730
|
+
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index, align: isNumberInputAlignRight
|
|
731
|
+
? 'right'
|
|
732
|
+
: (_a = data === null || data === void 0 ? void 0 : data.column) === null || _a === void 0 ? void 0 : _a.align }, onClickHandle ? (React.createElement("div", { onClick: function () { return onClickHandle === null || onClickHandle === void 0 ? void 0 : onClickHandle(data); } }, title)) : (title)));
|
|
730
733
|
}
|
|
731
734
|
else {
|
|
732
|
-
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index
|
|
735
|
+
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index, align: isNumberInputAlignRight
|
|
736
|
+
? 'right'
|
|
737
|
+
: (_b = data === null || data === void 0 ? void 0 : data.column) === null || _b === void 0 ? void 0 : _b.align },
|
|
733
738
|
React.createElement("div", { style: {
|
|
734
739
|
color: '#333',
|
|
735
740
|
}, onClick: function () {
|
|
@@ -746,6 +751,7 @@ function Table(props) {
|
|
|
746
751
|
summaryConfig,
|
|
747
752
|
summaryFixed,
|
|
748
753
|
virtualTableKey,
|
|
754
|
+
isNumberInputAlignRight,
|
|
749
755
|
]);
|
|
750
756
|
// 多选
|
|
751
757
|
var rowSelectionObj = useMemo(function () { return (__assign(__assign({}, rowSelection), { onChange: function (selectedRowKeys, selectedRows) {
|
|
@@ -66,6 +66,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
|
|
|
66
66
|
columnResult_1.push({
|
|
67
67
|
key: col === null || col === void 0 ? void 0 : col.key,
|
|
68
68
|
dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
|
|
69
|
+
align: col === null || col === void 0 ? void 0 : col.align,
|
|
69
70
|
});
|
|
70
71
|
});
|
|
71
72
|
}
|
|
@@ -73,6 +74,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
|
|
|
73
74
|
columnResult_1.push({
|
|
74
75
|
key: col === null || col === void 0 ? void 0 : col.key,
|
|
75
76
|
dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
|
|
77
|
+
align: col === null || col === void 0 ? void 0 : col.align,
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
});
|
|
@@ -134,6 +136,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
|
|
|
134
136
|
columnResult_2.push({
|
|
135
137
|
key: col === null || col === void 0 ? void 0 : col.key,
|
|
136
138
|
dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
|
|
139
|
+
align: col === null || col === void 0 ? void 0 : col.align,
|
|
137
140
|
});
|
|
138
141
|
});
|
|
139
142
|
}
|
|
@@ -141,6 +144,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
|
|
|
141
144
|
columnResult_2.push({
|
|
142
145
|
key: col === null || col === void 0 ? void 0 : col.key,
|
|
143
146
|
dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
|
|
147
|
+
align: col === null || col === void 0 ? void 0 : col.align,
|
|
144
148
|
});
|
|
145
149
|
}
|
|
146
150
|
});
|