problem description
< my-browser VMI if = "busShowInfo" > < / my-browser >
v-if binds a module to display dynamically, but it can only be displayed according to the initial value, not loaded or destroyed dynamically. With watch snooping, the busShowInfo has changed, but the component is not dynamically loaded. There is no misinformation.
the environmental background of the problems and what methods you have tried
through watch listening, confirm that the property has become true, but the component is not loaded.
related codes
<my-browser v-if="busShowInfo"></my-browser>
data() {
return {
busShowInfo: false
}
}
watch:{
busShowInfo: function (val, oldVal) {
console.log("new: %s, old: %s", val, oldVal)
}
}
what result do you expect? What is the error message actually seen?
expects to control the loading and destruction of components through the busShowInfo property. There is no misinformation.