@yilianjituan/yilian_dgerm 1.0.5-alpha.3 → 1.0.5-alpha.5
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.
|
@@ -56,7 +56,11 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
56
56
|
exportApi = props.exportApi,
|
|
57
57
|
_props$isScroll = props.isScroll,
|
|
58
58
|
isScroll = _props$isScroll === void 0 ? true : _props$isScroll,
|
|
59
|
-
buttonTheme = props.buttonTheme
|
|
59
|
+
buttonTheme = props.buttonTheme,
|
|
60
|
+
_props$initialValues = props.initialValues,
|
|
61
|
+
initialValues = _props$initialValues === void 0 ? {} : _props$initialValues,
|
|
62
|
+
_props$formProps = props.formProps,
|
|
63
|
+
formProps = _props$formProps === void 0 ? {} : _props$formProps;
|
|
60
64
|
var _useState = useState([]),
|
|
61
65
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
66
|
dataSource = _useState2[0],
|
|
@@ -383,12 +387,13 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
383
387
|
return 'actions';
|
|
384
388
|
}
|
|
385
389
|
};
|
|
386
|
-
return /*#__PURE__*/React.createElement(Form, {
|
|
390
|
+
return /*#__PURE__*/React.createElement(Form, _extends({
|
|
387
391
|
layout: "inline",
|
|
388
392
|
form: form,
|
|
389
393
|
onFinish: beforeSearch,
|
|
390
|
-
autoComplete: "off"
|
|
391
|
-
|
|
394
|
+
autoComplete: "off",
|
|
395
|
+
initialValues: initialValues
|
|
396
|
+
}, formProps), /*#__PURE__*/React.createElement("div", {
|
|
392
397
|
className: "filter-container"
|
|
393
398
|
}, /*#__PURE__*/React.createElement("div", {
|
|
394
399
|
className: "filter-box filter-box-base"
|
|
@@ -456,8 +461,8 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
456
461
|
tableLayout: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.tableLayout) || 'auto'
|
|
457
462
|
}, tableProps, {
|
|
458
463
|
scroll: {
|
|
459
|
-
x: (tableProps === null || tableProps === void 0 || (_tableProps$scroll = tableProps.scroll) === null || _tableProps$scroll === void 0 ? void 0 : _tableProps$scroll.x) || 'max-content',
|
|
460
|
-
y: (tableProps === null || tableProps === void 0 || (_tableProps$scroll2 = tableProps.scroll) === null || _tableProps$scroll2 === void 0 ? void 0 : _tableProps$scroll2.y) || 'max-content'
|
|
464
|
+
x: dataSource.length > 0 ? (tableProps === null || tableProps === void 0 || (_tableProps$scroll = tableProps.scroll) === null || _tableProps$scroll === void 0 ? void 0 : _tableProps$scroll.x) || 'max-content' : 1500,
|
|
465
|
+
y: dataSource.length > 0 ? (tableProps === null || tableProps === void 0 || (_tableProps$scroll2 = tableProps.scroll) === null || _tableProps$scroll2 === void 0 ? void 0 : _tableProps$scroll2.y) || 'max-content' : 1500
|
|
461
466
|
}
|
|
462
467
|
// components={{ header: { cell: ResizableTitle } }}
|
|
463
468
|
// columns={mergedColumns(columns, tableRef, (_columns) =>
|
|
@@ -216,8 +216,8 @@ var CustomTable = function CustomTable(props) {
|
|
|
216
216
|
tableLayout: tableLayout || 'auto'
|
|
217
217
|
}, restProps, {
|
|
218
218
|
scroll: {
|
|
219
|
-
x: (restProps === null || restProps === void 0 || (_restProps$scroll = restProps.scroll) === null || _restProps$scroll === void 0 ? void 0 : _restProps$scroll.x) || 'max-content',
|
|
220
|
-
y: (restProps === null || restProps === void 0 || (_restProps$scroll2 = restProps.scroll) === null || _restProps$scroll2 === void 0 ? void 0 : _restProps$scroll2.y) || 'max-content'
|
|
219
|
+
x: dataSource && dataSource.length > 0 ? (restProps === null || restProps === void 0 || (_restProps$scroll = restProps.scroll) === null || _restProps$scroll === void 0 ? void 0 : _restProps$scroll.x) || 'max-content' : 1500,
|
|
220
|
+
y: dataSource && dataSource.length > 0 ? (restProps === null || restProps === void 0 || (_restProps$scroll2 = restProps.scroll) === null || _restProps$scroll2 === void 0 ? void 0 : _restProps$scroll2.y) || 'max-content' : 1500
|
|
221
221
|
}
|
|
222
222
|
})));
|
|
223
223
|
};
|