FIX 单文件上传剪裁后多次请求的问题

This commit is contained in:
sc 2022-07-26 15:23:51 +08:00
parent a5e4edf357
commit e3c760614a
1 changed files with 4 additions and 1 deletions

View File

@ -150,7 +150,10 @@
this.$refs.uploader.clearFiles()
})
},
change(file){
change(file,files){
if(files.length > 1){
files.splice(0, 1)
}
if(this.cropper && file.status=='ready'){
const acceptIncludes = ["image/gif", "image/jpeg", "image/png"].includes(file.raw.type)
if(!acceptIncludes){