ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

Show hidden v-show exception in [bug report] menu #20700

Open loseguest opened 3 years ago

loseguest commented 3 years ago

Element UI version

2.15.0

OS/Browsers version

win7 chrome

Vue version

2.6.12

Reproduction Link

https://codepen.io/losedguest/pen/YzGBVrR

Steps to reproduce

通過v-show控制menu顯示隱藏時 執行兩次后menu寬度發生變化了 用v-if控制時,隱藏前會閃現以上問題

What is Expected?

多次顯示隱藏樣式應該一致

What is actually happening?

多次顯示隱藏樣式不一致

element-bot commented 3 years ago

Translation of this issue:

Element UI version

2.15.0

OS/Browsers version

win7 chrome

Vue version

2.6.12

Reproduction Link

https://codepen.io/losedguest/pen/YzGBVrR

Steps to reproduce

Control the display and hide of menu through v-show

The width of the menu changes after two runs When using V-IF control, the above problems will flash before hiding

What is Expected?

Multiple show hide styles should be consistent

What is actually happening?

Multiple display Hide Styles inconsistent

Wynnfan commented 3 years ago

不是 bug,如果需要全部隐藏 menu,你需要在menu组件外层包裹一个标签元素

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.