src/App.vue
@@ -1,6 +1,6 @@ <template> <div id="app"> <router-view /> <router-view v-if="isRouterAlive"/> <theme-picker /> </div> </template> @@ -10,6 +10,16 @@ export default { name: "App", provide() { return { reload: this.reload, }; }, data() { return { isRouterAlive: true, }; }, components: { ThemePicker }, metaInfo() { return { @@ -21,6 +31,14 @@ }, created() { }, methods: { reload() { this.isRouterAlive = false; this.$nextTick(function () { this.isRouterAlive = true; }); }, }, }; </script> <style scoped>