Answer the question
In order to leave comments, you need to log in
How to introduce a parent condition in vue?
How to prescribe the conditionality of the parent, it may not be?
<div class="parent">
<div class="child">
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Turn the child into a component, and then:
<div
v-if="condition"
class="parent"
>
<Child />
</div>
<Child v-else />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question