Bug Type: Component
Environment
- Vue Version:
3.4.33
- Element Plus Version:
2.7.7
- Browser / OS:
Chrome 126.0.6478.183 / Windows 11
- Build Tool:
Vite
Reproduction
Related Component
el-scrollbar
Reproduction Link
Element Plus Playground
Steps to reproduce
- expand "Navigator One"
- expand "item five"
- scroll down
What is Expected?
horizontal scroll bar show up
What is actually happening?
horizontal scroll bar did not show up
Additional comments
This is an intermittent issue, but in most cases, the bug can be reproduced. I'v tried 15 times in Element Plus Playground, only in my last attempt did the scroll bar show up correctly.
2条答案
按热度按时间hc2pp10m1#
It seems to be due to the fact that the width of ElMenu is always 300px.
2nbm6dog2#
It seems to be due to the fact that the width of ElMenu is always 300px.
我觉得是scrollbar没有取到正确的scrollwidth,所以算出的结果不符合显示的条件;因为,如果你将窗口缩放一下,触发了resize,就可以正确计算了;
似乎是内部的transition组件是直接修改原生dom的,没有走到vue的更新(你可以看一下我pr的方法和示例)