@yilianjituan/yilian_dgerm 1.0.5-alpha.6 → 1.0.5-alpha.8
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.
|
@@ -39,7 +39,7 @@ export interface IPageTemPropsData {
|
|
|
39
39
|
}
|
|
40
40
|
export interface IColumnsProps {
|
|
41
41
|
title: string;
|
|
42
|
-
dataIndex?:
|
|
42
|
+
dataIndex?: any;
|
|
43
43
|
render?: typeEmptyFunc | ((text: string | number, record: any, index: string | number) => any);
|
|
44
44
|
[name: string]: typeEmptyFunc | string | boolean | undefined | number | any;
|
|
45
45
|
}
|
|
@@ -156,7 +156,7 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
156
156
|
key: 'rowIndex',
|
|
157
157
|
align: 'center',
|
|
158
158
|
fixed: 'left',
|
|
159
|
-
|
|
159
|
+
width: 70,
|
|
160
160
|
ellipsis: {
|
|
161
161
|
showTitle: false
|
|
162
162
|
},
|
|
@@ -168,8 +168,9 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
168
168
|
}
|
|
169
169
|
_columns = _columns.map(function (item) {
|
|
170
170
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
171
|
-
minWidth: item.minWidth || item.title.length * 20 + 20,
|
|
172
|
-
|
|
171
|
+
minWidth: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? undefined : item.minWidth || item.title.length * 20 + 20,
|
|
172
|
+
width: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? 70 : item.width,
|
|
173
|
+
ellipsis: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? false : typeof item.ellipsis === 'boolean' ? item.ellipsis : true,
|
|
173
174
|
align: item.align || 'center',
|
|
174
175
|
fixed: item.fixed || (['action', 'operation', 'handle', 'handle_box'].includes(item.dataIndex) ? 'right' : ['rowIndex'].includes(item.key) ? 'left' : undefined)
|
|
175
176
|
});
|
|
@@ -260,9 +261,10 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
260
261
|
setReset(function (prevState) {
|
|
261
262
|
return !prevState;
|
|
262
263
|
});
|
|
263
|
-
|
|
264
264
|
// 重置后默认查询
|
|
265
265
|
setTimeout(function () {
|
|
266
|
+
var pageSize = props.pageSize;
|
|
267
|
+
pageSizeRef.current = pageSize || 20;
|
|
266
268
|
_onSearch();
|
|
267
269
|
});
|
|
268
270
|
};
|
|
@@ -188,8 +188,9 @@ var CustomTable = function CustomTable(props) {
|
|
|
188
188
|
var _columns = _toConsumableArray(columns);
|
|
189
189
|
_columns = _columns.map(function (item) {
|
|
190
190
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
191
|
-
minWidth: item.minWidth || item.title.length * 20 + 20,
|
|
192
|
-
|
|
191
|
+
minWidth: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? undefined : item.minWidth || item.title.length * 20 + 20,
|
|
192
|
+
width: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? 70 : item.width,
|
|
193
|
+
ellipsis: ['index', 'rowIndex'].includes(item.key) || ['index', 'rowIndex'].includes(item.dataIndex) ? false : typeof item.ellipsis === 'boolean' ? item.ellipsis : true,
|
|
193
194
|
align: item.align || 'center',
|
|
194
195
|
fixed: item.fixed || (['action', 'operation', 'handle', 'handle_box'].includes(item.dataIndex) ? 'right' : ['rowIndex'].includes(item.key) ? 'left' : undefined)
|
|
195
196
|
});
|