first commit
This commit is contained in:
35
ui/src/app.vue
Normal file
35
ui/src/app.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user