From e05a40f68011efbb5d467228841aaf2eb5918108 Mon Sep 17 00:00:00 2001 From: chengj Date: Tue, 26 Apr 2022 13:36:18 +0800 Subject: [PATCH] feat: specify the position of Pagination in Table component (#1849) * feat: table add pagination postion property * feat: specify the postion of Pagination in Table --- src/components/Table/src/types/pagination.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/Table/src/types/pagination.ts b/src/components/Table/src/types/pagination.ts index fd2ecbe3..c705f33f 100644 --- a/src/components/Table/src/types/pagination.ts +++ b/src/components/Table/src/types/pagination.ts @@ -7,9 +7,18 @@ interface PaginationRenderProps { originalElement: any; } +type PaginationPositon = + | 'topLeft' + | 'topCenter' + | 'topRight' + | 'bottomLeft' + | 'bottomCenter' + | 'bottomRight'; + export declare class PaginationConfig extends Pagination { - position?: 'top' | 'bottom' | 'both'; + position?: PaginationPositon[]; } + export interface PaginationProps { /** * total number of data items @@ -96,4 +105,11 @@ export interface PaginationProps { * @type Function */ itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element; + + /** + * specify the position of Pagination + * @default ['bottomRight'] + * @type string[] + */ + position?: PaginationPositon[]; }