naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

n-pagination pageCount bug

Open AricBa opened this issue 3 years ago • 2 comments
trafficstars

TuSimple/naive-ui version (版本)

2.32.2-beta.0

Vue version (Vue 版本)

3.2.37

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

Chrome 104.0.5112.81 (Official Build) (64-bit)

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

Windows 10

Node version (Node 版本)

16.16.0

Reappearance link (重现链接)

https://codesandbox.io/s/interesting-river-grqbvn?file=/src/App.vue

Reappearance steps (重现步骤)

when pageCount is a huge number, example 60000000 or 100000000, it will result in a memory leak.

Expected results (期望的结果)

pagination display normal

Actual results (实际的结果)

page crash

Remarks (补充说明)

pageCount 设置为一个很大的数时,会引起内存泄漏,导致页面崩溃

AricBa avatar Aug 16 '22 02:08 AricBa

我的建议是不要搞这么大,这个是快速跳转功能引发的

07akioni avatar Aug 16 '22 16:08 07akioni

估摸着四五十万页就是极限了,select 只能放那么多 options,再多了好像 DOM 搞不了那么高

07akioni avatar Aug 16 '22 16:08 07akioni

Closed due to inactivity. Feel free to reopen if you're still having trouble.

jahnli avatar Jan 01 '24 08:01 jahnli