Commit 71644079 authored by jiangzijing's avatar jiangzijing

feat:工作流模板响应式展示

parent 7843925c
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
} }
.templateBlock { .templateBlock {
width: 21.4876%; height: 194px;
height: 160px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
...@@ -26,8 +25,39 @@ ...@@ -26,8 +25,39 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin: 8px; margin-bottom: 16px;
position: relative; position: relative;
box-sizing: border-box;
}
@media screen and (max-width:1220px) {
.templateBlock {
width: 49%;
margin-right: 2%;
}
.templateBlock:nth-child(2n){
margin-right: 0;
}
}
@media screen and (min-width:1220px) and (max-width:1600px) {
.templateBlock {
width: 32.423%;
margin-right: 1.365%;
}
.templateBlock:nth-child(3n){
margin-right: 0;
}
}
@media screen and (min-width:1600px) {
.templateBlock {
width: 24%;
margin-right: 1.333%;
}
.templateBlock:nth-child(4n){
margin-right: 0;
}
} }
.addTemplateMask { .addTemplateMask {
......
...@@ -101,12 +101,12 @@ const ProjectMembers = observer(() => { ...@@ -101,12 +101,12 @@ const ProjectMembers = observer(() => {
}, 300); }, 300);
}, [templateName, getTemplateInfo, projectIdData]); }, [templateName, getTemplateInfo, projectIdData]);
// 回车搜索 // 回车搜索
const handleKeyWordChangeKeyUp = (e: any) => { const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) { if (e.keyCode === 13) {
setTemplateName(e.target.value); setTemplateName(e.target.value);
} }
} }
return ( return (
<Box className={styles.headerBox}> <Box className={styles.headerBox}>
...@@ -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", marginLeft: "-8px" }}> <Box sx={{ display: "flex", flexWrap: "wrap" }}>
{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