You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.9 KiB

<template>
6 months ago
<div class="header-wrap ">
<div class="header-logo">
<img src="../assets/header-logo.png" alt="">
</div>
4 weeks ago
<div class="header-right flex" v-if="showRight">
1 month ago
<!-- <div class="right-item">权限设置</div>
<div class="right-item">岗位设置</div> -->
<el-dropdown trigger="click">
<div class="right-item flex el-dropdown-link">
<img class="right-item-icon" src="../assets/header-icon.png" alt="">
<span>{{user}}</span>
<img src="../assets/header-drop.svg" alt="">
</div>
<el-dropdown-menu slot="dropdown">
1 month ago
<el-dropdown-item><a href="/agent/domainList" target="_blank">我的域名</a></el-dropdown-item>
<el-dropdown-item><div @click="loginOut">退出</div></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
1 month ago
<script>
import { logout } from '@/utils/logout';
1 month ago
export default {
4 weeks ago
props:['showRight'],
data() {
return {
user: ''
}
},
mounted(){
this.user = localStorage.getItem('user')
},
1 month ago
methods: {
loginOut(){
this.$http('POST', '/agentnew/login_out', {}).then(response => {
if(response.status){
logout()
}else{
this.$message.error(response.data.info)
}
}).catch(error => {
console.error(error, 'error')
})
}
1 month ago
}
}
</script>
<style lang="scss" scoped>
1 month ago
a {
text-decoration: none;
font-size: 14px;
font-weight: normal;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
}
a:hover {
color: #006AFF;
}
.flex {
display: flex;
}
.header-wrap {
color: #1E2226;
display: flex;
justify-content: space-between;
width: calc(100% - 64px);
height: 100%;
align-items: center;
position: absolute;
z-index: 9;
.header-logo {
img {
height: 46px;
}
}
.header-right {
width: 362px;
1 month ago
// justify-content: space-between;
justify-content: flex-end;
.el-dropdown-link {
cursor: pointer;
}
.right-item{
padding: 10px;
transition: all .3s;
cursor: pointer;
&:hover{
border-radius: 6px;
background: rgba(255, 255, 255, 0.4);
color: #006AFF;
transition: all .3s;
}
}
.el-dropdown .right-item{
padding: 0 10px;
cursor: pointer;
}
.right-item-icon {
width: 36px;
height: 36px;
}
.right-item-icon+span {
display: inline-block;
margin: 0 6px 0 12px;
}
}
}
</style>