@yilianjituan/yilian_dgerm 0.0.1-alpha.41 → 0.0.1-alpha.43
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.
|
@@ -423,6 +423,7 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
423
423
|
bordered: true,
|
|
424
424
|
dataSource: dataSource
|
|
425
425
|
}, tableProps, {
|
|
426
|
+
tableLayout: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.tableLayout) || 'auto',
|
|
426
427
|
components: {
|
|
427
428
|
header: {
|
|
428
429
|
cell: ResizableTitle
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["onResize", "width", "isEnd"],
|
|
2
|
-
_excluded2 = ["components", "columns", "dataSource"];
|
|
2
|
+
_excluded2 = ["components", "columns", "dataSource", "tableLayout"];
|
|
3
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -87,7 +87,11 @@ var mergedColumns = function mergedColumns(columns, tableRef, newColumnsVoid) {
|
|
|
87
87
|
// 设置默认宽度
|
|
88
88
|
isEnd: index === columns.length - 1,
|
|
89
89
|
// 判断是否是最后一个
|
|
90
|
-
onResize: handleResize(index, columns
|
|
90
|
+
onResize: handleResize(index, columns.map(function (column) {
|
|
91
|
+
return _objectSpread(_objectSpread({}, column), {}, {
|
|
92
|
+
width: typeof column.width === 'number' ? column.width : widthsList[index] || 150
|
|
93
|
+
});
|
|
94
|
+
}), newColumnsVoid)
|
|
91
95
|
};
|
|
92
96
|
}
|
|
93
97
|
});
|
|
@@ -125,6 +129,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
125
129
|
var components = props.components,
|
|
126
130
|
columns = props.columns,
|
|
127
131
|
dataSource = props.dataSource,
|
|
132
|
+
tableLayout = props.tableLayout,
|
|
128
133
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
129
134
|
var tableRef = useRef(null); // 引用 Table 外层容器
|
|
130
135
|
var _React$useState = React.useState(columns),
|
|
@@ -146,7 +151,8 @@ var CustomTable = function CustomTable(props) {
|
|
|
146
151
|
return setColumn(_columns);
|
|
147
152
|
}),
|
|
148
153
|
components: customComponents,
|
|
149
|
-
dataSource: dataSource || []
|
|
154
|
+
dataSource: dataSource || [],
|
|
155
|
+
tableLayout: tableLayout || 'auto'
|
|
150
156
|
})));
|
|
151
157
|
};
|
|
152
158
|
export { mergedColumns, ResizableTitle, CustomTable };
|
|
@@ -43,7 +43,8 @@ var Index = function Index(props) {
|
|
|
43
43
|
// rows = 1时,需要自行设置css,否则会默认全部展示
|
|
44
44
|
className: rows === 1 && !expanded && !expandable ? 'custom_Typography_row1' : '',
|
|
45
45
|
style: {
|
|
46
|
-
marginBottom: 0
|
|
46
|
+
marginBottom: 0,
|
|
47
|
+
color: '#000000'
|
|
47
48
|
},
|
|
48
49
|
ellipsis: _objectSpread({
|
|
49
50
|
rows: rows,
|