根据index值动态添加class
html:<li v-for="(item,index)in toplist" :class="{rotate:!!([1,2,5,8].indexOf(index)+1)}">{{item.text}}</li>css:.rotate{ color:red}转载于:https://www.cnblogs.com/wssdx/p/10008308.html...