<div
v-for="(item, index) in musicType"
:key="item.type"
:class="index == currentKey ? 'isActive' : 'types' + item.type"
style="margin-left: 45px;cursor: pointer;"
@click="changeType(item.type, index)"
type="text"
>
{{ item.name }}
</div>
data() {
return {
currentKey: 0,
musicType: [
{ type: 0, name: "全部" },
{ type: 7, name: "华语" },
{ type: 96, name: "欧美" },
{ type: 16, name: "韩国" },
{ type: 8, name: "日本" },
],
prevType: "types" + 0,
};
},
changeType(typeId, index) {
this.currentKey = index;
this.queryInfo.type = typeId;
this.prevType = "types" + typeId;
this.getNewMusic();
},