Commit c188247a authored by 姬鋆屾's avatar 姬鋆屾

修改头部样式

parent 0985a82e
......@@ -45,7 +45,7 @@
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link" style="color: white">
{{ userData.currUserName }}
<i class="el-icon-arrow-down el-icon--right"></i>
<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="update">修改密码</el-dropdown-item>
......@@ -223,7 +223,8 @@ export default {
line-height: 64px;
font-size: 14px;
color: #eee;
background: linear-gradient(90deg, #1845c6 0%, #2999ff 100%);
background: #0857e8;
// background: linear-gradient(90deg, #1845c6 0%, #2999ff 100%);
.layout-menu {
align-items: center;
}
......@@ -245,20 +246,34 @@ export default {
}
.menu-list {
margin-left: 3rem;
li {
a {
display: block;
padding: 0 12px;
height: 100%;
color: #c7e1ff;
font-size: 16px;
&.router-link-active,
&[active] {
//background: #1890ff;
color: #fff;
list-style-type: none;
// border-bottom: 3px solid #fff;
// padding-bottom: 2px;
background-color: #1890ff;
font-weight: 600;
position: relative;
&::after {
content: "";
display: inline-block;
height: 4px;
width: 30%;
background: #fff;
border-radius: 2px;
position: absolute;
bottom: 1px;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
}
}
}
......@@ -303,6 +318,22 @@ export default {
}
.el-dropdown-link {
cursor: pointer;
width: 78px;
height: 32px;
background: hsla(0, 0%, 100%, 0.2);
border-radius: 4px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-weight: 500;
font-size: 14px;
color: #fff;
}
}
......
<template>
<div :trigger="['click']" class="trigger" @click="ontrigger">
<div class="trigger">
<div class="change-btn" :trigger="['click']" @click="ontrigger">
切换站点
</div>
<slot>
<a class="ant-dropdown-link" @click="(e) => e.preventDefault()">
{{ siteName }} <i class="el-icon-arrow-down"></i>
{{ siteName }}
</a>
</slot>
<div slot="overlay" class="select-site" v-if="show">
......@@ -163,6 +166,10 @@ export default {
}
},
ontrigger(e) {
console.log(e);
this.show = !this.show;
return;
if (e.target && e.target.nodeName == "A") {
this.show = !this.show;
}
......@@ -172,14 +179,37 @@ export default {
</script>
<style lang="less" scoped>
.trigger {
display: inline-block;
display: flex;
position: relative;
height: 100%;
align-items: center;
margin-left:6rem;
.change-btn {
width: 78px;
height: 32px;
background: hsla(0, 0%, 100%, 0.2);
border-radius: 4px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-weight: 500;
font-size: 14px;
color: #fff;
cursor: pointer;
}
}
.ant-dropdown-link {
padding: 0 20px;
font-size: 16px;
min-width: 200px;
color: #eee;
font-weight: 500;
display: inline-block;
}
.select-site {
......
......@@ -24,7 +24,7 @@ export default {
window.sessionStorage.setItem("siteid", siteid);
this.SET_sysName(sysName);
this.SET_sysLogo(sysLogo);
this.$router.push("/index"); // 有token直接跳转首页
this.$router.push("/matter/salfhelp/list"); // 有token直接跳转首页
} else {
this.$message({
message: "没有权限,正在跳转登录页面...",
......
......@@ -79,7 +79,7 @@ export default {
this.$store.commit("setUserData", data);
let { token } = data;
sessionStorage.setItem("token", token);
this.$router.push("/index");
this.$router.push("/matter/salfhelp/list");
//成功 创建websocket连接 process.env.VUE_WEBSOCKET_BASE_API +
// createSocket("ws://"+process.env.VUE_APP_BASE_API +"/ws?accessToken="+data.id)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment