the official reply is that the attribute change will lead to the overall element render
, not setAttribute
. Thank you for your answer. Give + 1
official reply
probably guessed , whether the property change caused the logic of the render inside the render, vue to re-read the value on the props for re-rendering, so the following situation occurred. Please reply and confirm if you have seen the vue source code, 3Q.
< hr >is this the bug? of vue
? browser: mac Google 68
vue: 2.5.16 & & 2.5.17
Code:
<div id="app">
<input :warning="hasWarning" :value="text" @keydown="keydown" />
</div>
new Vue({
el: "-sharpapp",
data: {
text: "vue",
hasWarning: false
},
methods: {
keydown() {
if (1 == 1) {
this.hasWarning = true;
}
this.hasWarning = false;
}
}
})