增加退出系统的确认提示。
This commit is contained in:
parent
50a8ef9b9d
commit
42eff6dad4
|
@ -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.
|
||||
*/
|
||||
|
|
@ -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, };
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue