|
@@ -1,12 +1,35 @@
|
|
<template>
|
|
<template>
|
|
- <aside class="aside__top">
|
|
|
|
- <!-- <span
|
|
|
|
|
|
+ <div class="box">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :span="17"><span>张三</span></el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-row justify="end" type="flex" align="middle">
|
|
|
|
+ <span>张三</span>
|
|
|
|
+ <el-dropdown trigger="click" placement="top">
|
|
|
|
+ <span class="el-dropdown-link">
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item>个人中心</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>修改密码</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ <div class="shu"></div>
|
|
|
|
+ <el-button type="primary" @click="loginOut" size="mini"
|
|
|
|
+ >退出</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <!-- <span
|
|
class="iconfont icon-nav toggleNavCollapse"
|
|
class="iconfont icon-nav toggleNavCollapse"
|
|
:class="{active:isSidebarNavCollapse}"
|
|
:class="{active:isSidebarNavCollapse}"
|
|
@click="toggleNavCollapse"
|
|
@click="toggleNavCollapse"
|
|
>
|
|
>
|
|
</span> -->
|
|
</span> -->
|
|
- <div class="aside__top--right">
|
|
|
|
|
|
+
|
|
|
|
+ <!-- <div class="aside__top--right">
|
|
<div class="email">
|
|
<div class="email">
|
|
<span class="iconfont icon-email"><i>40</i></span>
|
|
<span class="iconfont icon-email"><i>40</i></span>
|
|
</div>
|
|
</div>
|
|
@@ -25,147 +48,158 @@
|
|
<div class="quit-system" @click="loginOut">
|
|
<div class="quit-system" @click="loginOut">
|
|
<span class="iconfont icon-quit"></span>
|
|
<span class="iconfont icon-quit"></span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </aside>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { mapState } from 'vuex'
|
|
|
|
|
|
+import { mapState, mapMutations } from "vuex";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- data() {
|
|
|
|
- return {}
|
|
|
|
|
|
+ data() {
|
|
|
|
+ return {};
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(["isSidebarNavCollapse"]),
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...mapMutations(["LOGIN_OUT"]),
|
|
|
|
+ toggleNavCollapse() {
|
|
|
|
+ this.$store.commit("toggleNavCollapse");
|
|
},
|
|
},
|
|
- computed: {
|
|
|
|
- ...mapState(['isSidebarNavCollapse'])
|
|
|
|
|
|
+ loginOut() {
|
|
|
|
+ this.LOGIN_OUT();
|
|
|
|
+ /* 防止切换角色时addRoutes重复添加路由导致出现警告 */
|
|
|
|
+ window.location.reload();
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- toggleNavCollapse() {
|
|
|
|
- this.$store.commit('toggleNavCollapse')
|
|
|
|
- },
|
|
|
|
- loginOut() {
|
|
|
|
- this.$store.commit('LOGIN_OUT')
|
|
|
|
- /* 防止切换角色时addRoutes重复添加路由导致出现警告 */
|
|
|
|
- window.location.reload()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.box {
|
|
|
|
+ margin-bottom: 2%;
|
|
|
|
+ .shu {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 5%;
|
|
|
|
+ border-left: 1px solid black;
|
|
|
|
+ height: 20px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
.aside__top {
|
|
.aside__top {
|
|
- border-bottom: 1px solid #e5e5e5;
|
|
|
|
- height: 50px;
|
|
|
|
- line-height: 50px;
|
|
|
|
- position: fixed;
|
|
|
|
- left: 200px;
|
|
|
|
- top: 0;
|
|
|
|
- right: 0;
|
|
|
|
- background: #fff;
|
|
|
|
- z-index: 1000;
|
|
|
|
- transition: left 0.25s;
|
|
|
|
- .toggleNavCollapse {
|
|
|
|
- display: inline-block;
|
|
|
|
- margin-left: 8px;
|
|
|
|
- padding: 0 10px;
|
|
|
|
- font-size: 26px;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- color: #333;
|
|
|
|
- cursor: pointer;
|
|
|
|
- transition: all 0.5s;
|
|
|
|
- &.active {
|
|
|
|
- transform: rotate(90deg);
|
|
|
|
- }
|
|
|
|
|
|
+ border-bottom: 1px solid #e5e5e5;
|
|
|
|
+ height: 50px;
|
|
|
|
+ line-height: 50px;
|
|
|
|
+ position: fixed;
|
|
|
|
+ left: 200px;
|
|
|
|
+ top: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ background: #fff;
|
|
|
|
+ z-index: 1000;
|
|
|
|
+ transition: left 0.25s;
|
|
|
|
+ .toggleNavCollapse {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-left: 8px;
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ font-size: 26px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ color: #333;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ transition: all 0.5s;
|
|
|
|
+ &.active {
|
|
|
|
+ transform: rotate(90deg);
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- .aside__top--right {
|
|
|
|
|
|
+ .aside__top--right {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 10px;
|
|
|
|
+ top: -1px;
|
|
|
|
+ bottom: 0px;
|
|
|
|
+ > div {
|
|
|
|
+ position: relative;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ text-align: center;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ padding: 0 15px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ &:hover::after {
|
|
|
|
+ transform-origin: 0 0;
|
|
|
|
+ transform: scaleX(1);
|
|
|
|
+ }
|
|
|
|
+ &:first-child:before {
|
|
|
|
+ border: none;
|
|
|
|
+ }
|
|
|
|
+ &::after {
|
|
|
|
+ content: "";
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 2px;
|
|
|
|
+ background: #ef4747;
|
|
|
|
+ transform: scaleX(0);
|
|
|
|
+ transform-origin: right 0;
|
|
|
|
+ transition: transform 0.5s;
|
|
|
|
+ }
|
|
|
|
+ &::before {
|
|
|
|
+ content: "";
|
|
position: absolute;
|
|
position: absolute;
|
|
- right: 10px;
|
|
|
|
- top: -1px;
|
|
|
|
- bottom: 0px;
|
|
|
|
- > div {
|
|
|
|
- position: relative;
|
|
|
|
- display: inline-block;
|
|
|
|
- text-align: center;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- margin-left: 10px;
|
|
|
|
- padding: 0 15px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- &:hover::after {
|
|
|
|
- transform-origin: 0 0;
|
|
|
|
- transform: scaleX(1);
|
|
|
|
- }
|
|
|
|
- &:first-child:before {
|
|
|
|
- border: none;
|
|
|
|
- }
|
|
|
|
- &::after {
|
|
|
|
- content: '';
|
|
|
|
- position: absolute;
|
|
|
|
- left: 0;
|
|
|
|
- bottom: 0;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 2px;
|
|
|
|
- background: #ef4747;
|
|
|
|
- transform: scaleX(0);
|
|
|
|
- transform-origin: right 0;
|
|
|
|
- transition: transform 0.5s;
|
|
|
|
- }
|
|
|
|
- &::before {
|
|
|
|
- content: '';
|
|
|
|
- position: absolute;
|
|
|
|
- height: 20px;
|
|
|
|
- top: 50%;
|
|
|
|
- left: -8px;
|
|
|
|
- margin-top: -10px;
|
|
|
|
- border-left: 1px solid #ccc;
|
|
|
|
- }
|
|
|
|
- &.email {
|
|
|
|
- i {
|
|
|
|
- position: absolute;
|
|
|
|
- left: 18px;
|
|
|
|
- top: -12px;
|
|
|
|
- border-radius: 20px;
|
|
|
|
- background: red;
|
|
|
|
- color: #fff;
|
|
|
|
- text-align: center;
|
|
|
|
- font-size: 12px;
|
|
|
|
- line-height: 1.5;
|
|
|
|
- min-width: 20px;
|
|
|
|
- min-height: 20px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- &.user-msg {
|
|
|
|
- .user-img {
|
|
|
|
- width: 34px;
|
|
|
|
- height: 34px;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- }
|
|
|
|
- .user-name {
|
|
|
|
- color: #758eb5;
|
|
|
|
- padding: 0 4px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .iconfont {
|
|
|
|
- position: relative;
|
|
|
|
- font-size: 24px;
|
|
|
|
- color: #758eb5;
|
|
|
|
- }
|
|
|
|
|
|
+ height: 20px;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: -8px;
|
|
|
|
+ margin-top: -10px;
|
|
|
|
+ border-left: 1px solid #ccc;
|
|
|
|
+ }
|
|
|
|
+ &.email {
|
|
|
|
+ i {
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 18px;
|
|
|
|
+ top: -12px;
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+ background: red;
|
|
|
|
+ color: #fff;
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ line-height: 1.5;
|
|
|
|
+ min-width: 20px;
|
|
|
|
+ min-height: 20px;
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ &.user-msg {
|
|
|
|
+ .user-img {
|
|
|
|
+ width: 34px;
|
|
|
|
+ height: 34px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ }
|
|
|
|
+ .user-name {
|
|
|
|
+ color: #758eb5;
|
|
|
|
+ padding: 0 4px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .iconfont {
|
|
|
|
+ position: relative;
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ color: #758eb5;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.breadcrumb-enter,
|
|
.breadcrumb-enter,
|
|
.breadcrumb-leave-active {
|
|
.breadcrumb-leave-active {
|
|
- opacity: 0;
|
|
|
|
- transform: translateX(20px);
|
|
|
|
|
|
+ opacity: 0;
|
|
|
|
+ transform: translateX(20px);
|
|
}
|
|
}
|
|
|
|
|
|
.breadcrumb-enter-active,
|
|
.breadcrumb-enter-active,
|
|
.breadcrumb-leave-active {
|
|
.breadcrumb-leave-active {
|
|
- transition: all 0.6s;
|
|
|
|
|
|
+ transition: all 0.6s;
|
|
}
|
|
}
|
|
|
|
|
|
.breadcrumb-leave-active {
|
|
.breadcrumb-leave-active {
|
|
- position: absolute;
|
|
|
|
|
|
+ position: absolute;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|