refactor(ideContainer): 侧边栏样式和结构重构
- 重新设计了侧边栏的样式,增加了滚动条和过渡效果 - 优化了菜单项的展示方式,支持图标和文本- 移除了折叠功能,简化了侧边栏的结构 - 使用自定义样式替代了 arco-design 的 Sider 组件master
parent
afa5de1030
commit
8061bd169a
@ -1,28 +1,65 @@
|
|||||||
.sider {
|
.sider {
|
||||||
position: fixed;
|
width: 60px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08);
|
||||||
|
z-index: 99;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 99;
|
background-color: var(--color-bg-2);
|
||||||
box-sizing: border-box;
|
}
|
||||||
|
|
||||||
.collapse-btn {
|
.menu-container {
|
||||||
height: 24px;
|
height: calc(100% - 40px); // 为底部留出空间
|
||||||
width: 24px;
|
overflow-y: auto;
|
||||||
background-color: var(--color-fill-1);
|
}
|
||||||
color: var(--color-text-3);
|
|
||||||
border-radius: 2px;
|
.menu-item {
|
||||||
|
padding: 12px 4px;
|
||||||
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// 位置
|
|
||||||
position: absolute;
|
|
||||||
bottom: 12px;
|
|
||||||
right: 12px;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--color-fill-3);
|
background-color: var(--color-fill-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-active {
|
||||||
|
background-color: var(--color-fill-2);
|
||||||
|
color: rgb(var(--primary-6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-item-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 20px;
|
||||||
|
min-width: 16px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item-text {
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
line-height: 1.2;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue