LeagueStats/client/src/App.vue

44 lines
993 B
Vue
Raw Normal View History

2019-03-30 22:55:48 +00:00
<template>
<div id="app" class="font-sans bg-blue-900 antialiased min-h-screen">
<SVGContainer />
2019-08-23 14:48:16 +00:00
<NotificationsContainer />
<component :is="layout">
<router-view />
</component>
2019-03-30 22:55:48 +00:00
</div>
</template>
<script>
import { mapActions } from 'vuex'
import Default from '@/layouts/Default.vue'
import Home from '@/layouts/Home.vue'
import NotificationsContainer from '@/components/NotificationsContainer.vue'
import SVGContainer from '@/components/SVGContainer.vue'
2019-03-30 22:55:48 +00:00
export default {
components: {
Default,
Home,
NotificationsContainer,
SVGContainer
2019-03-30 22:55:48 +00:00
},
computed: {
layout() {
return (this.$route.meta.layout || 'Default')
}
},
created() {
this.updatePercent()
this.updateSettings({name: 'region'})
this.updateSettings({name: 'recent_searches', isJson: true})
this.updateSettings({name: 'favorites', isJson: true})
},
methods: {
...mapActions('settings', ['updatePercent', 'updateSettings']),
}
2019-03-30 22:55:48 +00:00
}
</script>