Making better toggle
This commit is contained in:
@@ -3,7 +3,9 @@
|
|||||||
.sidebar
|
.sidebar
|
||||||
template(v-for='category in categories')
|
template(v-for='category in categories')
|
||||||
nuxt-link(:to='category.slug') {{ category.title }}
|
nuxt-link(:to='category.slug') {{ category.title }}
|
||||||
input(type='checkbox' :checked='cardsShown' @change="toggleCardsShown()")
|
div(@click="toggleCardsShown")
|
||||||
|
div(class="viewToggle" :class="{active: cardsShown}") Cards
|
||||||
|
div(class="viewToggle" :class="{active: !cardsShown}") Table
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
categoryRouteTitle: this.$route.params.category,
|
categoryRouteTitle: this.$route.params.category,
|
||||||
categories: store
|
categories: store
|
||||||
// cardsShown: store.cardsShown,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user