Vue遍历,时间段选中
作者:互联网
<!--秒杀时间-->
<div class="sectime">
<div class="item-time "
v-for="(item,index) in dateMenus"
:class="['item-time',index==ctime?'active':'']"
@click="ctime=index;searchList(item)">
<div class="time-clock">{{item | dateFilter('HH:mm')}}</div>
<div class="time-state-on">
<span class="on-text" v-if="index==0">快抢中</span>
<span class="on-over" v-if="index==0">距离结束:{{timedown(alltimes[index])}}</span>
<span class="on-text" v-if="index>0">即将开始</span>
<span class="on-over" v-if="index>0">距离开始:{{timedown(alltimes[index])}}</span>
</div>
</div>
</div>
标签:alltimes,遍历,ctime,index,距离,item,Vue,选中,timedown 来源: https://www.cnblogs.com/beichenxizi/p/14169290.html