李志伟 2 years ago
parent
commit
9cbef36b42
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      src/components/Upload/UploadImage.jsx
  2. 1
    0
      src/components/Upload/style.less

+ 1
- 1
src/components/Upload/UploadImage.jsx View File

52
       beforeUpload={beforeUpload}
52
       beforeUpload={beforeUpload}
53
       onChange={handleChange}
53
       onChange={handleChange}
54
     >
54
     >
55
-      {value ? <img src={value} alt="avatar" style={{ width: '100%', height: '60%' }} /> : <UploadButton loading={loading} />}
55
+      {value ? <img src={value} alt="avatar" style={{ width: '100%', height: '100%' }} /> : <UploadButton loading={loading} />}
56
     </Upload>
56
     </Upload>
57
   );
57
   );
58
 }
58
 }

+ 1
- 0
src/components/Upload/style.less View File

1
+// 为了适应业务需求宽高比5:3
1
 .image-uploader>div {
2
 .image-uploader>div {
2
   height: 60% !important;
3
   height: 60% !important;
3
 }
4
 }