1. 数组
<h1 :class="['first', 'second']">hello</h1>
2. 三元表达式
<h1 :class="['first', 'second',flag?'active':'']">
3. 类名
<h1 :class="['first', 'second', { 'active':flag }]">
4. 直接使用类
<h1 :class="{first:true, second:true}"}>hello</h1>
Sort: Trending