张恒

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

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