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

DynamicTable固定表头后,拖动列宽变得非常卡 #230

Open
yaoQshu opened this issue Dec 25, 2024 · 5 comments
Open

DynamicTable固定表头后,拖动列宽变得非常卡 #230

yaoQshu opened this issue Dec 25, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@yaoQshu
Copy link

yaoQshu commented Dec 25, 2024

Hello

发现一个问题,DynamicTable通过:scroll="{ x: '100%', y: 480 }"固定表头后,那些设置了resizable的列,拖动起来变得很卡,感觉很飘,页面响应完全跟不上鼠标。
image

如果表头没有被固定,列的拖动是很顺畅的。
image

@buqiyuan buqiyuan added the help wanted Extra attention is needed label Dec 25, 2024
@hanlehui
Copy link
Contributor

hanlehui commented Dec 25, 2024

useFormMethods.ts
image
修改成这样可以避免触发很多SearchForm中的watch和computed,同时避免无限递归

useI18n.ts
image
这个好像也会无限递归,所以改成了这样

@hanlehui
Copy link
Contributor

固定表头,很飘是Ant Design Vue组件的问题,建议整合VTable

@yaoQshu
Copy link
Author

yaoQshu commented Dec 27, 2024

固定表头,很飘是Ant Design Vue组件的问题,建议整合VTable

感谢回复,还想问一下有没有好的VTable推荐呀

@hanlehui
Copy link
Contributor

如果不嫌麻烦又想要更好看复杂的效果,可以考虑用canvas的表,这个dom表也挺好,改成上面的,在resize时可以避免内存泄漏,我这边试了一下,会顺畅一些,飘的感觉也会减少

@yaoQshu
Copy link
Author

yaoQshu commented Dec 27, 2024

如果不嫌麻烦又想要更好看复杂的效果,可以考虑用canvas的表,这个dom表也挺好,改成上面的,在resize时可以避免内存泄漏,我这边试了一下,会顺畅一些,飘的感觉也会减少

谢谢,但是这远远超出我的知识范围了,我基本没理解你说的意思,仍然非常感谢你,我再自己研究一下。
我现在就想要一个VTable,解决一下固定表头时,拖动很卡的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants