2.0.0-rc.2
win10 20H2、Microsoft Edge( 86.0.622.48 (64 位))、 "vue": "^3.0.3",
https://github.com/yunlongduan/test
menu菜单组件递归后(层级大于2级时),切换菜单时,一级菜单选中肉眼可见的卡顿甚至延迟
不卡顿不延迟
menu菜单组件递归后(层级大于2级时),切换菜单时,一级菜单选中肉眼可见的卡顿甚至延迟
确认是 rc.2 ?
示例版本是beta版本,这个版本递归出现首次菜单无法选中,而后我升级rc.2版本后,发现切换菜单时,不管是展开还是选中都会出现延迟,示例中版本没来的及更新,实在是不好意思,但问题在确实存在的。
@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
@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
@yunlongduan 你这个示例不卡啊
@anncwb rc.3 also slow ?
@tangjinzhou 折叠在菜单多的时候还是会有点卡顿,但是比rc1好了很多。 刚刚试了下 鼠标移动上去确实会触发menuitem的渲染
@tangjinzhou 上面这个示例版本还没来的及更新,实际开发中把版本更新到rc.2以及数据多放点就会出现。
我这边试了下,子菜单展开的时候动画正常,收缩的时候没有动画了
我这边试了下,子菜单展开的时候动画正常,收缩的时候没有动画了
@tangjinzhou
我这边同样也是收缩没有动画。
还有另一个问题:
使用openKeys和selectKeys,样式更改滞后于数据修改。(比如item-1被取消选中,但是item-1还是具有active的class,此时需要光标移动至item-1,acitve才会被取消)
@xiaoLus 收缩没动画的话试试把vue退回3.0.3
@zkwolf 试了下,Vue 3.0.3 收缩动画是正常的
嗯,已知bug,等vue发下个版本吧