Sha256: 7bd7c6a53e051d394041d4a03bc5866acb3a4c0d182fd8adc6bbe5af894d5cb9
Contents?: true
Size: 800 Bytes
Versions: 15
Compression:
Stored size: 800 Bytes
Contents
<template> <span class="listing-filter" @click.prevent="filter()">{{label}} <i v-if="activeFilters[type] == 'ASC'" class="fa fa-arrow-down"></i> <i v-if="activeFilters[type] == 'DESC'" class="fa fa-arrow-up"></i> </span> </template> <script> import {mapState} from 'vuex' export default { props: ['label', 'type'], data () { return {} }, computed: { ...mapState('mediasStore', ['activeFilters']) }, methods: { filter () { this.$store.dispatch('mediasStore/setSearchPage', 1) this.$store.dispatch('mediasStore/clearImgListing') this.$store.dispatch('mediasStore/toggleFilter', this.type) this.$store.dispatch('mediasStore/fetchImage') } } } </script> <style media="screen" lang="sass"> .listing-filter cursor: pointer </style>
Version data entries
15 entries across 15 versions & 1 rubygems