Skip to content

Commit 8edf209

Browse files
authored
fix[Sidebar]: fixed collapse animation problem (#1690)
1 parent 698df49 commit 8edf209

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/styles/sidebar.scss

+15-5
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,37 @@
8383

8484
.hideSidebar {
8585
.sidebar-container {
86-
width: 36px !important;
86+
width: 54px !important;
8787
}
8888

8989
.main-container {
90-
margin-left: 36px;
90+
margin-left: 54px;
91+
}
92+
93+
.svg-icon {
94+
margin-right: 0px;
9195
}
9296

9397
.submenu-title-noDropdown {
94-
padding-left: 10px !important;
98+
padding: 0 !important;
9599
position: relative;
96100

97101
.el-tooltip {
98-
padding: 0 10px !important;
102+
padding: 0 !important;
103+
.svg-icon {
104+
margin-left: 20px;
105+
}
99106
}
100107
}
101108

102109
.el-submenu {
103110
overflow: hidden;
104111

105112
&>.el-submenu__title {
106-
padding-left: 10px !important;
113+
padding: 0 !important;
114+
.svg-icon {
115+
margin-left: 20px;
116+
}
107117

108118
.el-submenu__icon-arrow {
109119
display: none;

src/styles/variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $menuHover:#263445;
1919
$subMenuBg:#1f2d3d;
2020
$subMenuHover:#001528;
2121

22-
$sideBarWidth: 180px;
22+
$sideBarWidth: 210px;
2323

2424
// the :export directive is the magic sauce for webpack
2525
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass

src/views/layout/components/Sidebar/index.vue

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:background-color="variables.menuBg"
77
:text-color="variables.menuText"
88
:active-text-color="variables.menuActiveText"
9+
:collapse-transition="false"
910
mode="vertical"
1011
>
1112
<sidebar-item v-for="route in permission_routers" :key="route.path" :item="route" :base-path="route.path"/>

0 commit comments

Comments
 (0)