From d966cf5f1102429e2d9ea5da5fd319508a5de4ef Mon Sep 17 00:00:00 2001 From: sc Date: Mon, 5 Jul 2021 14:21:15 +0800 Subject: [PATCH] =?UTF-8?q?UP=20=E9=80=80=E5=87=BA=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/userbar.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 3d77b626..74b0e5a6 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -81,12 +81,20 @@ if(command == "uc"){ this.$router.push({path: '/usercenter'}); } - if(command == "outLogin"){ - this.$router.replace({path: '/login'}); - } if(command == "cmd"){ this.$router.push({path: '/cmd'}); } + if(command == "outLogin"){ + this.$confirm('确认是否退出当前用户?','提示', { + type: 'warning', + confirmButtonText: '退出', + confirmButtonClass: 'el-button--danger' + }).then(() => { + this.$router.replace({path: '/login'}); + }).catch(() => { + //取消退出 + }) + } }, //全屏 screen(){