wy 1 年之前
父節點
當前提交
4029641c10
共有 1 個文件被更改,包括 3 次插入3 次删除
  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}`);
     },
   },