<button
v-for="catalog in catalogs"
:key="catalog.id"
:class="{'active': current_catalog==catalog.name}"
@click="change(catalog.name)"
>
{{ catalog.name }}
</button>
data() {
return {
catalogs: [{}, ...],
current_catalog: ''
}
}
如题: 当我更改 current_catalog 的时候, 好像 active 并没有生效?
页面并不刷新, change()只是更改了 current_catalog 的值和发一个 ajax

