From eeef5d4039d2b3fee6854ddc2789aa23232b2cfb Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期三, 27 九月 2023 17:24:10 +0800
Subject: [PATCH] 登陆页换了背景,加了风险排名

---
 src/components/layout/AppHeader.vue |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/components/layout/AppHeader.vue b/src/components/layout/AppHeader.vue
index 54e7f4a..44099ea 100644
--- a/src/components/layout/AppHeader.vue
+++ b/src/components/layout/AppHeader.vue
@@ -2,6 +2,7 @@
  import { isCollapse } from './isCollapse'
  import { selectedName } from './selectName'
  import BreadCrumb from '@/sfc/BreadCrumb.vue'
+ import Cookie from 'js-cookie'
   export default {
     components:{
       BreadCrumb,
@@ -24,8 +25,12 @@
     // })
   },
     methods: {
-      exit(){
-        this.$router.push('/login') // 鍋囪鐧诲綍鎴愬姛鍚庤烦杞埌 '/dashboard' 椤甸潰
+      handleCommand(command){
+        if(command == 'a' ){
+        Cookie.remove('token')
+        this.$router.push('/login') 
+        }
+       
       }
      }
 }
@@ -47,7 +52,7 @@
       <BreadCrumb></BreadCrumb>
 
    <!-- 涓嬫媺鑿滃崟 -->
-    <el-dropdown>
+    <el-dropdown  @command="handleCommand">
         <span class="el-dropdown-link" >
           <el-avatar class="clickable" :size="50" :src="'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" />   
         <el-icon class="el-icon--right ">
@@ -56,8 +61,7 @@
         </span>
         <template #dropdown>
         <el-dropdown-menu>
-            <el-dropdown-item @click="exit">閫�鍑�</el-dropdown-item>
-            <!-- <el-dropdown-item divided>鍏朵粬</el-dropdown-item> -->
+            <el-dropdown-item command="a">閫�鍑�</el-dropdown-item>
         </el-dropdown-menu>
         </template>
     </el-dropdown>
@@ -75,9 +79,8 @@
     align-items: center;
     color: white;
     background-color: #0093E9;
-background-image: linear-gradient(160deg, #2876aa 0%, #5cbfdd 100%);
-
-
+    background-image: linear-gradient(160deg, #2876aa 0%, #5cbfdd 100%);
+    // width: 100vw;
 
 .el-icon {
         margin-right: 17px;

--
Gitblit v1.9.3