Skip to content

Commit b8033dc

Browse files
committed
perf: 优化冗余的 css important
1 parent 526c2cf commit b8033dc

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

src/layouts/LeftMode.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $transition-time: 0.35s;
6868
.sidebar-container {
6969
background-color: var(--v3-sidebar-menu-bg-color);
7070
transition: width $transition-time;
71-
width: var(--v3-sidebar-width) !important;
71+
width: var(--v3-sidebar-width);
7272
height: 100%;
7373
position: fixed;
7474
top: 0;
@@ -126,7 +126,7 @@ $transition-time: 0.35s;
126126
127127
.hideSidebar {
128128
.sidebar-container {
129-
width: var(--v3-sidebar-hide-width) !important;
129+
width: var(--v3-sidebar-hide-width);
130130
}
131131
.main-container {
132132
margin-left: var(--v3-sidebar-hide-width);
@@ -140,7 +140,7 @@ $transition-time: 0.35s;
140140
.mobile {
141141
.sidebar-container {
142142
transition: transform $transition-time;
143-
width: var(--v3-sidebar-width) !important;
143+
width: var(--v3-sidebar-width);
144144
}
145145
.main-container {
146146
margin-left: 0px;

src/layouts/LeftTopMode.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $transition-time: 0.35s;
7575
.sidebar-container {
7676
background-color: var(--el-menu-bg-color);
7777
transition: width $transition-time;
78-
width: var(--v3-sidebar-width) !important;
78+
width: var(--v3-sidebar-width);
7979
height: 100%;
8080
position: fixed;
8181
left: 0;
@@ -95,7 +95,7 @@ $transition-time: 0.35s;
9595
9696
.hideSidebar {
9797
.sidebar-container {
98-
width: var(--v3-sidebar-hide-width) !important;
98+
width: var(--v3-sidebar-hide-width);
9999
}
100100
.app-main {
101101
padding-left: var(--v3-sidebar-hide-width);

src/layouts/components/NavigationBar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function logout() {
104104
:deep(.el-sub-menu) {
105105
&.is-active {
106106
.el-sub-menu__title {
107-
color: var(--el-color-primary) !important;
107+
color: var(--el-color-primary);
108108
}
109109
}
110110
}

src/layouts/components/Sidebar/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const tipLineWidth = computed(() => {
9393
height: 100%;
9494
:deep(.scrollbar-wrapper) {
9595
// 限制水平宽度
96-
overflow-x: hidden !important;
96+
overflow-x: hidden;
9797
}
9898
// 滚动条
9999
:deep(.el-scrollbar__bar) {
@@ -106,7 +106,7 @@ const tipLineWidth = computed(() => {
106106
107107
.el-menu {
108108
border: none;
109-
width: 100% !important;
109+
width: 100%;
110110
}
111111
112112
.el-menu--horizontal {
@@ -128,7 +128,7 @@ const tipLineWidth = computed(() => {
128128
:deep(.el-sub-menu) {
129129
&.is-active {
130130
> .el-sub-menu__title {
131-
color: v-bind(activeTextColor) !important;
131+
color: v-bind(activeTextColor);
132132
}
133133
}
134134
}

src/styles/element-plus.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
.el-pagination__jump,
1515
.btn-prev,
1616
.btn-next {
17-
display: none !important;
17+
display: none;
1818
}
1919
}
2020
}

src/styles/theme/core/layouts.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
.el-sub-menu {
2222
&.is-active {
2323
> .el-sub-menu__title {
24-
color: #ffffff !important;
24+
color: #ffffff;
2525
}
2626
}
2727
}

src/styles/vxe-table.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
// 表单
55
&--form-wrapper {
66
.vxe-form {
7-
padding: 10px 20px !important;
8-
margin-bottom: 20px !important;
7+
padding: 10px 20px;
8+
margin-bottom: 20px;
99
}
1010
}
1111

1212
// 工具栏
1313
&--toolbar-wrapper {
1414
.vxe-toolbar {
15-
padding: 20px !important;
15+
padding: 20px;
1616
}
1717
}
1818

1919
// 分页
2020
&--pager-wrapper {
2121
.vxe-pager {
22-
height: 70px !important;
23-
padding: 0 20px !important;
22+
height: 70px;
23+
padding: 0 20px;
2424
&--wrapper {
2525
// 参考 Bootstrap 的响应式设计 WIDTH = 768
2626
@media screen and (max-width: 768px) {
@@ -29,7 +29,7 @@
2929
.vxe-pager--jump,
3030
.vxe-pager--jump-prev,
3131
.vxe-pager--jump-next {
32-
display: none !important;
32+
display: none;
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)