提交 | 用户 | age
|
2a61f6
|
1 |
#app { |
L |
2 |
|
|
3 |
.main-container { |
|
4 |
min-height: 100%; |
|
5 |
transition: margin-left .28s; |
|
6 |
margin-left: $sideBarWidth; |
|
7 |
position: relative; |
|
8 |
} |
|
9 |
|
|
10 |
.sidebar-container { |
|
11 |
transition: width 0.28s; |
|
12 |
width: $sideBarWidth !important; |
|
13 |
background-color: $menuBg; |
|
14 |
height: 100%; |
|
15 |
position: fixed; |
|
16 |
font-size: 0px; |
|
17 |
top: 0; |
|
18 |
bottom: 0; |
|
19 |
left: 0; |
|
20 |
z-index: 1001; |
|
21 |
overflow: hidden; |
|
22 |
|
|
23 |
// reset element-ui css |
|
24 |
.horizontal-collapse-transition { |
|
25 |
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; |
|
26 |
} |
|
27 |
|
|
28 |
.scrollbar-wrapper { |
|
29 |
overflow-x: hidden !important; |
|
30 |
} |
|
31 |
|
|
32 |
.el-scrollbar__bar.is-vertical { |
|
33 |
right: 0px; |
|
34 |
} |
|
35 |
|
|
36 |
.el-scrollbar { |
|
37 |
height: 100%; |
|
38 |
} |
|
39 |
|
|
40 |
&.has-logo { |
|
41 |
.el-scrollbar { |
|
42 |
height: calc(100% - 50px); |
|
43 |
} |
|
44 |
} |
|
45 |
|
|
46 |
.is-horizontal { |
|
47 |
display: none; |
|
48 |
} |
|
49 |
|
|
50 |
a { |
|
51 |
display: inline-block; |
|
52 |
width: 100%; |
|
53 |
overflow: hidden; |
|
54 |
} |
|
55 |
|
|
56 |
.svg-icon { |
|
57 |
margin-right: 16px; |
|
58 |
} |
|
59 |
|
|
60 |
.sub-el-icon { |
|
61 |
margin-right: 12px; |
|
62 |
margin-left: -2px; |
|
63 |
} |
|
64 |
|
|
65 |
.el-menu { |
|
66 |
border: none; |
|
67 |
height: 100%; |
|
68 |
width: 100% !important; |
|
69 |
} |
|
70 |
|
|
71 |
// menu hover |
|
72 |
.submenu-title-noDropdown, |
|
73 |
.el-submenu__title { |
|
74 |
&:hover { |
|
75 |
background-color: $menuHover !important; |
|
76 |
} |
|
77 |
} |
|
78 |
|
|
79 |
.is-active>.el-submenu__title { |
|
80 |
color: $subMenuActiveText !important; |
|
81 |
} |
|
82 |
|
|
83 |
& .nest-menu .el-submenu>.el-submenu__title, |
|
84 |
& .el-submenu .el-menu-item { |
|
85 |
min-width: $sideBarWidth !important; |
|
86 |
background-color: $subMenuBg !important; |
|
87 |
|
|
88 |
&:hover { |
|
89 |
background-color: $subMenuHover !important; |
|
90 |
} |
|
91 |
} |
|
92 |
} |
|
93 |
|
|
94 |
.hideSidebar { |
|
95 |
.sidebar-container { |
|
96 |
width: 54px !important; |
|
97 |
} |
|
98 |
|
|
99 |
.main-container { |
|
100 |
margin-left: 54px; |
|
101 |
} |
|
102 |
|
|
103 |
.submenu-title-noDropdown { |
|
104 |
padding: 0 !important; |
|
105 |
position: relative; |
|
106 |
|
|
107 |
.el-tooltip { |
|
108 |
padding: 0 !important; |
|
109 |
|
|
110 |
.svg-icon { |
|
111 |
margin-left: 20px; |
|
112 |
} |
|
113 |
|
|
114 |
.sub-el-icon { |
|
115 |
margin-left: 19px; |
|
116 |
} |
|
117 |
} |
|
118 |
} |
|
119 |
|
|
120 |
.el-submenu { |
|
121 |
overflow: hidden; |
|
122 |
|
|
123 |
&>.el-submenu__title { |
|
124 |
padding: 0 !important; |
|
125 |
|
|
126 |
.svg-icon { |
|
127 |
margin-left: 20px; |
|
128 |
} |
|
129 |
|
|
130 |
.sub-el-icon { |
|
131 |
margin-left: 19px; |
|
132 |
} |
|
133 |
|
|
134 |
.el-submenu__icon-arrow { |
|
135 |
display: none; |
|
136 |
} |
|
137 |
} |
|
138 |
} |
|
139 |
|
|
140 |
.el-menu--collapse { |
|
141 |
.el-submenu { |
|
142 |
&>.el-submenu__title { |
|
143 |
&>span { |
|
144 |
height: 0; |
|
145 |
width: 0; |
|
146 |
overflow: hidden; |
|
147 |
visibility: hidden; |
|
148 |
display: inline-block; |
|
149 |
} |
|
150 |
} |
|
151 |
} |
|
152 |
} |
|
153 |
} |
|
154 |
|
|
155 |
.el-menu--collapse .el-menu .el-submenu { |
|
156 |
min-width: $sideBarWidth !important; |
|
157 |
} |
|
158 |
|
|
159 |
// mobile responsive |
|
160 |
.mobile { |
|
161 |
.main-container { |
|
162 |
margin-left: 0px; |
|
163 |
} |
|
164 |
|
|
165 |
.sidebar-container { |
|
166 |
transition: transform .28s; |
|
167 |
width: $sideBarWidth !important; |
|
168 |
} |
|
169 |
|
|
170 |
&.hideSidebar { |
|
171 |
.sidebar-container { |
|
172 |
pointer-events: none; |
|
173 |
transition-duration: 0.3s; |
|
174 |
transform: translate3d(-$sideBarWidth, 0, 0); |
|
175 |
} |
|
176 |
} |
|
177 |
} |
|
178 |
|
|
179 |
.withoutAnimation { |
|
180 |
|
|
181 |
.main-container, |
|
182 |
.sidebar-container { |
|
183 |
transition: none; |
|
184 |
} |
|
185 |
} |
|
186 |
} |
|
187 |
|
|
188 |
// when menu collapsed |
|
189 |
.el-menu--vertical { |
|
190 |
&>.el-menu { |
|
191 |
.svg-icon { |
|
192 |
margin-right: 16px; |
|
193 |
} |
|
194 |
.sub-el-icon { |
|
195 |
margin-right: 12px; |
|
196 |
margin-left: -2px; |
|
197 |
} |
|
198 |
} |
|
199 |
|
|
200 |
.nest-menu .el-submenu>.el-submenu__title, |
|
201 |
.el-menu-item { |
|
202 |
&:hover { |
|
203 |
// you can use $subMenuHover |
|
204 |
background-color: $menuHover !important; |
|
205 |
} |
|
206 |
} |
|
207 |
|
|
208 |
// the scroll bar appears when the subMenu is too long |
|
209 |
>.el-menu--popup { |
|
210 |
max-height: 100vh; |
|
211 |
overflow-y: auto; |
|
212 |
|
|
213 |
&::-webkit-scrollbar-track-piece { |
|
214 |
background: #d3dce6; |
|
215 |
} |
|
216 |
|
|
217 |
&::-webkit-scrollbar { |
|
218 |
width: 6px; |
|
219 |
} |
|
220 |
|
|
221 |
&::-webkit-scrollbar-thumb { |
|
222 |
background: #99a9bf; |
|
223 |
border-radius: 20px; |
|
224 |
} |
|
225 |
} |
|
226 |
} |