| | |
| | | <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> |
| | |
| | | const isLoginPage = computed(() => { |
| | | return route.path === '/login'; |
| | | }); |
| | | |
| | | let routerKey = computed(() => { |
| | | return `${route.path}?v=${Math.random()}`; |
| | | }); |
| | | // 监听路由变化,滚动到顶部 |
| | | watch( |
| | | () => route.path, |