add small menu
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="flex">
|
||||
<Nav />
|
||||
<div>
|
||||
<div v-if="authUser" class="w-100">
|
||||
<TopBar />
|
||||
<main>
|
||||
<router-view :key="$route.fullPath" class="main"></router-view>
|
||||
@@ -13,6 +13,7 @@
|
||||
<script>
|
||||
import Nav from "./Nav";
|
||||
import TopBar from "./TopBar";
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
@@ -25,6 +26,11 @@
|
||||
created() {
|
||||
this.$store.dispatch('setPageTitle', this.$route.meta.title)
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
authUser: 'authUser',
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
this.$store.dispatch('setPageTitle', to.meta.title)
|
||||
|
||||
Reference in New Issue
Block a user