From f530bffa9717198d5f1f2e57f4f77c7415b5ec87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= Date: Wed, 18 Apr 2018 16:01:07 +0800 Subject: [PATCH] Pagination: update docs for pager-count (#10772) --- examples/docs/en-US/pagination.md | 14 ++++++++++++ examples/docs/es/pagination.md | 14 ++++++++++++ examples/docs/zh-CN/pagination.md | 33 +++++++++++++-------------- packages/pagination/src/pagination.js | 2 +- types/pagination.d.ts | 3 +++ 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/examples/docs/en-US/pagination.md b/examples/docs/en-US/pagination.md index d41502e62..54155fb8c 100644 --- a/examples/docs/en-US/pagination.md +++ b/examples/docs/en-US/pagination.md @@ -73,6 +73,19 @@ If you have too much data to display in one page, use pagination. ``` ::: +### Number of pagers + +:::demo By default, Pagination collapses extra pager buttons when it has more than 7 pages. This can be configured with the `pager-count` attribute. +```html + + +``` +::: + ### Buttons with background color :::demo Set the `background` attribute and the buttons will have a background color. @@ -215,6 +228,7 @@ Add more modules based on your scenario. | page-size | item count of each page | number | — | 10 | | total | total item count | number | — | — | | page-count | total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required | number | — | — | +| pager-count | number of pagers. Pagination collapses when the total page count exceeds this value | number | odd number between 5 and 21 | 7 | | current-page | current page number, supports the .sync modifier | number | — | 1 | | layout | layout of Pagination, elements separated with a comma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total' | | page-sizes | options of item count per page | number[] | — | [10, 20, 30, 40, 50, 100] | diff --git a/examples/docs/es/pagination.md b/examples/docs/es/pagination.md index 9804a96c3..81bca1960 100644 --- a/examples/docs/es/pagination.md +++ b/examples/docs/es/pagination.md @@ -72,6 +72,19 @@ Si tiene que mostrar muchos datos en una página, utilice la paginación. ``` ::: +### Number of pagers + +:::demo By default, Pagination collapses extra pager buttons when it has more than 7 pages. This can be configured with the `pager-count` attribute. +```html + + +``` +::: + ### Paginación pequeña Usa una paginación pequeña en caso de espacio limitado. @@ -201,6 +214,7 @@ Agrega más modulos basados en su escenario. | page-size | cantidad de elementos por página | number | — | 10 | | total | total de elementos | number | — | — | | page-count | total de páginas. Asigna `total` o `page-count` y las páginas serán mostradas; si necesitas `page-sizes`, `total` es **requerido** | number | — | — | +| pager-count | number of pagers. Pagination collapses when the total page count exceeds this value | number | odd number between 5 and 21 | 7 | | current-page | número actual de la página, soporta el modificador .sync | number | — | 1 | | layout | layout de la paginación, elementos separados por coma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total' | | page-sizes | opciones para la cantidad de elementos por página | number[] | — | [10, 20, 30, 40, 50, 100] | diff --git a/examples/docs/zh-CN/pagination.md b/examples/docs/zh-CN/pagination.md index 3f136d1a0..7075f2c4b 100644 --- a/examples/docs/zh-CN/pagination.md +++ b/examples/docs/zh-CN/pagination.md @@ -23,6 +23,19 @@ ``` ::: +### 设置最大页码按钮数 + +:::demo 默认情况下,当总页数超过 7 页时,Pagination 会折叠多余的页码按钮。通过`pager-count`属性可以设置最大页码按钮数。 +```html + + +``` +::: + ### 带有背景色的分页 :::demo 设置`background`属性可以为分页按钮添加背景色。 @@ -103,18 +116,6 @@ :total="400"> -
- Pager 页码数(默认 7 个) - - -