Vue.js - multiple condition class binding
Bind that class attribute to a computed property called myClass
:
<q-tr :class="myClass"></q-tr>
computed:{ myClass(){ if(this.props.row.Name=='Row Name 1' ){ return 'text-bold'; } else if( this.props.row.Name=='Row Name 3'){ return 'text-green'; } else{ return 'bg-white text-black' } }}