Commit a23134c0 authored by jiangzijing's avatar jiangzijing

feat:模板响应式布局、间距固定

parent eea2f337
...@@ -28,6 +28,7 @@ const TemplateBox = (props: any) => { ...@@ -28,6 +28,7 @@ const TemplateBox = (props: any) => {
); );
return ( return (
<Box className={styles.template}>
<Box className={styles.templateBlock}> <Box className={styles.templateBlock}>
<Box> <Box>
<Box <Box
...@@ -110,6 +111,7 @@ const TemplateBox = (props: any) => { ...@@ -110,6 +111,7 @@ const TemplateBox = (props: any) => {
)} )}
</Box> </Box>
</Box> </Box>
</Box>
); );
}; };
......
...@@ -16,10 +16,15 @@ ...@@ -16,10 +16,15 @@
margin-bottom: 24px; margin-bottom: 24px;
} }
.template {
padding: 0 8px;
box-sizing: border-box;
}
.templateBlock { .templateBlock {
height: 194px; height: 194px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 10px 0px rgba(0,24,57,0.0400); box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.0400);
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
padding: 16px 20px; padding: 16px 20px;
...@@ -32,32 +37,20 @@ ...@@ -32,32 +37,20 @@
} }
@media screen and (max-width:1220px) { @media screen and (max-width:1220px) {
.templateBlock { .template {
width: 49%; width: 50%;
margin-right: 2%;
}
.templateBlock:nth-child(2n){
margin-right: 0;
} }
} }
@media screen and (min-width:1220px) and (max-width:1600px) { @media screen and (min-width:1220px) and (max-width:1600px) {
.templateBlock { .template {
width: 32.423%; width: 33.33333%;
margin-right: 1.365%;
}
.templateBlock:nth-child(3n){
margin-right: 0;
} }
} }
@media screen and (min-width:1600px) { @media screen and (min-width:1600px) {
.templateBlock { .template {
width: 24%; width: 25%;
margin-right: 1.333%;
}
.templateBlock:nth-child(4n){
margin-right: 0;
} }
} }
......
...@@ -145,7 +145,7 @@ const ProjectMembers = observer(() => { ...@@ -145,7 +145,7 @@ const ProjectMembers = observer(() => {
</Box> </Box>
)} )}
{templateList.length > 0 && ( {templateList.length > 0 && (
<Box sx={{ display: "flex", flexWrap: "wrap" }}> <Box sx={{ display: "flex", flexWrap: "wrap", margin:"0 -8px" }}>
{templateList && {templateList &&
templateList.length > 0 && templateList.length > 0 &&
templateList.map((item, key) => { templateList.map((item, key) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment