上传头像透明背景变成了黑色背景

This commit is contained in:
caishi 2022-05-27 17:24:01 +08:00
parent 191a37b97d
commit f47fdbb1e8
1 changed files with 1 additions and 1 deletions

View File

@ -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('请先上传图片');
}