当前我有一个 v-tab,它有四个带有图像图标和文本的选项卡。但是,当选项卡处于活动状态时,活动选项卡图标应更改为另一个图像。我该怎么做?
<v-tabs v-model="tabs" class="tabs-menu">
<v-tab
v-for="item in items"
:key="item.id"
>
<img :src="item.icon" />
{{ item.name }}
</v-tab>
</v-tabs>
data() {
return {
tabs: null,
items: [
{ icon: "/planeInactive.svg", name: "plane" },
{ icon: "/hotelInactive.svg", name: "hotel" },
{ icon: "/planehotelInactive.svg", name: "plane + hotel" },
{ icon: "/planeInactive.svg", name: "students" },
],
};
}, Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号