Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
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
Administrator
bkunyun
Commits
eea99569
Commit
eea99569
authored
Sep 02, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
select 组件样式优化
parent
0320f2fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
25 deletions
+57
-25
MySelect.tsx
src/components/mui/MySelect.tsx
+35
-2
index.module.css
src/views/Project/ProjectData/MoveFile/index.module.css
+22
-23
No files found.
src/components/mui/MySelect.tsx
View file @
eea99569
...
@@ -12,6 +12,7 @@ import FormControl from "@mui/material/FormControl";
...
@@ -12,6 +12,7 @@ import FormControl from "@mui/material/FormControl";
import
FormHelperText
from
"@mui/material/FormHelperText"
;
import
FormHelperText
from
"@mui/material/FormHelperText"
;
import
Select
,
{
SelectChangeEvent
,
SelectProps
}
from
"@mui/material/Select"
;
import
Select
,
{
SelectChangeEvent
,
SelectProps
}
from
"@mui/material/Select"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material"
;
import
selectActive
from
"@/assets/project/selectActive.svg"
;
export
interface
IOption
{
export
interface
IOption
{
label
:
string
;
label
:
string
;
...
@@ -80,10 +81,26 @@ export default function MySelect(props: IProps) {
...
@@ -80,10 +81,26 @@ export default function MySelect(props: IProps) {
},
},
},
},
input
:
{
input
:
{
fontSize
:
"14px"
,
"&.Mui-disabled"
:
{
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
cursor
:
"not-allowed"
,
},
},
img
:
{
display
:
"none"
,
},
},
},
},
MuiList
:
{
styleOverrides
:
{
root
:
{
"& .MuiButtonBase-root"
:
{
"&.Mui-selected"
:
{
backgroundColor
:
"#fff"
,
color
:
"#1370FF"
,
},
},
},
},
},
},
},
},
...
@@ -91,9 +108,12 @@ export default function MySelect(props: IProps) {
...
@@ -91,9 +108,12 @@ export default function MySelect(props: IProps) {
MuiMenuItem
:
{
MuiMenuItem
:
{
styleOverrides
:
{
styleOverrides
:
{
root
:
{
root
:
{
paddingRight
:
"46px"
,
fontSize
:
"14px"
,
lineHeight
:
"24px"
,
":hover"
:
{
":hover"
:
{
backgroundColor
:
"#
ECF4FF
"
,
backgroundColor
:
"#
F0F2F5
"
,
color
:
"#1
370FF
"
,
color
:
"#1
E2633
"
,
},
},
},
},
},
},
...
@@ -186,6 +206,19 @@ export default function MySelect(props: IProps) {
...
@@ -186,6 +206,19 @@ export default function MySelect(props: IProps) {
key=
{
index
}
key=
{
index
}
>
>
{
item
.
label
}
{
item
.
label
}
{
value
===
item
.
value
&&
(
<
img
style=
{
{
width
:
"16px"
,
height
:
"16px"
,
position
:
"absolute"
,
top
:
"10px"
,
right
:
"12px"
,
}
}
src=
{
selectActive
}
alt=
""
/>
)
}
</
MenuItem
>
</
MenuItem
>
);
);
})
})
...
...
src/views/Project/ProjectData/MoveFile/index.module.css
View file @
eea99569
.rootTitle
{
.rootTitle
{
border-radius
:
4px
4px
0
0
;
border-radius
:
4px
4px
0
0
;
background-color
:
rgba
(
25
,
118
,
210
,
0.08
);
background-color
:
rgba
(
25
,
118
,
210
,
0.08
);
/* background-color: rgba(25, 118, 210, 0.5); */
line-height
:
44px
;
line-height
:
44px
;
color
:
rgba
(
30
,
38
,
51
,
1
);
color
:
rgba
(
30
,
38
,
51
,
1
);
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
600
;
font-weight
:
600
;
display
:
flex
;
display
:
flex
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.rootTitleActive
{
.rootTitleActive
{
background-color
:
rgba
(
25
,
118
,
210
,
0.2
);
background-color
:
rgba
(
25
,
118
,
210
,
0.2
);
}
}
.bigFolderIcon
{
.bigFolderIcon
{
margin
:
0
9px
;
margin
:
0
9px
;
}
}
.treeLabel
{
.treeLabel
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.treeLabelText
{
.treeLabelText
{
line-height
:
44px
;
line-height
:
44px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
-o-text-overflow
:
ellipsis
;
-o-text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
width
:
320px
;
width
:
320px
;
}
}
.labelFolderIcon
{
.labelFolderIcon
{
margin-right
:
9px
;
margin-right
:
9px
;
}
}
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