From 7f3bd68b67a4f8ae0565b19433299c5e6336f951 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 19 五月 2022 14:46:07 +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