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

渲染器重复渲染,导致页面卡顿 #2749

Open
2 tasks done
Lqy4045 opened this issue Jan 14, 2025 · 4 comments
Open
2 tasks done

渲染器重复渲染,导致页面卡顿 #2749

Lqy4045 opened this issue Jan 14, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Lqy4045
Copy link

Lqy4045 commented Jan 14, 2025

可复现的链接(必须为公开链接,仅包含能复现问题的示例代码):

https://codesandbox.io/p/sandbox/vxe-table-3-x-vue-2-6-wen-ti-yan-shi-forked-88uvqx?file=%2Fsrc%2Fviews%2FDemo1.vue

是否已准备好复现链接与示例代码?

  • 我确定已准备好以上复现链接

问题描述与截图:

渲染器一旦页面滚动,会重新渲染,导致页面卡顿,期待大佬的修复
Snipaste_2025-01-14_15-34-36

期望的结果:

只希望初始时候渲染

操作系统:

window10

浏览器版本:

chrome 131.0.6778.265

vue 版本:

vue3.5.13

vxe-pc-ui 版本:

4.10.5

vxe-table 版本:

4.10.5

是否使用当前最新版本?

  • 我确定已经更新到最新版本后依然存在该问题
@Lqy4045 Lqy4045 added the bug Something isn't working label Jan 14, 2025
@wekerSnail
Copy link
Contributor

复杂的组件可以抽离成单独的组件封装,不要直接使用jsx,组件并不会重复实例化,但是vue在diff等时会调用函数来做处理,但已经渲染的组件,实际不会重复渲染,如果直接使用函数组件,则函数每次都会被执行
image

@zhibeen
Copy link

zhibeen commented Jan 18, 2025

但是如何 像 Dem 传递 参数了 一旦传递了就会发生 重复渲染重复实例化

@wekerSnail
Copy link
Contributor

但是如何 像 Dem 传递 参数了 一旦传递了就会发生 重复渲染重复实例化

我测试过传参数不会重渲染重新实例化

@mark980828
Copy link

而且一个单元格内的内容改动 就会重新diff整体表格内容 卡的很

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

4 participants