<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>