From 73a9ae225888adae528d9b06233f65da04d883db Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期五, 20 五月 2022 13:42:22 +0800
Subject: [PATCH] 其他业务
---
src/pages/components/showIndexTitle.vue | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/pages/components/showIndexTitle.vue b/src/pages/components/showIndexTitle.vue
index 91c2402..0a5c2e8 100644
--- a/src/pages/components/showIndexTitle.vue
+++ b/src/pages/components/showIndexTitle.vue
@@ -60,7 +60,7 @@
<h1>鏂囨。涓績</h1>
</div>
</el-menu-item>
- <el-menu-item index="/login">
+ <el-menu-item @click="goOut">
<div class="showIndex-block">
<h1>閫�鍑虹櫥褰�</h1>
</div>
@@ -82,7 +82,18 @@
this.$route.meta.routerParent && (this.activeIndex = '/' + this.$route.meta.routerParent)
},
methods: {
+ goOut() {
+ this.$confirm('鏄惁閫�鍑虹郴缁�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('logout').then(res => {
+ this.$router.push('/login')
+ })
+ })
+ }
},
};
</script>
--
Gitblit v1.9.1