We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.0.0-beta.14
https://codepen.io/403141449/pen/eYJNzed?editors=1011
let { createApp, ref, reactive } = Vue; createApp({ setup() { let a = ref(0); let stringStyle = ref('background-image: url(http://cdn.normalhamal.online/4d98e41247d1e425894a.jpeg)'); return { a, stringStyle, } } }).mount("#app")
<div id="app"> <div :style="stringStyle"></div> <button @click="a "> {{ a }} </button> </div>
图片因为某些原因error了,当a的值改变时会再次请求这张图片
如果stringStyle没有修改background-image,不会再次请求这张图片
stringStyle
或者写成
let style = { backgroundImage: 'background-image: url(http://cdn.normalhamal.online/4d98e41247d1e425894a.jpeg)' }
也不会再次请求这个图片
在vue2.6.11中没有这个问题
只请求一次图片
每次patch都会请求一次图片
The text was updated successfully, but these errors were encountered:
perf: should patch string style when value is changed
4c31a9e
fix vuejs#1309
perf: only patch string style when value has changed (#1310)
d4e9b19
fix #1309
Successfully merging a pull request may close this issue.
Version
3.0.0-beta.14
Reproduction link
https://codepen.io/403141449/pen/eYJNzed?editors=1011
Steps to reproduce
图片因为某些原因error了,当a的值改变时会再次请求这张图片
如果
stringStyle
没有修改background-image,不会再次请求这张图片或者写成
也不会再次请求这个图片
在vue2.6.11中没有这个问题
What is expected?
只请求一次图片
What is actually happening?
每次patch都会请求一次图片
The text was updated successfully, but these errors were encountered: