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
26eb9c9f
Commit
26eb9c9f
authored
Sep 01, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: input select 组件样式修改, 边框颜色 禁用样式 hover样式等
parent
8792686c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
17 deletions
+81
-17
MyInput.tsx
src/components/mui/MyInput.tsx
+35
-3
MySelect.tsx
src/components/mui/MySelect.tsx
+30
-0
index.tsx
src/views/CustomOperator/components/SaveOperator/index.tsx
+1
-0
index.tsx
src/views/Project/components/AddProject/index.tsx
+4
-4
index.tsx
...iews/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
+11
-10
No files found.
src/components/mui/MyInput.tsx
View file @
26eb9c9f
...
...
@@ -36,11 +36,16 @@ const MyInput = (props: MyInputProps) => {
height
:
"36px"
,
fontSize
:
"14px"
,
border
:
"rgba(221, 225, 230, 1)"
,
padding
:
"7px 12px"
,
"&.MuiInputBase-sizeSmall"
:
{
height
:
"32px"
,
},
"&
.Mui-disabled"
:
{
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
},
multiline
:
{
...
...
@@ -49,7 +54,12 @@ const MyInput = (props: MyInputProps) => {
padding
:
0
,
},
},
input
:
{},
input
:
{
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
},
},
},
},
MuiInputLabel
:
{
...
...
@@ -68,26 +78,48 @@ const MyInput = (props: MyInputProps) => {
MuiOutlinedInput
:
{
styleOverrides
:
{
root
:
{
padding
:
"7px 12px"
,
"&.Mui-focused .MuiOutlinedInput-notchedOutline"
:
{
borderWidth
:
"1px"
,
},
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
":hover"
:
{
"& .MuiOutlinedInput-notchedOutline"
:
error
?
{}
:
{
borderColor
:
"#1370ff"
,
},
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
},
},
input
:
{
padding
:
"
6.5px 12px
"
,
padding
:
"
0
"
,
verticalAlign
:
"middle"
,
},
},
},
MuiTypography
:
{
styleOverrides
:
{
root
:
{
marginRight
:
"-5px"
,
},
},
},
},
});
...
...
src/components/mui/MySelect.tsx
View file @
26eb9c9f
...
...
@@ -73,6 +73,16 @@ export default function MySelect(props: IProps) {
height
:
"36px"
,
"& .Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
},
input
:
{
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
},
},
},
...
...
@@ -92,10 +102,30 @@ export default function MySelect(props: IProps) {
MuiOutlinedInput
:
{
styleOverrides
:
{
root
:
{
"&.Mui-focused .MuiOutlinedInput-notchedOutline"
:
{
borderWidth
:
"1px"
,
},
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
":hover"
:
{
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#1370ff"
,
},
"&.Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
cursor
:
"not-allowed"
,
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
},
},
},
},
},
...
...
src/views/CustomOperator/components/SaveOperator/index.tsx
View file @
26eb9c9f
...
...
@@ -202,6 +202,7 @@ const SaveOperator = (props: IProps) => {
<
span
style=
{
{
position
:
"absolute"
,
fontSize
:
"14px"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
description
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
,
...
...
src/views/Project/components/AddProject/index.tsx
View file @
26eb9c9f
...
...
@@ -76,7 +76,7 @@ const AddProject = (props: IAddProjectProps) => {
project
.
filetoken
=
res
;
currentProjectStore
.
changeProject
(
project
);
});
navigate
(
`/product/cadd/projectOverview`
)
navigate
(
`/product/cadd/projectOverview`
)
;
}
},
onError
:
()
=>
{
...
...
@@ -137,7 +137,7 @@ const AddProject = (props: IAddProjectProps) => {
const
handleDescChange
=
(
e
:
any
)
=>
{
const
desc
=
e
.
target
.
value
;
setDesc
(
desc
.
slice
(
0
,
300
));
setDesc
(
desc
.
slice
(
0
,
300
));
// if (desc.length > 300) {
// setDescCheck({
// error: true,
...
...
@@ -177,7 +177,6 @@ const AddProject = (props: IAddProjectProps) => {
title=
"新建项目"
loading=
{
loading
}
>
<
div
className=
{
style
.
formBox
}
onClick=
{
handleFromBox
}
>
<
MyInput
required
...
...
@@ -222,9 +221,10 @@ const AddProject = (props: IAddProjectProps) => {
<
span
style=
{
{
position
:
"absolute"
,
fontSize
:
"14px"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
desc
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
color
:
desc
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
,
}
}
>
{
desc
.
length
}
/300
...
...
src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
View file @
26eb9c9f
...
...
@@ -250,16 +250,17 @@ const SaveCustomTemplate = (props: IProps) => {
multiline
rows=
{
4
}
/>
<
span
style=
{
{
position
:
"absolute"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
description
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
}
}
>
{
description
.
length
}
/300
</
span
>
<
span
style=
{
{
position
:
"absolute"
,
fontSize
:
"14px"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
description
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
,
}
}
>
{
description
.
length
}
/300
</
span
>
</
div
>
</
div
>
</
MyDialog
>
...
...
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