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

n-pagination 组件当item-count的值达到千万级别的时候,切换页码的时候会感觉明显卡顿。 #5251

Closed
zerox-v opened this issue Sep 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@zerox-v
Copy link

zerox-v commented Sep 18, 2023

TuSimple/naive-ui version (版本)

2.34.4

Vue version (Vue 版本)

3.3.4

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

Chrome(116.0.5845.188)

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

window11

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/elegant-cookies-9sclhz?file=/src/Demo.vue

Reappearance steps (重现步骤)

1、设置item-count 为37367580
2、点击页码 会发现很久才能切换到对应的页码上面

Expected results (期望的结果)

期望页码的切换速度和item-count 为100 的时一样快

Actual results (实际的结果)

实际item-count 的值越大,切换页码的时候响应就越慢

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Sep 18, 2023
@jizai1125
Copy link
Contributor

jizai1125 commented Sep 20, 2023

数据太大的话,会构造大量的快速跳转的下拉菜单数据,应该由于这个原因

items.push({
type: 'fast-forward',
active: false,
label: undefined,
options: createRange(middleEnd + 1, lastPage - 1)
})

@07akioni 07akioni added bug Something isn't working and removed untriaged need to sort labels Dec 18, 2023
@07akioni
Copy link
Collaborator

确实应该提供一个选项关掉现在的下拉菜单交互

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants