From 85be38180135523ca9914a20d26d71fdd3f102df Mon Sep 17 00:00:00 2001 From: lvxiaojiao Date: Sat, 6 May 2023 13:16:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:CRUD&Table=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=E6=A0=A1=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/CRUD.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/amis/src/renderers/CRUD.tsx b/packages/amis/src/renderers/CRUD.tsx index fd5a6d059..7a5c57613 100644 --- a/packages/amis/src/renderers/CRUD.tsx +++ b/packages/amis/src/renderers/CRUD.tsx @@ -1839,7 +1839,12 @@ export default class CRUD extends React.Component { 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 { 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; }