Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
a841a166
提交
a841a166
authored
6月 01, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:menu样式及选中修改
上级
1d3d3dae
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
24 行增加
和
19 行删除
+24
-19
index.scss
src/components/layout/index.scss
+11
-11
index.tsx
src/components/layout/menu/index.tsx
+8
-2
index.scss
src/components/layout/title/index.scss
+1
-1
index.tsx
src/components/layout/title/index.tsx
+3
-4
router.ts
src/utils/router.ts
+1
-1
没有找到文件。
src/components/layout/index.scss
浏览文件 @
a841a166
//$page-background: #F6F7FB;
$page-background
:
#f0f2f5
;
$page-background
:
#F3F6FF
;
.layout-view
{
position
:
fixed
;
top
:
0
;
...
...
@@ -46,7 +46,6 @@ $page-background: #f0f2f5;
.ant-menu-dark
{
background
:
transparent
;
//font-size: 14px;
}
.ant-layout-sider-children
{
border-radius
:
10px
;
...
...
@@ -55,7 +54,6 @@ $page-background: #f0f2f5;
.ant-menu-item
{
transform
:
translateX
(
10px
);
.ant-menu-item-icon
{
transform
:
translateX
(
-10px
);
}
...
...
@@ -71,12 +69,14 @@ $page-background: #f0f2f5;
height
:
44px
;
margin-top
:
2px
;
margin-bottom
:
2px
;
color
:
#000
;
}
.ant-menu-item-selected
{
//background: #1a232c
;
background-color
:
#fff
;
border-top-right-radius
:
0
;
border-bottom-right-radius
:
0
;
color
:
#556DA7
;
}
.sider-collapsed
{
...
...
@@ -98,11 +98,11 @@ $page-background: #f0f2f5;
}
}
:where
(
.css-dev-only-do-not-override-1os3dla
)
.ant-menu-dark.ant-menu-inline
.ant-menu-sub.ant-menu-inline
{
:where
(
.css-dev-only-do-not-override-rvhhh3
)
.ant-menu-light.ant-menu-inline
.ant-menu-sub.ant-menu-inline
{
background
:
none
;
}
.layout-logo
{
height
:
100%
;
//width: 170px;
...
...
@@ -118,7 +118,7 @@ $page-background: #f0f2f5;
.logo-text
{
min-width
:
100px
;
font-size
:
18px
;
color
:
#
ffffff
;
color
:
#
000
;
text-align
:
left
;
animation
:
fadeIn
0
.618s
ease-in-out
;
animation-fill-mode
:
forwards
;
...
...
@@ -156,14 +156,14 @@ $page-background: #f0f2f5;
.user-company
{
font-size
:
12px
;
font-weight
:
600
;
color
:
#
ffffff
;
color
:
#
000
;
}
.user-name
{
font-size
:
12px
;
font-weight
:
normal
;
//color: #7f828a
;
color
:
#F6F7FB
;
color
:
#556DA7
;
//
color: #F6F7FB;
}
}
...
...
@@ -180,7 +180,7 @@ $page-background: #f0f2f5;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
color
:
#
ffffff
;
color
:
#
000
;
}
}
...
...
src/components/layout/menu/index.tsx
浏览文件 @
a841a166
...
...
@@ -22,8 +22,7 @@ export function MenuView() {
const
navigate
=
useNavigate
();
// 点击侧边栏事件
const
onOpenChange
:
MenuProps
[
'onOpenChange'
]
=
(
keys
)
=>
{
setOpenKeys
(
keys
);
// console.log('侧边栏事件 -->', keys);
setOpenKeys
([
keys
[
keys
.
length
-
1
]]);
};
// 点击侧边栏事件
const
onSelect
:
MenuProps
[
'onSelect'
]
=
(
keys
)
=>
{
...
...
@@ -62,6 +61,12 @@ export function MenuView() {
// 设置当前选中的项目
setOpenKeys
([
getRoutePid
(
routerList
,
location
.
pathname
).
toString
()]);
// 设置当前选中的项目的subMenu
console
.
log
(
'当前选中menu-->'
,
getRouteID
(
routerList
,
location
.
pathname
),
location
.
pathname
,
routerList
,
);
setSelectedKeys
([
getRouteID
(
routerList
,
location
.
pathname
).
toString
()]);
},
[]);
return
(
...
...
@@ -73,6 +78,7 @@ export function MenuView() {
onOpenChange=
{
onOpenChange
}
mode=
'inline'
items=
{
items
}
style=
{
{
backgroundColor
:
' #F3F6FF '
}
}
/>
{
/* <div className="sider-collapsed" onClick={() => setCollapsed(!collapsed)}> */
}
{
/* <Button */
}
...
...
src/components/layout/title/index.scss
浏览文件 @
a841a166
...
...
@@ -5,7 +5,7 @@
height
:
20px
;
fill
:
currentColor
;
transform
:
translateY
(
-3px
);
color
:
#
fff
;
color
:
#
000
;
}
.hamburger.is-active
{
...
...
src/components/layout/title/index.tsx
浏览文件 @
a841a166
...
...
@@ -38,8 +38,7 @@ export function TitleView() {
return
(
<
Header
style=
{
{
// background: '#ffffff',
background
:
'linear-gradient(137deg,#0165d0,#18a2fe)'
,
background
:
'#fff'
,
height
:
40
,
padding
:
'0 10px'
,
position
:
'relative'
,
...
...
@@ -72,8 +71,8 @@ export function TitleView() {
arrow
>
<
div
className=
'user-action'
>
<
UpOutlined
style=
{
{
fontSize
:
10
,
color
:
'#
ffffff
'
}
}
/>
<
DownOutlined
style=
{
{
fontSize
:
10
,
color
:
'#
ffffff
'
}
}
/>
<
UpOutlined
style=
{
{
fontSize
:
10
,
color
:
'#
000
'
}
}
/>
<
DownOutlined
style=
{
{
fontSize
:
10
,
color
:
'#
000
'
}
}
/>
</
div
>
</
Dropdown
>
</
div
>
...
...
src/utils/router.ts
浏览文件 @
a841a166
...
...
@@ -39,7 +39,7 @@ export const getRouteID = (routerList: RouteObjectType[], path: string) => {
routerList
.
forEach
((
i
)
=>
{
if
(
i
.
path
===
path
)
{
id
=
i
.
meta
?.
id
||
''
;
}
else
if
(
i
.
children
?.
length
)
{
}
else
if
(
i
.
children
?.
length
&&
id
===
''
)
{
id
=
getRouteID
(
i
.
children
,
path
);
}
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论