Answer the question
In order to leave comments, you need to log in
There are two nested template. Changing the v-if condition in the inner template does not re-render. How to be?
Right in the root index.html there are two nested templates, which are controlled by variables A and B, respectively. Let them be both true at first. Changing B does not update the display of the internal template.
<template>
<div v-if = "A">
...
<template>
<div v-if = "B">
<a @click = "onClick">...</a>
</div>
</template>
...
</div>
</template>
onClick: function() {
this.B = false;
}
onClick: function() {
this.B = false;
this.A = !this.A;
this.A = !this.A;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question