From cb1f69717eed3b6a61b6c61a8934bac752782b2d Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期三, 05 三月 2025 17:00:38 +0800 Subject: [PATCH] 1 --- src/App.vue | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3194fbc..138b2fa 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ <template> <div id="app"> - <router-view /> + <router-view v-if="isRouterAlive"/> <theme-picker /> </div> </template> @@ -8,9 +8,18 @@ <script> import ThemePicker from "@/components/ThemePicker"; -import devPixelRatio from "@/utils/devicePixelRatio.js"; export default { name: "App", + provide() { + return { + reload: this.reload, + }; + }, + data() { + return { + isRouterAlive: true, + }; + }, components: { ThemePicker }, metaInfo() { return { @@ -21,7 +30,14 @@ } }, created() { - new devPixelRatio().init(); // 鍒濆鍖栭〉闈㈡瘮渚� + }, + methods: { + reload() { + this.isRouterAlive = false; + this.$nextTick(function () { + this.isRouterAlive = true; + }); + }, }, }; </script> @@ -29,6 +45,11 @@ #app .theme-picker { display: none; } +/* #app{ + width:1920px; + height:1080px; +} */ + body { margin: 0; -- Gitblit v1.8.0