Commit 6d5033b9 authored by jiangzijing's avatar jiangzijing

feat:添加模板样式

parent c054d7f8
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
} }
.templateBox { .templateBox {
padding: 20px 32px 0; padding: 0 32px;
height: calc(100vh - 188px); height: calc(100vh - 168px);
overflow: auto; overflow: auto;
} }
......
...@@ -52,6 +52,18 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -52,6 +52,18 @@ const AddTemplate = (props: IAddTemplateProps) => {
const [templateType, setTemplateType] = useState("public"); const [templateType, setTemplateType] = useState("public");
// 滚轮是否到顶,判断是否显示阴影
const [isTop, setIsTop] = useState(true)
// 滚动滚轮时监听是否到顶
const onscroll = (e: any) => {
if (e.target.scrollTop <= 0) {
setIsTop(true)
} else {
setIsTop(false)
}
}
const handleRadio = (value: string) => { const handleRadio = (value: string) => {
setTemplateType(value); setTemplateType(value);
}; };
...@@ -194,6 +206,12 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -194,6 +206,12 @@ const AddTemplate = (props: IAddTemplateProps) => {
return ( return (
<FullScreenDrawer handleClose={setShowAddTemplate}> <FullScreenDrawer handleClose={setShowAddTemplate}>
<div className={style.content}> <div className={style.content}>
<div
className={classNames({
[style.headerBox]: true,
[style.headerBoxShadow]: !isTop,
})}
>
<Typography <Typography
sx={{ fontSize: "18px", fontWeight: "600", color: "#1E2633" }} sx={{ fontSize: "18px", fontWeight: "600", color: "#1E2633" }}
> >
...@@ -204,7 +222,8 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -204,7 +222,8 @@ const AddTemplate = (props: IAddTemplateProps) => {
display: "flex", display: "flex",
justifyContent: "space-between", justifyContent: "space-between",
alignItems: "center", alignItems: "center",
marginBottom: "20px", paddingBottom: "20px",
paddingTop: "20px",
}} }}
> >
<OutlinedInput <OutlinedInput
...@@ -214,7 +233,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -214,7 +233,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
}} }}
placeholder="输入关键词搜索" placeholder="输入关键词搜索"
size="small" size="small"
sx={{ width: 340, height: 32, marginTop: "20px" }} sx={{ width: 340, height: 32 }}
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />} endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/> />
<Box <Box
...@@ -244,6 +263,8 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -244,6 +263,8 @@ const AddTemplate = (props: IAddTemplateProps) => {
/> */} /> */}
</Box> </Box>
</Box> </Box>
</div>
<div className={style.templateBox} onScroll={onscroll} >
{templateType === "public" && addTemplateList.length === 0 && ( {templateType === "public" && addTemplateList.length === 0 && (
<Box <Box
sx={{ sx={{
...@@ -349,6 +370,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -349,6 +370,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
})} })}
</div> </div>
</div> </div>
</div>
{customTemplateInfo?.show ? ( {customTemplateInfo?.show ? (
<WorkFlowEdit <WorkFlowEdit
id={customTemplateInfo.id || ""} id={customTemplateInfo.id || ""}
......
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