Commit e05a40f68011efbb5d467228841aaf2eb5918108

Authored by chengj
Committed by GitHub
1 parent ee85839b

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
@@ -7,9 +7,18 @@ interface PaginationRenderProps { @@ -7,9 +7,18 @@ interface PaginationRenderProps {
7 originalElement: any; 7 originalElement: any;
8 } 8 }
9 9
  10 +type PaginationPositon =
  11 + | 'topLeft'
  12 + | 'topCenter'
  13 + | 'topRight'
  14 + | 'bottomLeft'
  15 + | 'bottomCenter'
  16 + | 'bottomRight';
  17 +
10 export declare class PaginationConfig extends Pagination { 18 export declare class PaginationConfig extends Pagination {
11 - position?: 'top' | 'bottom' | 'both'; 19 + position?: PaginationPositon[];
12 } 20 }
  21 +
13 export interface PaginationProps { 22 export interface PaginationProps {
14 /** 23 /**
15 * total number of data items 24 * total number of data items
@@ -96,4 +105,11 @@ export interface PaginationProps { @@ -96,4 +105,11 @@ export interface PaginationProps {
96 * @type Function 105 * @type Function
97 */ 106 */
98 itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element; 107 itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element;
  108 +
  109 + /**
  110 + * specify the position of Pagination
  111 + * @default ['bottomRight']
  112 + * @type string[]
  113 + */
  114 + position?: PaginationPositon[];
99 } 115 }