Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分页 Pagination 使用元素个数控制分页,自定义page-sizes后 size-picker中的内容默认还是为10 #3369

Closed
gcfkhy opened this issue Jul 28, 2022 · 2 comments

Comments

@gcfkhy
Copy link

gcfkhy commented Jul 28, 2022

TuSimple/naive-ui version (版本)

2.32.0

Vue version (Vue 版本)

3.2.33

Browser and its version (浏览器及其版本)

Google Chrome 版本 103.0.5060.134(正式版本) (64 位)

System and its version (系统及其版本)

Windows 10

Node version (Node 版本)

16.5

Reappearance link (重现链接)

https://codesandbox.io/s/gifted-bird-71eo87?from-embed=&file=/src/Demo.vue

Reappearance steps (重现步骤)

1 将:page-sizes改为 :page-sizes="[8, 16, 24, 32]"
2 刷新页面 size-picker 中默认还是为10

Expected results (期望的结果)

size-picker 中默认为已设置的 :page-sizes 数组中的第一个

Actual results (实际的结果)

size-picker 中默认值为10 非自己已经更改后的

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jul 28, 2022
@sechi747
Copy link
Contributor

因为你没有传递pageSize属性,如果加上pageSize就正常了

@07akioni 07akioni removed the untriaged need to sort label Jul 30, 2022
@gcfkhy
Copy link
Author

gcfkhy commented Aug 1, 2022

因为你没有传递pageSize属性,如果加上pageSize就正常了

pageSize是响应式的 加上切换分页大小会一直保留默认分页大小,因此需使用 default-page-size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants