Skip to content

Commit c06cff0

Browse files
author
283591387@qq.com
committed
修复vue3版本升级后白色与黑色主题颜色显示异常的问题
1 parent 2cf7911 commit c06cff0

File tree

2 files changed

+174
-166
lines changed
  • Vol.Vue3版本/src/views/index
  • 开发版dev/Vue.NetCore/Vol.Vue3版本/src/views/index

2 files changed

+174
-166
lines changed

Vol.Vue3版本/src/views/index/index.less

Lines changed: 87 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
2-
31
.vol-aside {
42
height: 100%;
53
position: absolute;
64
float: left;
75
overflow: hidden;
86
}
7+
.vol-menu{
8+
border: 0 !important;
9+
}
910
.vol-aside .tac {
1011
text-align: left;
1112
}
@@ -78,8 +79,6 @@
7879
overflow: auto;
7980
}
8081

81-
82-
8382
.header {
8483
padding: 5px;
8584
}
@@ -108,7 +107,7 @@
108107
position: relative;
109108
border: 1px solid #dfdfdf;
110109
}
111-
.project-name{
110+
.project-name {
112111
line-height: 60px;
113112
padding: 0 50px 0 20px;
114113
color: #fff;
@@ -146,48 +145,47 @@
146145
cursor: pointer;
147146
}
148147
.header-navigation {
149-
cursor: pointer;
150-
box-shadow: none;
151-
border-bottom: 1px solid #eee;
152-
height: 34px;
153-
/* overflow: hidden; */
154-
line-height: 35px;
155-
display: block;
156-
margin: 0;
157-
padding: 0;
158-
outline: 0;
159-
list-style: none;
160-
position: relative;
161-
z-index: 900;
162-
font-weight: initial;
163-
margin-top: -1px;
148+
cursor: pointer;
149+
box-shadow: none;
150+
border-bottom: 1px solid #eee;
151+
height: 34px;
152+
/* overflow: hidden; */
153+
line-height: 35px;
154+
display: block;
155+
margin: 0;
156+
padding: 0;
157+
outline: 0;
158+
list-style: none;
159+
position: relative;
160+
z-index: 900;
161+
font-weight: initial;
162+
margin-top: -1px;
164163
}
165-
.el-tabs--border-card{
164+
.el-tabs--border-card {
166165
border: none;
167166
}
168-
.header-navigation ::v-deep(.el-tabs__item){
169-
height: 34px;
170-
font-size: 14px;
171-
line-height: 34px;
172-
padding-bottom: 6px;
173-
color: #525252 !important;
174-
position: relative;
175-
margin: 0 4px;
176-
border: 1px solid #e2e2e2;
177-
border-top-right-radius: 4px;
178-
border-top-left-radius: 4px;
179-
// border-bottom: 0px;
167+
.header-navigation ::v-deep(.el-tabs__item) {
168+
height: 34px;
169+
font-size: 14px;
170+
line-height: 34px;
171+
padding-bottom: 6px;
172+
color: #525252 !important;
173+
position: relative;
174+
margin: 0 4px;
175+
border: 1px solid #e2e2e2;
176+
border-top-right-radius: 4px;
177+
border-top-left-radius: 4px;
178+
// border-bottom: 0px;
180179
}
181-
.header-navigation ::v-deep(.el-tabs__item.is-active){
182-
color: #1a81ea !important;
180+
.header-navigation ::v-deep(.el-tabs__item.is-active) {
181+
color: #1a81ea !important;
183182
}
184183
.header-navigation ::v-deep(.el-tabs__nav-prev),
185184
.header-navigation ::v-deep(.el-tabs__nav-next) {
186-
line-height: 35px;
187-
padding-left: 4px;
185+
line-height: 35px;
186+
padding-left: 4px;
188187
}
189188

190-
191189
.vol-header .user span:first-child {
192190
font-size: 15px;
193191
font-weight: bolder;
@@ -203,16 +201,11 @@
203201
display: inline-block;
204202
}
205203

206-
img[src=""],
204+
img[src=''],
207205
img:not([src]) {
208206
opacity: 0;
209207
}
210208

211-
212-
213-
214-
215-
216209
//黑色
217210
.vol-theme-dark {
218211
.header {
@@ -227,7 +220,7 @@ img:not([src]) {
227220
.h-link a:hover {
228221
background: #0c0202;
229222
}
230-
a{
223+
a {
231224
color: #f2f2f2;
232225
}
233226
.h-link a:hover {
@@ -248,19 +241,16 @@ img:not([src]) {
248241
.vol-aside .vol-menu {
249242
background: black;
250243
}
251-
252244
}
253245

254-
255-
256246
.vol-theme-white .vol-aside ::v-deep(.vol-el-menu-item) {
257-
background: black;
247+
background: #2e333b;
258248
color: white;
259249
}
260250
.vol-theme-dark .vol-aside ::v-deep(.vol-menu .el-submenu) {
261251
background: black;
262252
}
263-
.vol-theme-dark .vol-aside ::v-deep(.vol-menu .el-submenu__title *) {
253+
.vol-theme-dark .vol-aside ::v-deep(.vol-menu .el-sub-menu__title *) {
264254
color: #d6d6d6;
265255
}
266256
.vol-theme-dark .vol-aside ::v-deep(.vol-el-menu-item .el-menu-item) {
@@ -280,18 +270,16 @@ img:not([src]) {
280270
.vol-theme-dark .vol-aside ::v-deep(.vol-el-menu-item .el-menu-item:hover) {
281271
background: black;
282272
}
283-
.vol-theme-dark .vol-aside ::v-deep(.el-submenu__title:hover) {
273+
.vol-theme-dark .vol-aside ::v-deep(.el-sub-menu__title) {
284274
background-color: black;
285275
}
286-
.vol-theme-dark .vol-aside ::v-deep(.el-submenu__title:hover *) {
276+
.vol-theme-dark .vol-aside ::v-deep(.el-sub-menu__title:hover) {
277+
background-color: rgb(25, 25, 25);
278+
}
279+
.vol-theme-dark .vol-aside ::v-deep(.el-sub-menu__title:hover *) {
287280
color: white;
288281
}
289282

290-
291-
292-
293-
294-
295283
.vol-theme-red,
296284
.vol-theme-red2 {
297285
.vol-header {
@@ -306,7 +294,7 @@ img:not([src]) {
306294
.h-link .actived {
307295
border-bottom: 2px solid white;
308296
}
309-
297+
310298
.h-link a,
311299
.h-link .actived a,
312300
.vol-header .settings,
@@ -330,10 +318,6 @@ img:not([src]) {
330318
}
331319
}
332320

333-
334-
335-
336-
337321
.vol-theme-orange,
338322
.vol-theme-orange2 {
339323
.header-text {
@@ -371,8 +355,6 @@ img:not([src]) {
371355
}
372356
}
373357

374-
375-
376358
//绿色
377359
.vol-theme-green,
378360
.vol-theme-green2 {
@@ -412,9 +394,6 @@ img:not([src]) {
412394
}
413395
}
414396

415-
416-
417-
418397
//蓝色
419398
.vol-theme-blue,
420399
.vol-theme-blue2 {
@@ -453,8 +432,6 @@ img:not([src]) {
453432
}
454433
}
455434

456-
457-
458435
//白色
459436
.vol-theme-white {
460437
.header {
@@ -482,8 +459,37 @@ img:not([src]) {
482459
z-index: 900;
483460
font-weight: 400;
484461
}
462+
463+
}
464+
.vol-theme-white .project-name{
465+
color: #505050;
466+
}
467+
.vol-theme-white
468+
.vol-aside
469+
::v-deep(.vol-el-menu-item .el-menu-item.is-active),
470+
.vol-theme-white .vol-aside ::v-deep(.menu-item-lv1) {
471+
background: #353941;
472+
}
473+
474+
.vol-theme-white .vol-aside ::v-deep(.menu-item-lv1) {
475+
background: #353941;
476+
color: #d6d6d6;
485477
}
486478

479+
.vol-theme-white .vol-aside ::v-deep(.vol-el-menu-item .el-menu-item:hover) {
480+
background: #353941;
481+
}
482+
.vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title) {
483+
background-color: #353941;
484+
}
485+
.vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title:hover) {
486+
background-color: rgb(47, 46, 46);
487+
}
488+
.vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title),
489+
.vol-theme-white .vol-aside ::v-deep(.el-menu-item),
490+
.vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title:hover *) {
491+
color: #bababa;
492+
}
487493

488494
// .vol-theme-white .vol-aside ::v-deep(.vol-el-menu-item) {
489495
// background: #363e4f;
@@ -496,7 +502,7 @@ img:not([src]) {
496502
// .vol-theme-white .vol-aside ::v-deep(.vol-menu) {
497503
// background: #515a6e;
498504
// }
499-
// .vol-theme-white .vol-aside ::v-deep(.vol-menu .el-submenu__title *),
505+
// .vol-theme-white .vol-aside ::v-deep(.vol-menu .el-sub-menu__title *),
500506
// .vol-theme-white .vol-aside ::v-deep(.menu-item-lv1 *) {
501507
// color: #d6d6d6;
502508
// }
@@ -511,10 +517,10 @@ img:not([src]) {
511517
// .vol-theme-white .vol-aside ::v-deep(.vol-el-menu-item .el-menu-item:hover) {
512518
// background: #6a758c;
513519
// }
514-
// .vol-theme-white .vol-aside ::v-deep(.el-submenu__title:hover) {
520+
// .vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title:hover) {
515521
// background-color: #525865;
516522
// }
517-
// .vol-theme-white .vol-aside ::v-deep(.el-submenu__title:hover *) {
523+
// .vol-theme-white .vol-aside ::v-deep(.el-sub-menu__title:hover *) {
518524
// color: white;
519525
// }
520526

@@ -540,10 +546,9 @@ img:not([src]) {
540546
// background-color: #19be6b;
541547
// }
542548

543-
544549
.theme-selector {
545-
height: 100%;
546-
padding-left: 16px;
550+
height: 100%;
551+
padding-left: 16px;
547552
.item {
548553
cursor: pointer;
549554
width: 60px;
@@ -556,13 +561,12 @@ img:not([src]) {
556561
}
557562
}
558563

559-
560564
.collapse-menu {
561-
font-size: 21px;
562-
color: #fff;
563-
line-height: 60px;
564-
position: absolute;
565-
top: 0;
566-
right: 5px;
567-
cursor: pointer;
565+
font-size: 21px;
566+
color: #fff;
567+
line-height: 60px;
568+
position: absolute;
569+
top: 0;
570+
right: 5px;
571+
cursor: pointer;
568572
}

0 commit comments

Comments
 (0)