style(ideContainer): 修改侧边栏样式和布局

master
钟良源 5 months ago
parent 6a3721deb4
commit 8163646aa8

@ -671,7 +671,7 @@ const FlowEditor: React.FC = () => {
panOnScrollSpeed={0.5}
>
<Background />
<Controls />
{/*<Controls />*/}
<Panel position="top-left">
<div></div>
<Button onClick={saveFlowDataToServer} type="primary"></Button>

@ -106,7 +106,7 @@ const SideBar: React.FC<SideBarProps> = ({ onMenuSelect, selectedKey, identity }
return (
<div
className={styles.sider}
className={styles['sider']}
>
<div className={styles['menu-container']}>
{menu.map((item, index) => (
@ -135,13 +135,9 @@ const SideBar: React.FC<SideBarProps> = ({ onMenuSelect, selectedKey, identity }
}}
onMoving={handleSubMenuResize}
>
<div style={{
width: '100%',
height: '100%',
backgroundColor: '#f5f5f5',
borderRight: '1px solid #ddd',
position: 'relative'
}}>
<div
className={styles['sub-menu']}
>
<Tree
defaultExpandedKeys={['0-0']}
onSelect={(_selectedKeys, info) => {

@ -6,50 +6,61 @@
background-color: var(--color-bg-2);
}
.menu-item {
padding: 12px 4px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease-in-out;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
.menu-container {
.menu-item {
padding: 12px 4px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease-in-out;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
&:hover {
background-color: var(--color-fill-2);
}
&:hover {
background-color: var(--color-fill-2);
}
&-active {
background-color: var(--color-fill-2);
color: rgb(var(--primary-6));
}
}
&-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-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-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;
}
}
}
}
.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;
.sub-menu {
width: 100%;
padding: 0 5px;
height: 100%;
background-color: #fcfcfc;
border-right: 1px solid #ddd;
position: relative;
border-left: 1px solid #ddd;
}
Loading…
Cancel
Save