wy 1 rok temu
rodzic
commit
4029641c10
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      src/layout/components/Navbar.vue

+ 3 - 3
src/layout/components/Navbar.vue

@@ -84,7 +84,7 @@
         <span>张李密</span>
       </div>
       <div class="line"></div>
-      <div class="off" @click.native="logout">
+      <div class="off" @click="logout">
         <img src="./assets/off.png" alt="">
         <span>退出登录</span>
       </div>
@@ -214,8 +214,8 @@ export default {
       return s.length === 1 ? "0" + s : s;
     },
     //退出登录
-    async logout() {
-      await this.$store.dispatch("user/logout");
+     logout() {
+       this.$store.dispatch("user/logout");
       this.$router.push(`/login?redirect=${this.$route.fullPath}`);
     },
   },