增加退出系统的确认提示。

This commit is contained in:
Kane 2023-03-24 23:30:45 +08:00
parent 50a8ef9b9d
commit 42eff6dad4
3 changed files with 19 additions and 13 deletions

View File

@ -1,10 +0,0 @@
/*
* @Author: Kane
* @Date: 2023-03-04 17:21:37
* @LastEditors: Kane
* @FilePath: /task_schedule/sfc.d.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/

View File

@ -25,15 +25,32 @@
</template>
<script lang="ts">
import { ElMessageBox } from "element-plus";
import { logout } from "@/utils/account.js";
export default {
name: "LayoutHeader",
setup()
{
const Logout = () =>
/**
* 退出登录
*/
const Logout = ():void =>
{
logout();
ElMessageBox.confirm(
"是否要退出系统?",
"",
{
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}
)
.then(() =>
{
// debugger;
logout();
});
};
return { Logout, };

View File

@ -7,7 +7,6 @@
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { type AxiosResponse } from "axios";
import { service as instance } from "./api/request.js";
import { API_URL } from "./api/config.js";