Files
vue-learning/企业级管理系统/web/admin_system/src/layout/components/Header.vue

99 lines
2.1 KiB
Vue
Raw Normal View History

2023-01-05 13:18:28 +08:00
<!--
* @Author: Kane
* @Date: 2023-01-04 11:39:04
* @LastEditors: Kane
2023-01-18 17:49:24 +08:00
* @LastEditTime: 2023-01-18 14:18:28
2023-01-05 13:18:28 +08:00
* @FilePath: \admin_system\src\layout\components\Header.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
2023-01-08 23:25:13 +08:00
<div class="app_banner no_select">
2023-01-05 22:26:40 +08:00
<span class="company_name">CPIC</span>
<div class="version_div">
<div>测试版</div>
2023-01-06 18:08:18 +08:00
<div>3.6.7 x64 Build 202208301257</div>
2023-01-05 22:26:40 +08:00
</div>
2023-01-08 23:25:13 +08:00
<div class="buttons_div">
<User style="width: 25px; height; 25px; margin-right: 8px" />
2023-01-09 18:33:31 +08:00
<SwitchButton style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" @click="logout" />
2023-01-08 23:25:13 +08:00
</div>
2023-01-05 22:26:40 +08:00
</div>
2023-01-05 13:18:28 +08:00
</template>
<script>
//import { ElMessage } from "element-plus";
import { Logout } from "../../utils/api/info/account";
2023-01-09 18:33:31 +08:00
2023-01-05 13:18:28 +08:00
export default {
2023-01-05 22:26:40 +08:00
name: "AppBanner",
data()
{
return {};
},
// created() {
// console.log("banner请求数据");
// },
mounted()
{
2023-01-07 18:26:15 +08:00
//console.log("banner请求数据");
2023-01-05 22:26:40 +08:00
},
2023-01-09 18:33:31 +08:00
methods: {
logout()
{
2023-01-18 17:49:24 +08:00
this.$confirm("是否退出系统?", "请确认", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() =>
{
Logout();
2023-01-09 18:33:31 +08:00
});
},
},
2023-01-05 13:18:28 +08:00
};
</script>
<style scoped>
2023-01-05 22:26:40 +08:00
.app_banner {
background-color: var(--banner-background-color);
color: #fff;
display: flex;
justify-content: left;
align-items: center;
2023-01-08 23:25:13 +08:00
padding: 0px 15px 0px 15px;
2023-01-05 22:26:40 +08:00
height: 100%;
2023-01-09 18:33:31 +08:00
position: relative;
2023-01-05 22:26:40 +08:00
}
2023-01-08 23:25:13 +08:00
.no_select {
-webkit-touch-callout: none;
-moz-user-select: none;
/*火狐*/
-webkit-user-select: none;
/*webkit浏览器*/
-ms-user-select: none;
/*IE10*/
-khtml-user-select: none;
/*早期浏览器*/
user-select: none;
}
2023-01-05 22:26:40 +08:00
.app_banner>*+* {
margin-left: 10px;
}
.company_name {
font-size: 2rem;
}
.version_div {
font-size: 0.5rem;
}
2023-01-05 13:18:28 +08:00
2023-01-05 22:26:40 +08:00
.buttons_div {
margin-left: auto;
2023-01-08 23:25:13 +08:00
padding-top: 5px;
/* border: 1px solid salmon; */
2023-01-05 22:26:40 +08:00
}
2023-01-05 13:18:28 +08:00
</style>