From 019abc739d9e231c2ebfe9ca537f82e2e1843496 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期日, 24 八月 2025 21:24:39 +0800
Subject: [PATCH] 课程班级显示

---
 src/layout/baseLayout.vue |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/layout/baseLayout.vue b/src/layout/baseLayout.vue
index eed2949..847ca3f 100644
--- a/src/layout/baseLayout.vue
+++ b/src/layout/baseLayout.vue
@@ -3,27 +3,45 @@
     <Header class="header"></Header>
     <div class="layoutContentBox" id="layout">
       <RouterView />
-      <Footer class="footer"></Footer>
     </div>
+    <Footer class="footer"></Footer>
+    <login ref="loginRef"></login>
   </div>
 </template>
 
 <script setup lang="ts">
 import Header from './components/headerPage.vue'
 import Footer from './components/footerPage.vue'
+import login from './components/login.vue'
+import { provide, ref, watch } from 'vue'
+import { useRouter } from 'vue-router'
+const router = useRouter()
+
+watch(
+  () => router.currentRoute.value.path,
+  (toPath) => {
+    const layout = document.getElementById('layout')
+    if (layout) layout.scrollTo(0, 0)
+  },
+  { immediate: true, deep: true },
+)
+const logIn = () => {
+  loginRef.value.logIn()
+}
+const loginRef = ref()
+provide('logIn', logIn)
 </script>
 
 <style lang="less" scoped>
 .layoutBox {
   width: 100%;
-  height: 100vh;
+  height: 100%;
   display: flex;
   flex-direction: column;
   background-color: #fff;
 
   .layoutContentBox {
     flex: 1;
-    height: auto;
   }
 
   .header {
@@ -35,7 +53,6 @@
 @media screen and (min-width: 1200px) {
   .layoutContentBox {
     flex: 1;
-    overflow: auto;
   }
 }
 </style>

--
Gitblit v1.9.1