When the current page number is bound by modelValue, the component is in a controlled state, and the paging display depends on the incoming modelValue, which is generally used with onChange.
When it does not need to be controlled, the current page number can be specified through defaultCurrentPage
:::demo
``` tsx
importReact,{useState}from'react'
...
...
@@ -35,8 +37,8 @@ const App = () => {
exportdefaultApp;
```
:::
### 简单模式
将 mode 设置为 "simple" 来切换到简单模式,此时分页器不会展示具体的页码按钮。
### Simple mode
Pagination can be switched to simple mode with simple mode attribute, and pagination cann't display specific page buttons.
:::demo
``` tsx
importReact,{useState}from'react'
...
...
@@ -61,8 +63,8 @@ export default App;
```
:::
### 显示省略号
设置 force-ellipses 后会展示省略号按钮,点击后可以快速跳转。
### Show ellipses
The ellipses button will display after with force-ellipses attribute, click it can jump quickly.