Если клик в классе в Vue
<div :class="{'collapse':true , 'show' : key == 0 ? true : false }">
</div>
Mohamad
<div :class="{'collapse':true , 'show' : key == 0 ? true : false }">
</div>
<template>
<span
class="description"
:class="darkMode ? 'dark-theme' : 'light-theme'"
>
This is how you add dynamic classes in Vue.
</span>
</template>
<a :class="[
'btn',
(respond === 'responseFound' ? 'btn-yellow' : 'btn-default'),
(type === 1 ? 'btn-block' : 'btn-xs center-block')
]">
<div :class="{ 'prop-name': boolVar }"></div>
<div v-bind:class="{ active: isActive }"></div>
<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>