feat: add link for individual props/events/slots/configs/icons

This commit is contained in:
Justineo
2021-10-20 01:11:27 +08:00
parent df2b6892d2
commit b0dcdbb873
162 changed files with 2176 additions and 2073 deletions

View File

@@ -8,7 +8,7 @@
### Go to a specific page
Use the `goto` prop to enable the go to page section.
Use the [`goto`](#props-goto) prop to enable the go to page section.
[[ demo src="/demo/pagination/goto.vue" ]]
@@ -18,14 +18,14 @@ Use the `goto` prop to enable the go to page section.
| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `ui` | `string=` | - | [^ui] |
| `page` | `number` | `1` | Current page index (starts from `1`). |
| `total` | `number` | - | Total page count. |
| `to` | `string|Object` | `''` | [^to] |
| `native` | `boolean` | `false` | Use native links for navigation. |
| `page-size` | `number` | `pagination.pageSize` | [^page-size] |
| `page-sizes` | `Array` | `pagination.pageSizes` | The predefined available page sizes for users to select. |
| `goto` | `boolean` | `false` | Whether to show “goto page number” section. |
| ``ui`` | `string=` | - | [^ui] |
| ``page`` | `number` | `1` | Current page index (starts from `1`). |
| ``total`` | `number` | - | Total page count. |
| ``to`` | `string | Object` | `''` | [^to] |
| ``native`` | `boolean` | `false` | Use native links for navigation. |
| ``page-size`` | `number` | `pagination.pageSize` | [^page-size] |
| ``page-sizes`` | `Array` | `pagination.pageSizes` | The predefined available page sizes for users to select. |
| ``goto`` | `boolean` | `false` | Whether to show “goto page number” section. |
^^^ui
Style variants.
@@ -40,7 +40,7 @@ Style variants.
^^^
^^^to
The page path template. The type is the same as the `to` prop of [`Link`](./link#props) component. When being `string`, the `:page` placeholder will be replaced with the actual page number. When being `Object`, the value will be resolved to string first and be go through the same placeholder replacement process.
The page path template. The type is the same as the [`to`](./link#props-to) prop of [`Link`](./link) component. When being `string`, the `:page` placeholder will be replaced with the actual page number. When being `Object`, the value will be resolved to string first and be go through the same placeholder replacement process.
^^^
^^^page-size
@@ -55,13 +55,13 @@ The count of item in each page.
| Name | Description |
| -- | -- |
| `pagesizechange` | Triggered when `page-size` is changed. The callback parameter list is `(size: number)`, with `size` being the new `page-size` value. |
| `redirect` | Triggered when page links are activated. The callback parameter list is `(page: number, event: Object)`. `page` is the number of the targe page. `event` is the native event object, calling `event.preventDefault` will stop navigation when `native` is `true`. |
| ``pagesizechange`` | Triggered when `page-size` is changed. The callback parameter list is `(size: number)`, with `size` being the new `page-size` value. |
| ``redirect`` | Triggered when page links are activated. The callback parameter list is `(page: number, event: Object)`. `page` is the number of the targe page. `event` is the native event object, calling `event.preventDefault` will stop navigation when `native` is `true`. |
### Global config
### Configs
| Key | Type | Default | Description |
| -- | -- | -- | -- |
| `pagination.pageSize` | `number` | `30` | The count of item in each page. |
| `pagination.pageSizes` | `Array<number>` | `[30, 50, 100]` | The predefined available page sizes for users to select. |
| ``pagination.pageSize`` | `number` | `30` | The count of item in each page. |
| ``pagination.pageSizes`` | `Array<number>` | `[30, 50, 100]` | The predefined available page sizes for users to select. |