Files
hammond/ui/src/app.vue
Akhil Gupta d25c30a7b2 first commit
2021-05-29 15:20:50 +05:30

36 lines
839 B
Vue

<script>
import appConfig from '@src/app.config'
import store from '@state/store'
export default {
page: {
// All subcomponent titles will be injected into this template.
titleTemplate(title) {
title = typeof title === 'function' ? title(this.$store) : title
return title ? `${title} | ${appConfig.title}` : appConfig.title
},
},
created() {
window.addEventListener('resize', this.onResize)
},
destroyed() {
window.removeEventListener('resize', this.onResize)
},
methods: {
onResize(e) {
store.dispatch('utils/checkSize').then((isMobile) => {})
},
},
}
</script>
<template>
<div id="app">
<!--
Even when routes use the same component, treat them
as distinct and create the component again.
-->
<RouterView :key="$route.fullPath" />
</div>
</template>