vue找指定标签

<script>
export default { data () { return { tody: TODAY, days: [/*数据在这里*/], activeIndex: null } }, methods: { select (index) { this.activeIndex = index } } } </script> <template> <ul> <li v-for="(day, index) in days" @click="select(index)" :class="{active: index === activeIndex, today: day === today}"> {{day}} </li> </ul> <template>

猜你喜欢

转载自www.cnblogs.com/hdg-caiqi/p/8931829.html