qinxianzhangyao
2024-04-25 74a7a2bbef241a023110ff24c8e7c84025e267f5
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>