11<template >
2- <div id =" vol-container" :class =" ['vol-theme-' + theme]" >
2+ <div id =" vol-container"
3+ :class =" ['vol-theme-' + theme]" >
34 <div class =" vol-aside" >
45 <div class =" header" >
5- <img v-bind:src =" log " />
6+ <img v-bind:src =" logo " />
67 </div >
78 <div class =" vol-menu" >
89 <el-scrollbar style =" height : 100% " >
9- <VolMenu
10- :theme =" menu_theme"
11- :onSelect =" onSelect"
12- :options =" menuOptions"
13- ></VolMenu >
10+ <VolMenu :theme =" menu_theme"
11+ :onSelect =" onSelect"
12+ :options =" menuOptions" ></VolMenu >
1413 </el-scrollbar >
1514 </div >
1615 </div >
2019 <div class =" header-info" >
2120 <div class =" h-link" >
2221 <ul >
23- <li
24- v-for =" (item, index) in links"
25- :key =" index"
26- v-bind:class =" { actived: selectId == item.id }"
27- >
28- <a href =" javascript:void(0)" @click =" to(item)" >{{
22+ <li v-for =" (item, index) in links"
23+ :key =" index"
24+ v-bind:class =" { actived: selectId == item.id }" >
25+ <a href =" javascript:void(0)"
26+ @click =" to(item)" >{{
2927 item.text
3028 }}</a >
3129 </li >
3230 </ul >
3331 </div >
3432 <div >
35- <img class =" user-header" :src =" userImg" :onerror =" errorImg" />
33+ <img class =" user-header"
34+ :src =" userImg"
35+ :onerror =" errorImg" />
3636 </div >
3737 <div class =" user" >
3838 <span >{{ userName }}</span >
4141 <!-- <span>星期五</span> -->
4242 </div >
4343 <div class =" settings" >
44- <Icon
45- :size =" 20"
46- type =" md-settings"
47- @click ="
44+ <Icon :size =" 20"
45+ type =" md-settings"
46+ @click ="
4847 () => {
4948 theme_moel = true;
5049 }
51- "
52- />
50+ " />
5351 <!-- <Icon type="md-paw" /> -->
5452 </div >
5553 </div >
5654 </div >
5755 <div class =" vol-path" >
5856 <!-- 2020.05.31增加顶部导tabs超出后滚动 -->
59- <Tabs
60- @on-click =" selectNav"
61- :before-remove =" removeNav"
62- v-model =" selectId"
63- type =" card"
64- :animated =" false"
65- class =" header-navigation"
66- >
57+ <Tabs @on-click =" selectNav"
58+ :before-remove =" removeNav"
59+ v-model =" selectId"
60+ type =" card"
61+ :animated =" false"
62+ class =" header-navigation" >
6763 <!-- 2020.07.31增加手动打开tabs -->
68- <TabPane
69- :class =" { active: navIndex == selectId }"
70- :name =" item.navIndex"
71- :closable =" navIndex != 0"
72- v-for =" (item, navIndex) in navigation"
73- :key =" navIndex"
74- :label =" item.name"
75- ></TabPane >
64+ <TabPane :class =" { active: navIndex == selectId }"
65+ :name =" item.navIndex"
66+ :closable =" navIndex != 0"
67+ v-for =" (item, navIndex) in navigation"
68+ :key =" navIndex"
69+ :label =" item.name" ></TabPane >
7670 </Tabs >
7771 </div >
78- <div class =" vol-main" id =" vol-main" >
72+ <div class =" vol-main"
73+ id =" vol-main" >
7974 <el-scrollbar style =" height : 100% " >
8075 <!-- 2020.06.03增加路由切换时加载提示 -->
8176 <loading v-show =" $store.getters.isLoading()" ></loading >
82- <!-- 2020.10.09增加路由keepAlive属性设置不缓存组件(默认缓存组件) -->
77+ <!-- 2020.10.09增加路由keepAlive属性设置不缓存组件(默认缓存组件) -->
8378 <keep-alive >
84- <router-view
85- v-if =" !$route.meta||($route.meta && !$route.meta.hasOwnProperty('keepAlive'))"
86- ></router-view >
79+ <router-view v-if =" !$route.meta||($route.meta && !$route.meta.hasOwnProperty('keepAlive'))" ></router-view >
8780 </keep-alive >
88- <router-view
89- v-if =" $route.meta && $route.meta.hasOwnProperty('keepAlive')"
90- ></router-view >
81+ <router-view v-if =" $route.meta && $route.meta.hasOwnProperty('keepAlive')" ></router-view >
9182 </el-scrollbar >
9283 </div >
9384 </div >
9485 <!-- 2020.04.02增加换皮肤功能 -->
95- <Drawer
96- class =" theme-selector"
97- title =" 选择皮肤颜色"
98- :closable =" false"
99- v-model =" theme_moel"
100- >
101- <div
102- @click =" changeThen(item.name)"
103- class =" item"
104- v-for =" (item, index) in theme_color"
105- :key =" index"
106- :style =" { background: item.color }"
107- ></div >
86+ <Drawer class =" theme-selector"
87+ title =" 选择皮肤颜色"
88+ :closable =" false"
89+ v-model =" theme_moel" >
90+ <div @click =" changeThen(item.name)"
91+ class =" item"
92+ v-for =" (item, index) in theme_color"
93+ :key =" index"
94+ :style =" { background: item.color }" ></div >
10895 </Drawer >
10996 </div >
11097</template >
11198<script >
11299import loading from " @/components/basic/RouterLoading" ;
113100import VolMenu from " @/components/basic/VolMenu.vue" ;
114- let imgUrl = require (" @/assets/imgs/log .png" );
101+ let imgUrl = require (" @/assets/imgs/logo .png" );
115102var $vueIndex;
116103export default {
117- data () {
104+ data () {
118105 return {
119106 menu_theme: " light" ,
120107 theme_moel: false ,
@@ -131,7 +118,7 @@ export default {
131118 userImg: " " ,
132119 selectId: 0 ,
133120 navigation: [{ name: " 首页" , id: 0 , path: " /home" }],
134- log : imgUrl,
121+ logo : imgUrl,
135122 date: " " ,
136123 theme: " blue" ,
137124 links: [
@@ -148,7 +135,7 @@ export default {
148135 VolMenu,
149136 loading,
150137 },
151- created () {
138+ created () {
152139 let theme = localStorage .getItem (" vol_theme" );
153140 if (theme) {
154141 this .theme = theme;
@@ -203,14 +190,14 @@ export default {
203190 this .selectId = 0 ;
204191 },
205192 methods: {
206- changeThen (name ) {
193+ changeThen (name ) {
207194 if (this .theme != name) {
208195 this .theme = name;
209196 }
210197 this .menu_theme = this .theme == " white" ? " dark" : " light" ;
211198 localStorage .setItem (" vol_theme" , name);
212199 },
213- to (item ) {
200+ to (item ) {
214201 /* 2020.07.31增加手动打开tabs*/
215202 if (item .path == " #" ) {
216203 window .open (" https://github.com/cq-panda/Vue.NetCore" );
@@ -230,7 +217,7 @@ export default {
230217 if (item .path == " #" ) return ;
231218 this .open (item);
232219 },
233- open (item , useRoute ) {
220+ open (item , useRoute ) {
234221 /* 2020.07.31增加手动打开tabs*/
235222 let _index = this .navigation .findIndex ((x ) => {
236223 return x .path == item .path ;
@@ -252,19 +239,19 @@ export default {
252239 this .$router .push (item);
253240 }
254241 },
255- setItem (item ) {
242+ setItem (item ) {
256243 /* 2020.07.31增加手动打开tabs*/
257244 localStorage .setItem (
258245 window .location .origin + " _tabs" ,
259246 JSON .stringify (item)
260247 );
261248 },
262- getItem () {
249+ getItem () {
263250 /* 2020.07.31增加手动打开tabs*/
264251 let nav = localStorage .getItem (window .location .origin + " _tabs" );
265252 return nav ? JSON .parse (nav) : null ;
266253 },
267- close (path ) {
254+ close (path ) {
268255 /* 2020.07.31增加手动打开tabs*/
269256 let index = this .navigation .findIndex ((x ) => {
270257 return x .path == path;
@@ -274,14 +261,14 @@ export default {
274261 }
275262 this .removeNav (index);
276263 },
277- selectNav (index ) {
264+ selectNav (index ) {
278265 /* 2020.07.31增加手动打开tabs*/
279266 this .selectId = index;
280267 this .$router .push ({
281268 path: this .navigation [index].path ,
282269 });
283270 },
284- removeNav (_index ) {
271+ removeNav (_index ) {
285272 // 2020.06.02修复关闭tabs时,可能关闭两个tabs的问题
286273 /* 2020.07.31增加手动打开tabs*/
287274 return new Promise (() => {
@@ -301,17 +288,17 @@ export default {
301288 this .navigation .splice (_index, 1 );
302289 });
303290 },
304- getSelectMenuName (id ) {
291+ getSelectMenuName (id ) {
305292 return this .menuOptions .find (function (x ) {
306293 return x .id == id;
307294 });
308295 },
309- onSelect (treeId ) {
296+ onSelect (treeId ) {
310297 /* 2020.07.31增加手动打开tabs*/
311298 var item = $vueIndex .getSelectMenuName (treeId);
312299 this .open (item, false );
313300 },
314- showTime () {
301+ showTime () {
315302 var week = new Array (
316303 " 星期一" ,
317304 " 星期二" ,
@@ -344,10 +331,10 @@ export default {
344331 " " + // 2020.08.30修复首页日期星期天不显示的问题
345332 (week[date .getDay () - 1 ] || week[6 ]);
346333 },
347- handleOpen (key , keyPath ) {
334+ handleOpen (key , keyPath ) {
348335 console .log (key, keyPath);
349336 },
350- handleClose (key , keyPath ) {
337+ handleClose (key , keyPath ) {
351338 console .log (key, keyPath);
352339 },
353340 },
@@ -802,19 +789,19 @@ img:not([src]) {
802789<style lang="less" scoped>
803790// 白色
804791.vol-theme-white {
805- .vol-aside .vol-menu {
806- background : #0159fb ;
807- }
808- // .header-text {
809- // color: #dcdfe6;
810- // }
811- // .vol-header,
812- // .header {
813- // background-color: rgb(45, 140, 240);
792+ // .vol-aside .vol-menu {
793+ // // background: #0159fb;
814794 // }
815795
796+ .header {
797+ background-color : #434956 ;
798+ }
799+
816800 .h-link a :hover {
817- color : #dfdfdf ;
801+ color : #505252 ;
802+ }
803+ .h-link a {
804+ color : #211f1f ;
818805 }
819806 // .h-link .actived {
820807 // border-bottom: 2px solid white;
@@ -845,7 +832,7 @@ img:not([src]) {
845832 }
846833 .header-navigation li .active ,
847834 .header-navigation li :hover {
848- background : #1a89ff ;
835+ // background: #1a89ff;
849836 color : white ;
850837 }
851838 // .vol-header .header-text {
@@ -855,10 +842,10 @@ img:not([src]) {
855842 </style >
856843<style scoped>
857844.vol-theme-white .vol-aside >>> .ivu-menu-submenu-title {
858- background : #0159fb !important ;
845+ /* background: #0159fb !important; */
859846}
860847.vol-theme-white .vol-aside >>> .ivu-menu-opened {
861- background : #006cdf !important ;
848+ /* background: #006cdf !important; */
862849 color : white ;
863850}
864851.vol-aside .vol-menu {
0 commit comments