forked from Gitlink/forgeplus-react
上传头像透明背景变成了黑色背景
This commit is contained in:
parent
191a37b97d
commit
f47fdbb1e8
|
@ -18,7 +18,7 @@ function Index({onCancel,avatarImg,login}){
|
|||
const cropper = useRef();
|
||||
|
||||
const saveAvatar = async () => {
|
||||
const imgUrl = cropper.current.cropper.getCroppedCanvas().toDataURL("image/jpeg");
|
||||
const imgUrl = cropper.current.cropper.getCroppedCanvas().toDataURL("image/png");
|
||||
if (!imgUrl) {
|
||||
message.info('请先上传图片');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue