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

menu菜单组件递归后(层级大于2级时),切换菜单时,一级菜单选中肉眼可见的卡顿甚至延迟 #3300

Closed
1 task
yunlongduan opened this issue Dec 2, 2020 · 14 comments

Comments

@yunlongduan
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.2

Environment

win10 20H2、Microsoft Edge( 86.0.622.48 (64 位))、 "vue": "^3.0.3",

Reproduction link

https://github.com/yunlongduan/test

Steps to reproduce

menu菜单组件递归后(层级大于2级时),切换菜单时,一级菜单选中肉眼可见的卡顿甚至延迟

What is expected?

不卡顿不延迟

What is actually happening?

menu菜单组件递归后(层级大于2级时),切换菜单时,一级菜单选中肉眼可见的卡顿甚至延迟

@tangjinzhou
Copy link
Member

确认是 rc.2 ?

@yunlongduan
Copy link
Author

示例版本是beta版本,这个版本递归出现首次菜单无法选中,而后我升级rc.2版本后,发现切换菜单时,不管是展开还是选中都会出现延迟,示例中版本没来的及更新,实在是不好意思,但问题在确实存在的。

@ghost
Copy link

ghost commented Dec 4, 2020

@tangjinzhou I also have this problem. The version is 2.0.0-rc2, which compares the menu of the React version with the menu of the element. The ant-design-vue menu is much slower than these two frameworks

@ghost
Copy link

ghost commented Dec 7, 2020

@tangjinzhou

Most of the reasons for the card discovery are due to this reason:

When the mouse moves to the menu, as long as the mouse moves, the entire menu will be re-rendered, including all the internal menu items. Such repetition caused a lot of dom element updates, resulting in card changes

@tangjinzhou
Copy link
Member

@yunlongduan 你这个示例不卡啊
@anncwb rc.3 also slow ?

@anncwb
Copy link
Contributor

anncwb commented Dec 7, 2020

@tangjinzhou 折叠在菜单多的时候还是会有点卡顿,但是比rc1好了很多。 刚刚试了下 鼠标移动上去确实会触发menuitem的渲染

@yunlongduan
Copy link
Author

@tangjinzhou 上面这个示例版本还没来的及更新,实际开发中把版本更新到rc.2以及数据多放点就会出现。

@Ttou
Copy link

Ttou commented Dec 14, 2020

我这边试了下,子菜单展开的时候动画正常,收缩的时候没有动画了

@L-orz
Copy link

L-orz commented Dec 16, 2020

我这边试了下,子菜单展开的时候动画正常,收缩的时候没有动画了

@tangjinzhou
我这边同样也是收缩没有动画。
还有另一个问题:
使用openKeys和selectKeys,样式更改滞后于数据修改。(比如item-1被取消选中,但是item-1还是具有active的class,此时需要光标移动至item-1,acitve才会被取消)

@zkwolf
Copy link
Member

zkwolf commented Dec 16, 2020

@xiaoLus 收缩没动画的话试试把vue退回3.0.3

@Ttou
Copy link

Ttou commented Dec 16, 2020

@zkwolf 试了下,Vue 3.0.3 收缩动画是正常的

@zkwolf
Copy link
Member

zkwolf commented Dec 16, 2020

嗯,已知bug,等vue发下个版本吧

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants