Commit c870f334 authored by GuanHua's avatar GuanHua

feat:图片公共上传组件样式问题

parent 35073ff6
...@@ -57,17 +57,23 @@ ...@@ -57,17 +57,23 @@
.delete_btn { .delete_btn {
color: #fff; color: #fff;
position: absolute; position: absolute;
top:50%; top: 50%;
left:50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
.upload_wrap{ .upload_wrap {
position: relative; position: relative;
width: 104px; width: 104px;
height: 104px; height: 104px;
&.large {
width: 175px;
height: 120px;
}
&:hover { &:hover {
.delete_wrap { .delete_wrap {
display: block; display: block;
......
...@@ -71,7 +71,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => { ...@@ -71,7 +71,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
return ( return (
<div className={styles.upload_image_wrap}> <div className={styles.upload_image_wrap}>
<div className={styles.upload_wrap}> <div className={cx(styles.upload_wrap, large ? styles.large : '')}>
<Upload {...uploadProps}> <Upload {...uploadProps}>
{<div className={cx(styles.upload_btn, !imgUrl ? styles.isAdd : "", large ? styles.large : '')}> {<div className={cx(styles.upload_btn, !imgUrl ? styles.isAdd : "", large ? styles.large : '')}>
{ {
...@@ -84,7 +84,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => { ...@@ -84,7 +84,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
} }
</div> </div>
{ {
showDesc && showDesc &&
<div className={styles.size_require}> <div className={styles.size_require}>
<p>支持JPG/PNG/JPEG, <br />最大不超过 {fileMaxSize}K, <br />尺寸:{size}</p> <p>支持JPG/PNG/JPEG, <br />最大不超过 {fileMaxSize}K, <br />尺寸:{size}</p>
</div> </div>
......
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