I need some help with a VUEJS project. I would like to render a component depending on whether a certain class is present.
LOGIC
If (class a) is present render (component a) If (class b) is present render (component b) If neither (class a) or (class b) is present render neither
<section class="card" v-if="">
<h3>{{title}}</h3>
<p>{{subtitle}}</p>
</section>
You can do this
Template:
Just remove the
class-a
orclass-b
accordinglyScript: