vue finds the specified tag

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324784650&siteId=291194637