Explorar el Código

feat:更新头部的标题

yangyi hace 4 meses
padre
commit
4f950b1698
Se han modificado 4 ficheros con 5 adiciones y 21 borrados
  1. 1 1
      index.html
  2. 2 3
      src/layout/AdminLayout.vue
  3. 1 16
      src/layout/UserLayout.vue
  4. 1 1
      src/style.css

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/logo.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>前端项目模板 Vite + Vue + TS</title>
+    <title>宠物服务管理系统</title>
   </head>
   <body>
     <div id="app"></div>

+ 2 - 3
src/layout/AdminLayout.vue

@@ -3,7 +3,7 @@
     <el-header class="header">
       <div class="header-left" @click="router.push('/')">
         <img src="/logo.svg" alt="logo" class="logo">
-        <h2 class="title">{{ metaStore.title }}</h2>
+        <h2 class="title">宠物服务管理系统</h2>
       </div>
       <h1 class="admin-title">后台管理</h1>
       <div class="header-right">
@@ -55,13 +55,12 @@
 <script setup lang="ts">
 import { computed, ref } from 'vue'
 import { useRoute } from 'vue-router'
-import { useLoginUserStore, useMetaStore } from '../store'
+import { useLoginUserStore } from '../store'
 import router, { adminRoutes } from '../router'
 import { UserFilled } from '@element-plus/icons-vue'
 import { getAuthController } from '../api/auth-controller'
 
 const route = useRoute()
-const metaStore = useMetaStore()
 const loginUserStore = useLoginUserStore()
 
 const login = computed(() => loginUserStore.loginUser.isLogin)

+ 1 - 16
src/layout/UserLayout.vue

@@ -4,7 +4,7 @@
       <el-header class="header">
         <div class="header-left" @click="router.push('/booking')">
           <img :src="metaStore.logo" alt="logo" class="logo">
-          <h2 class="title">{{ metaStore.title }}</h2>
+          <h2 class="title">宠物服务管理系统</h2>
         </div>
         <el-menu
           :default-active="activeIndex"
@@ -49,9 +49,6 @@
         <router-view />
       </el-main>
 
-      <el-footer class="footer">
-        <p>{{ metaStore.title }} &copy; {{ new Date().getFullYear() }}</p>
-      </el-footer>
     </el-container>
   </div>
 </template>
@@ -154,16 +151,4 @@ const logoutHandler = async () => {
   font-size: 20px;
   color: var(--el-color-primary);
 }
-
-.footer {
-  text-align: center;
-  padding: 16px;
-  color: #999;
-  font-size: 14px;
-  border-top: 1px solid #eee;
-}
-
-.footer p {
-  margin: 0;
-}
 </style>

+ 1 - 1
src/style.css

@@ -58,4 +58,4 @@ a:hover {
 .el-menu-item.is-active {
   color: var(--el-color-primary) !important;
 }
-</style>
+