FIX 单文件上传剪裁后多次请求的问题
This commit is contained in:
parent
a5e4edf357
commit
e3c760614a
|
@ -150,7 +150,10 @@
|
||||||
this.$refs.uploader.clearFiles()
|
this.$refs.uploader.clearFiles()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
change(file){
|
change(file,files){
|
||||||
|
if(files.length > 1){
|
||||||
|
files.splice(0, 1)
|
||||||
|
}
|
||||||
if(this.cropper && file.status=='ready'){
|
if(this.cropper && file.status=='ready'){
|
||||||
const acceptIncludes = ["image/gif", "image/jpeg", "image/png"].includes(file.raw.type)
|
const acceptIncludes = ["image/gif", "image/jpeg", "image/png"].includes(file.raw.type)
|
||||||
if(!acceptIncludes){
|
if(!acceptIncludes){
|
||||||
|
|
Loading…
Reference in New Issue