Answers for "vuejs check if element has class"

C#
4

if cluse in class in vue

<div  :class="{'collapse':true , 'show' : key == 0 ? true : false }">
           
</div>
Posted by: Guest on May-29-2021
0

vue if class

<button class="nav-link" id="home-tab" data-bs-toggle="tab" :data-bs-target="'#'+item.code" type="button"
                        role="tab" :aria-controls="'#'+item.code" aria-selected="true" :class="[
                            key == 0 ? 'active' : '',
                        ]">
                    <img :src="item.icon" style="width: 20px">
                    {{ item.name }}
                </button>
Posted by: Guest on January-27-2022

Code answers related to "vuejs check if element has class"

C# Answers by Framework

Browse Popular Code Answers by Language