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
fix(components): [menu] Add menu-item margin when calculating calcSliceIndex
#15699
fix(components): [menu] Add menu-item margin when calculating calcSliceIndex
#15699
Conversation
👋 @zhixiaotong, seems like this is your first time contribution to element-plus.
|
Hello @zhixiaotong, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
🧪 Playground Preview: https://element-plus.run/?pr=15699 |
calcSliceIndex
@kooriookami 打搅了。有几个问题想问下: |
我不知道怎么判定第一次贡献的,这个是自动打上的tag。 image相关的单元测试有点问题,经常容易失败,多跑几次可能就好了。 |
谢谢,如果不影响就没啥问题。我这个又跑了两次,还是失败。。 |
7b43366
to
ccc8266
Compare
@kooriookami 帮忙 这个代码我本地已经打了个补丁包用于生产环境了,目前还在用 |
不是特别奇怪的使用,不会有bug |
是的,我们项目覆盖了 |
这种写法依然保证不了特殊的布局,更好的做法是计算item父容器的宽度,可能改动比较大。 |
嗯,目前item父是ul包含了省略的菜单的宽度,事实上,如果计算了more菜单的宽度加上每个菜单item的宽度,加起来就是父元素宽度了。 |
Fixes #15698
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.