Mengendarai beberapa kelas Vuej
v-bind:class="{ active: isActive, 'text-danger': hasError }"
// or
:class="{ active: isActive, 'text-danger': hasError }"
Lioruby
v-bind:class="{ active: isActive, 'text-danger': hasError }"
// or
:class="{ active: isActive, 'text-danger': hasError }"
// object
const isActive = ref(true)
const hasError = ref(false)
<div
class="static"
:class="{ active: isActive, 'text-danger': hasError }"
></div>
// array
<div :class="[activeClass, errorClass]"></div>