tanghaolin
8 天以前 9bee4f48db0c5b99b5683545fac737856d94d082
src/App.vue
@@ -3,9 +3,9 @@
   <div class="h-full bg-gray-50 flex flex-col">
      <template v-if="!isLoginPage">
         <AppHeader class="flex-0" />
         <div id="app-page" class="flex-auto !overflow-y-auto bg-[#f4f4f4]" ref="containerRef">
            <div class="w-[63%] mx-auto">
               <router-view></router-view>
         <div id="app-page" class="flex-auto !overflow-y-auto bg-[#ffffff]" ref="containerRef">
            <div class="w-[100%] mx-auto">
               <router-view :key="routerKey"></router-view>
            </div>
            <AppFooter></AppFooter>
         </div>
@@ -30,7 +30,9 @@
const isLoginPage = computed(() => {
   return route.path === '/login';
});
let routerKey = computed(() => {
  return `${route.path}?v=${Math.random()}`;
});
// 监听路由变化,滚动到顶部
watch(
   () => route.path,