Переглянути джерело

perf[style]: add scroll bar when the subMenu is too long

Pan 6 роки тому
батько
коміт
be61e7025b
1 змінених файлів з 20 додано та 1 видалено
  1. 20 1
      src/styles/sidebar.scss

+ 20 - 1
src/styles/sidebar.scss

@@ -170,8 +170,27 @@
170 170
   .nest-menu .el-submenu>.el-submenu__title,
171 171
   .el-menu-item {
172 172
     &:hover {
173
-      // You can use $subMenuHover
173
+      // you can use $subMenuHover
174 174
       background-color: $menuHover !important;
175 175
     }
176 176
   }
177
+
178
+  // the scroll bar appears when the subMenu is too long
179
+  >.el-menu--popup {
180
+    max-height: 100vh;
181
+    overflow-y: auto;
182
+
183
+    &::-webkit-scrollbar-track-piece {
184
+      background: #d3dce6;
185
+    }
186
+
187
+    &::-webkit-scrollbar {
188
+      width: 6px;
189
+    }
190
+
191
+    &::-webkit-scrollbar-thumb {
192
+      background: #99a9bf;
193
+      border-radius: 20px;
194
+    }
195
+  }
177 196
 }