vue动态添加很多的class类名
<div class="a" v-for="(item, inx) in currencyData.list" :key="inx" > <div class="titles">{{item.name}}</div> <div :class="{ 'dataStyle': true, 'slactive2': i.id == 'sl0' && i.id == clickId || i.id == 'md1' && i.id == clickId || i.idsj == 'sj1' && i.idsj == clickId || i.idmd == 'mdd1' && i.idmd == clickId || i.idcj == 'cj1' && i.idcj == clickId || i.idpdf == 'pd1' && i.idpdf == clickId || i.idocr == 'oc1' && i.idocr == clickId || i.idlj == 'lj1' && i.idlj == clickId }" v-for="(i, inx) in item.children" :key="inx" >{{i.name}}</div> </div>
第一个类目是默认类名,逗号隔开,添加其他动态类名