V
V
Vladimir Golub2021-03-01 18:19:59
Vue.js
Vladimir Golub, 2021-03-01 18:19:59

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

1 answer(s)
D
Denis Ineshin, 2021-03-01
@IonDen

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 question

Ask a Question

731 491 924 answers to any question