-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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菜单打开下级的时候会顿一下 #873
Comments
同样的困惑 |
在性能不高的电脑中比较明显,给人感觉很卡一样 |
看来是我电脑性能不行。。。 |
我自己用的开发电脑打开也有一点卡顿,老板的电脑是旧电脑打开要等上估计1秒 |
同样的苦恼,怎么解决呢 |
解决方案第6条已经给了,我不知道官方解决了吗,我是直接覆盖了样式。 .ant-menu-submenu:first-of-type {
margin-top: 4px;
}
.ant-menu-submenu-title {
margin-top: 0;
} |
感谢,目前官方还存在这个问题。我对比react,按照你给的样式覆盖后,发现还是没有react般丝滑 |
* 间距margin重置的bug * Update index.less 解决margin重合问题,overflow方式会有副作用,采用padding解决margin重合现象。
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 |
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. |
Version
1.3.10
Environment
随便什么环境,官网示例就能测出来
Reproduction link
https://vue.ant.design/components/menu-cn/
Steps to reproduce
打开官网,搜索menu,点击示例侧边栏打开随便一个
What is expected?
内存div,li里面的那个class为ant-menu-submenu-title的那个,margin-top去掉。
What is actually happening?
1 内层div给了top和bottom的margin各4px
2 但是因为div外面就是li,所以div的margin被计算给了li
3 而li的bottom和下一个li的top重叠了
4 此时如果打开这个li,则因为加载子级目录的原因,margin-bottom重新计算给了div,于是高度突然会多处4px,之后才会开始子级展示动画
5 由此造成的类似卡顿体验,令人苦恼
6 希望改进,建议是去掉margin-top。这样既不会丢失原来的期望,也可以解决卡顿问题。唯一的改变是整体ul会少一个margin-top: 4px。
没了。
The text was updated successfully, but these errors were encountered: