Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
3e523776
Commit
3e523776
authored
Apr 11, 2022
by
leimo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-featMenu' into 'v2'
feat: 导航菜单交互样式优化 See merge request linkseeks-design/pro-admin!24
parents
1a4f6fe5
c6f89952
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
9 deletions
+121
-9
global.css
src/global.css
+2
-2
global.less
src/global.less
+3
-3
theme.less
src/global/styles/theme.less
+1
-0
MenuSlider.tsx
src/layouts/components/MenuSlider.tsx
+12
-1
MenuSlider.less
src/layouts/styles/MenuSlider.less
+103
-3
No files found.
src/global.css
View file @
3e523776
...
@@ -230,9 +230,9 @@ ol {
...
@@ -230,9 +230,9 @@ ol {
left
:
0px
;
left
:
0px
;
margin
:
auto
0
;
margin
:
auto
0
;
}
}
#root
.ant-menu
:not
(
.ant-menu-horizontal
)
.ant-menu-item-selected
{
/*
#root .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background: none;
background: none;
}
}
*/
#root
.ant-menu-sub
.ant-menu-item-selected
.lx-menu-item-link
::before
{
#root
.ant-menu-sub
.ant-menu-item-selected
.lx-menu-item-link
::before
{
border
:
1px
solid
#00B37A
;
border
:
1px
solid
#00B37A
;
}
}
...
...
src/global.less
View file @
3e523776
...
@@ -288,9 +288,9 @@ ol {
...
@@ -288,9 +288,9 @@ ol {
}
}
}
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
//
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background: none;
//
background: none;
}
//
}
.ant-menu-sub .ant-menu-item-selected .lx-menu-item-link::before {
.ant-menu-sub .ant-menu-item-selected .lx-menu-item-link::before {
// background: @main-color;
// background: @main-color;
...
...
src/global/styles/theme.less
View file @
3e523776
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
@menu-select-color : rgba(0, 0, 0, 0.85);
@menu-select-color : rgba(0, 0, 0, 0.85);
@menu-select-bg : rgba(0, 0, 0, .02);
@menu-select-bg : rgba(0, 0, 0, .02);
@menu-circle-color : #D8DEE4;
@menu-circle-color : #D8DEE4;
@menu-select-bg-color : rgba(0,169,143,0.04);
// status circle color
// status circle color
@status-stop : #C1C7D0; // 停用
@status-stop : #C1C7D0; // 停用
...
...
src/layouts/components/MenuSlider.tsx
View file @
3e523776
...
@@ -4,6 +4,8 @@ import { Layout, Menu } from 'antd'
...
@@ -4,6 +4,8 @@ import { Layout, Menu } from 'antd'
import
{
Link
,
history
}
from
'umi'
;
import
{
Link
,
history
}
from
'umi'
;
import
{
import
{
BorderOutlined
,
BorderOutlined
,
DownOutlined
,
RightOutlined
,
}
from
'@ant-design/icons'
}
from
'@ant-design/icons'
import
OuterSider
from
'./OuterSide'
import
OuterSider
from
'./OuterSide'
import
styles
from
'../styles/MenuSlider.less'
import
styles
from
'../styles/MenuSlider.less'
...
@@ -90,9 +92,17 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
...
@@ -90,9 +92,17 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
sessionStorage
.
setItem
(
"currentState"
,
JSON
.
stringify
(
result
))
sessionStorage
.
setItem
(
"currentState"
,
JSON
.
stringify
(
result
))
}
}
// const customExpandIcon = (props) => {
// if (props.isOpen) {
// return <DownOutlined />
// } else {
// return <RightOutlined />
// }
// }
return
<>
return
<>
<
OuterSider
{
...
props
}
/>
<
OuterSider
{
...
props
}
/>
<
Sider
theme=
"light"
className=
"menu_sider"
collapsed=
{
props
.
collapseState
}
>
<
Sider
theme=
"light"
className=
{
styles
.
menu_sider
}
collapsed=
{
props
.
collapseState
}
>
<
Link
to=
{
`/`
}
className=
{
styles
.
logo
}
>
<
Link
to=
{
`/`
}
className=
{
styles
.
logo
}
>
<
img
src=
{
menuIcon
}
/>
<
img
src=
{
menuIcon
}
/>
</
Link
>
</
Link
>
...
@@ -106,6 +116,7 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
...
@@ -106,6 +116,7 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
openKeys=
{
openKeys
}
openKeys=
{
openKeys
}
mode=
"inline"
mode=
"inline"
onClick=
{
clickMenuItem
}
onClick=
{
clickMenuItem
}
// expandIcon={customExpandIcon}
>
>
{
{
menuItemsCache
menuItemsCache
...
...
src/layouts/styles/MenuSlider.less
View file @
3e523776
@import '../../global/styles//theme.less';
.logo {
.logo {
background: rgba(255, 255, 255, 1);
background: rgba(255, 255, 255, 1);
height: 48px;
height: 48px;
...
@@ -27,7 +28,58 @@
...
@@ -27,7 +28,58 @@
.menu_sider {
.menu_sider {
position: relative;
position: relative;
:global {
.ant-menu-root{
padding: 0 8px;
}
.ant-menu-sub {
background: #fff;
}
.ant-menu-submenu-open{
.ant-menu-submenu-title{
color: #252D37;
background: #EDEEEF;
border-radius: 4px;
}
.ant-menu-submenu-arrow{
color: #252D37;
}
}
.ant-menu-submenu-active,.ant-menu-submenu-selected{
.ant-menu-submenu-title{
background: #F5F6F7;
color: #252D37;
border-radius: 4px;
}
.ant-menu-submenu-arrow{
color: #252D37;
}
}
.ant-menu-inline .ant-menu-item-selected::after {
opacity: 0;
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-active {
background: #F5F6F7;
color: #252D37;
border-radius: 4px;
a {
color: #252D37;
}
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background: @menu-select-bg-color;
color: #00A98F;
border-radius: 4px;
a {
color: #00A98F;
}
}
}
}
}
...
@@ -62,7 +114,7 @@
...
@@ -62,7 +114,7 @@
}
}
.wrapperSilder {
.wrapperSilder {
background-color: #
FAFBFC
!important;
background-color: #
fff
!important;
min-height: 100vh;
min-height: 100vh;
.menuBox {
.menuBox {
...
@@ -75,13 +127,30 @@
...
@@ -75,13 +127,30 @@
position: relative;
position: relative;
a {
a {
display: block;
display: flex;
flex-direction: column;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 8px;
background: #FFFFFF;
margin: 0 auto;
&:hover{
background: #F5F6F7;
span {
color: #252D37 !important;
}
label {
color: #252D37 !important;
}
}
}
}
label {
label {
display: block;
display: block;
line-height: 20px;
line-height: 20px;
margin-top: 4px;
//
margin-top: 4px;
font-size: 12px;
font-size: 12px;
font-weight: 400;
font-weight: 400;
color: rgba(151, 160, 175, 1);
color: rgba(151, 160, 175, 1);
...
@@ -97,6 +166,30 @@
...
@@ -97,6 +166,30 @@
}
}
}
}
.currentItem {
&:not(:first-child)::after {
position: absolute;
content: "";
right: 0;
top: 50%;
transform: translate(0, -50%);
border-right: 8px solid #fff;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
a{
background: @menu-select-bg-color;
}
span {
color: #00A98F !important;
}
label {
color: #00A98F !important;
}
}
}
}
}
}
...
@@ -111,6 +204,13 @@
...
@@ -111,6 +204,13 @@
border-top: 8px solid transparent;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-bottom: 8px solid transparent;
}
}
li {
a{
background: @menu-select-bg-color;
}
}
span {
span {
color: #00A98F !important;
color: #00A98F !important;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment