Skip to content

Conversation

@zh-lx
Copy link
Contributor

@zh-lx zh-lx commented Feb 8, 2024

a optimize about #10161close #10151 and won't lead to the issue in #10294

For an element with v-show, when its style changes, el[vShowOldKey] is assigned as style.display, regardless of whether display exists in the style. If v-show === false and there is no display in style, the value of style.display is 'none' at this time, so el[vShowOldKey] will also be incorrectly assigned as 'none'.

The correct logic should be: el[vShowOldKey] = style.display only when display exists in the next style; otherwise, el[vShowOldKey] = ''.

@github-actions
Copy link

github-actions bot commented Feb 8, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 90.4 kB (+121 B) 34.4 kB (+54 B) 31 kB (+34 B)
vue.global.prod.js 148 kB (+121 B) 53.7 kB (+50 B) 48 kB (+81 B)

Usages

Name Size Gzip Brotli
createApp 50.5 kB (+90 B) 19.7 kB (+47 B) 18 kB (+39 B)
createSSRApp 53.8 kB (+90 B) 21.1 kB (+45 B) 19.2 kB (+79 B)
defineCustomElement 52.8 kB (+90 B) 20.5 kB (+51 B) 18.7 kB (+26 B)
overall 64.2 kB (+90 B) 24.8 kB (+42 B) 22.5 kB (+88 B)

@zh-lx
Copy link
Contributor Author

zh-lx commented Feb 9, 2024

@yyx990803 I think this is a correct fix about #10294? If just revert #10161, the issue about #10151 also will reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@vue/compat: Bootstrap-Vue modals not properly displayed since Vue 3.4.9

2 participants