moved template logic to method

This commit is contained in:
Roman Cervantes 2019-09-25 15:20:29 -07:00
parent 62b6532a65
commit e85dd71d7a

View file

@ -10,7 +10,7 @@
/>
<span
v-if="ownedPlatform(platform.code) && getGameCount(platform.code) > 0"
v-if="showCount(platform)"
:class="['game-count', textColor]"
>
<i class="fas fa-gamepad" />
@ -56,6 +56,10 @@ export default {
},
methods: {
showCount({ code }) {
return this.ownedPlatform(code) && this.getGameCount(code) > 0
},
changePlatform() {
if (this.clickable) {
this.$store.commit('SET_PLATFORM', this.platform);