Answers for "set class by variable vuejs"

2

bind style with condition in vue

v-bind:style= "[condition ? {styleA} : {styleB}]"
Posted by: Guest on July-20-2020
2

vue if echo class

<div class="defaultclass" :class="condition?' conditionalclasstoappend':''"></div>
Posted by: Guest on February-21-2020

Browse Popular Code Answers by Language