This commit is contained in:
Liyas Thomas
2020-06-19 12:26:04 +05:30
parent fcbc738088
commit 1587a44cd7
33 changed files with 63 additions and 77 deletions

View File

@@ -2,7 +2,7 @@
<div class="tabs-wrapper">
<div class="tabs">
<ul>
<li v-for="tab in tabs" :class="{ 'is-active': tab.isActive }">
<li v-for="(tab, index) in tabs" :class="{ 'is-active': tab.isActive }" :key="index">
<a :href="tab.href" @click="selectTab(tab)">
<i v-if="tab.icon" class="material-icons">
{{ tab.icon }}
@@ -45,7 +45,7 @@
justify-content: center;
padding: 8px 16px;
color: var(--fg-light-color);
border-radius: 4px;
border-radius: 8px;
cursor: pointer;
.material-icons {
@@ -87,7 +87,7 @@ export default {
methods: {
selectTab({ id }) {
this.tabs.forEach(tab => {
this.tabs.forEach((tab) => {
tab.isActive = tab.id == id
})
},