introduce vuex
This commit is contained in:
17
src/App.vue
17
src/App.vue
@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
<header v-if="this.$route.path.includes('/s/')">
|
||||
<Navbar />
|
||||
</header>
|
||||
<router-view />
|
||||
<router-view :key="$route.fullPath" />
|
||||
<Footer />
|
||||
</template>
|
||||
<script>
|
||||
@ -16,21 +16,10 @@ import Footer from '@/components/Footer.vue'
|
||||
import Navbar from '@/components/Navbar.vue'
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
name: 'App',
|
||||
components: {
|
||||
Footer,
|
||||
Navbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
memberId: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.memberId = localStorage.getItem("user_id");
|
||||
},
|
||||
updated() {
|
||||
this.memberId = localStorage.getItem("user_id");
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user