我一直遵循此tutorial来将文件手动添加到放置区,但是经过几次尝试,我仍然收到以下错误:
“ vdropzone挂载”事件处理程序中的错误:“ TypeError:e.type为 未定义”
HTML片段:
<vue-dropzone @vdropzone-mounted="addImgs" ref="myVueDropzone" id="dropzone" :options="dropzoneOptions"
:duplicateCheck="true"></vue-dropzone>
JS代码段:
addImgs() {
var file = { size: 123, name: "Icon" };
var url = "https://myvizo.com/img/logo_sm.png";
this.$refs.myVueDropzone.manuallyAddFile(file, url);
}
任何建议/建议/帮助将不胜感激。
解决方案:
var file = { size: 123, name: "Icon",type:"image/png" };