-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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(v-show): v-show takes higher priority than style attribute #3230
Conversation
Another way to deal with the problem is that we parse the string type style into an object, but I think this has two shortcomings:
|
// so we always keep the current `display` value regardless of the `style` value, | ||
// thus handing over control to `v-show`. | ||
if ('_vod' in el) { | ||
style.display = current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this will trigger a reflow? https://csstriggers.com/display
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok, because v-show
always sets the display
property no matter what it is here 🤔
Fix: #2757
This PR is also re-fixed #2583, even though this commit can fix issue #2583, but it causes issue #2757.