-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
1.7.2
Environment
wind10,chrome79, vue^2.6.10
Reproduction link
https://github.com/ZmjDns/dnpicture.git
Steps to reproduce
import { compressAccurately } from 'image-conversion' //.... beforeUpload (file) { let isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' if (!isJpgOrPng) { return new Promise((resolve, reject) => { console.log('此文件类型不允许上传!...............') reject(false) }) } let isLt2M = file.size / 1024 / 1024 < 2 if (!isLt2M) { return compressAccurately(file, {size: 500}) .then((res) => { return new Promise((resolve, reject) => { console.log('压缩成功上传...............', res) resolve(res) }); }) .catch((err) => { console.log("压缩失败", err); return new Promise((resolve, reject) => { resolve(file); }); }); } else { return new Promise((resolve, reject) => { console.log('未压缩上传...............', file) resolve(file) }) } }
在压缩完成之后,浏览器就报了这个错Invalid prop: custom validator check failed for prop "items".
What is expected?
压缩完成之后正常上传文件,并在组件中显示图片
What is actually happening?
运行上面的代码之后,浏览器就报错,并且不能正常显示已上传的图片
