v-bind: class 语法

v-bind: class 语法

一个对象,对象中的key表示要作用的css类名,对象中的value要计算出布尔值

              true,则作用该类名

              false, 不作用类名

写法:

<span class='text' :class='{ active: index === active }' slot='text'></span>
原文地址:https://www.cnblogs.com/wsm777/p/13861095.html