feat:CRUD&Table上下文校正

This commit is contained in:
lvxiaojiao 2023-05-06 13:16:00 +08:00
parent 1a6842d9dc
commit 85be381801

View File

@ -1839,7 +1839,12 @@ export default class CRUD extends React.Component<CRUDProps, any> {
const extraProps: Pick<
PaginationProps,
'showPageInput' | 'maxButtons' | 'layout' | 'popOverContainerSelector'
| 'showPageInput'
| 'maxButtons'
| 'layout'
| 'popOverContainerSelector'
| 'total'
| 'perPageAvailable'
> = {};
/** 优先级showPageInput显性配置 > (lastPage > 9) */
@ -1853,6 +1858,11 @@ export default class CRUD extends React.Component<CRUDProps, any> {
extraProps.popOverContainerSelector = (
toolbar as Schema
).popOverContainerSelector;
extraProps.perPageAvailable = (toolbar as Schema).perPageAvailable;
extraProps.total = resolveVariableAndFilter(
(toolbar as Schema).total,
store.data
);
} else {
extraProps.showPageInput = lastPage > 9;
}