refactor: lint

This commit is contained in:
liyasthomas
2021-05-18 14:57:29 +05:30
parent 7f248da0b3
commit cc27c552af
84 changed files with 1444 additions and 973 deletions

View File

@@ -4,8 +4,8 @@
<ul>
<li
v-for="(tab, index) in tabs"
:class="{ 'is-active': tab.isActive }"
:key="index"
:class="{ 'is-active': tab.isActive }"
:tabindex="0"
@keyup.enter="selectTab(tab)"
>
@@ -24,6 +24,36 @@
</section>
</template>
<script>
export default {
props: {
styles: {
type: String,
default: "",
},
},
data() {
return {
tabs: [],
}
},
created() {
this.tabs = this.$children
},
methods: {
selectTab({ id }) {
this.tabs.forEach((tab) => {
tab.isActive = tab.id === id
})
this.$emit("tab-changed", id)
},
},
}
</script>
<style scoped lang="scss">
.tabs-wrapper {
@apply flex;
@@ -90,35 +120,3 @@
}
}
</style>
<script>
import Section from "../app/Section.vue"
export default {
components: { Section },
props: {
styles: {
type: String,
default: "",
},
},
data() {
return {
tabs: [],
}
},
created() {
this.tabs = this.$children
},
methods: {
selectTab({ id }) {
this.tabs.forEach((tab) => {
tab.isActive = tab.id == id
})
this.$emit("tab-changed", id)
},
},
}
</script>