return {
historyTimeList: [],
currentHis: 0
};
<ul>
<li
@click="showHistoryTable(index)"
v-for="(item,index) in historyTimeList"
v-bind:class="{ active:index==currentHis}"
:key="index"
>
<i class="el-icon-time blueIcon"></i>
<span>{{item.startDate}}</span>
</li>
</ul>
showHistoryTable(index) {
this.currentHis = index;
}
网友评论