加入路由守卫和退出系统功能。

This commit is contained in:
2023-01-11 18:13:39 +08:00
parent 4ecbc2e630
commit d995251d7b
8 changed files with 128 additions and 23 deletions

View File

@@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-01-04 11:39:04
* @LastEditors: Kane
* @LastEditTime: 2023-01-09 15:33:54
* @LastEditTime: 2023-01-11 17:07:13
* @FilePath: \admin_system\src\layout\components\Header.vue
* @Description:
*
@@ -23,7 +23,8 @@
</template>
<script>
import { ElMessage } from "element-plus";
//import { ElMessage } from "element-plus";
import { Logout } from "../../utils/api/info/account";
export default {
name: "AppBanner",
@@ -41,13 +42,14 @@ export default {
methods: {
logout()
{
ElMessage({
message: "退出系统",
type: "error",
center: true,
this.$confirm("是否退出系统?", "提示", {
confirmButtonText: "",
cancelButtonText: "",
type: "warning",
}).then(() =>
{
Logout();
});
this.$store.commit("app/SET_ASIDE_COLLAPSE");
},
},
};