张恒

轻微调整整个样式,修改了当禁用系统标题栏时得视觉效果

<template>
<div id="app">
<c-header></c-header>
<router-view></router-view>
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
</div>
</template>
......
......@@ -8,7 +8,7 @@
<!-- 菜单栏位置 -->
<div></div>
<!-- 中间标题位置 -->
<div style="-webkit-app-region: drag;" class="title">标题文字</div>
<div style="-webkit-app-region: drag;" class="title"></div>
<div class="controls-container">
<div class="windows-icon-bg" @click="Mini">
<svg-icon icon-class="mini" class-name="icon-size"></svg-icon>
......@@ -60,7 +60,7 @@ export default {
width: 100%;
height: 30px;
line-height: 30px;
background-color: rgba(60, 60, 60, 0.6);
background-color: #ffffff;
display: flex;
-webkit-app-region: drag;
position: fixed;
......@@ -69,6 +69,9 @@ export default {
.title {
text-align: center;
}
.logo{
margin-left: 20px;
}
.controls-container {
display: flex;
flex-grow: 0;
......@@ -88,7 +91,7 @@ export default {
color: rgba(129, 129, 129, 0.6);
.icon-size {
width: 12px;
height: 12px;
height: 15px;
}
}
.windows-icon-bg:hover {
......
......@@ -74,7 +74,7 @@ export default {
message: "退出成功",
type: "success"
});
location.reload(); // 为了重新实例化vue-router对象 避免bug
this.$router.push('/login')
});
},
set_time() {
......
......@@ -128,7 +128,6 @@ export default {
};
</script>
<style lang="scss" scoped>
@import "@/styles/color.scss";
.menu-wrapper {
/deep/ .el-menu-item,
.el-submenu__title {
......
......@@ -14,6 +14,8 @@ import './error'
import './icons'
import '@/styles/index.scss'
if (!require('../../config').IsUseSysTitle) require('@/styles/custom-title.scss')
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
Vue.use(ElementUI)
......
/* eslint-disable no-tabs */
import router from './router'
import store from './store'
import NProgress from 'nprogress' // Progress 进度条
import 'nprogress/nprogress.css'// Progress 进度条样式
import { Message } from 'element-ui'
const whiteList = ['/login'] // 不重定向白名单
router.beforeEach((to, from, next) => {
NProgress.start()
if (store.getters.token) {
if (to.path === '/login') {
next({ path: '/' })
NProgress.done() // if current page is dashboard will not trigger afterEach hook, so manually handle it
} else {
if (store.getters.roles.length === 0) {
store.dispatch('GetInfo').then(res => { // 拉取用户信息
......@@ -31,11 +27,8 @@ router.beforeEach((to, from, next) => {
next()
} else {
next('/login')
NProgress.done()
}
}
})
router.afterEach(() => {
NProgress.done() // 结束Progress
})
router.afterEach(() => {})
......
$Theme-color:#651FFF;
\ No newline at end of file
// 降低消息高度
// 当启用自定义标题时使用
.el-message {
top: 50px !important;
}
.el-notification {
top: 38px !important;
}
\ No newline at end of file
@import './color.scss';
//to reset element-ui default css
.el-upload {
input[type="file"] {
......@@ -30,20 +29,3 @@
}
}
// 降低消息高度
// 当启用自定义标题时使用
// .el-message {
// top: 50px !important;
// }
// .el-notification {
// top: 38px !important;
// }
// 设置当选中时,popr的背景色被设置为白色的尴尬场景
.el-menu--vertical{
/deep/.el-menu--popup{
/deep/ .el-menu-item.is-active{
background-color: $Theme-color !important;
}
}
}
\ No newline at end of file
......
......@@ -3,7 +3,6 @@
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './color.scss';
body {
-moz-osx-font-smoothing: grayscale;
......
......@@ -13,7 +13,6 @@
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
box-shadow: 2px 0 6px rgba(0,21,41,.15);
transition: width .28s;
width: 256px !important;
height: 100%;
......
......@@ -2,4 +2,3 @@
$menuBg:#ffffff;
$subMenuBg:#1f2d3d;
$menuHover:#001528;
$Theme-color:#651FFF;
......
......@@ -9,7 +9,7 @@
</div>
<div class="bullshit">
<div class="bullshit__oops">OOPS!</div>
<div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
<div class="bullshit__info">您似乎进到了一个次元世界,请点击以下按钮返回主页或者发送错误报告</div>
<a href="/" class="bullshit__return-home">返回首页</a>
</div>
</div>
......