vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Home Page:http://v2.vuejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using v-show and :style="display: 'block'" simultaneously does not yield the expected results in version 2.7.16.

senwong opened this issue · comments

Version

2.7.16

Reproduction link

codesandbox.io

Steps to reproduce

2.7.16 Demo

when the button is clicked, it initiates a component update. Subsequently, the content div is meant to be hidden. Nevertheless, the current behavior deviates, as the content div is displayed rather than being hidden.

2.7.15 Demo
In version 2.7.15, clicking the button triggers a component update, and as a result, the content div consistently remains hidden.

The version 2.7.16 should not introduce this breaking change.

What is expected?

v-show should have a higher priority than :style.

What is actually happening?

The style is being updated incorrectly.

amazing

Ran into this as well, had to revert to v2.7.15 after receiving a complaint

i never noticed that !

i never noticed that !

The error comes from: f5ef882