vue中使用plupload组件报错及不支持UploadProgress进度的问题

新手上路,请多包涵

问题:
在普通html中使用plupload2.1.2版本
上传一切正常,可是在 vue中通过npm install安装的plupload最新版2.3.6

plupload.full.min.js?16ea:15 Uncaught TypeError: m.upload.addEventListener is not a function
    at n.send (plupload.full.min.js?16ea:15)
    at n.exec (plupload.full.min.js?16ea:13)
    at n.shimExec (plupload.full.min.js?16ea:13)
    at n.exec (plupload.full.min.js?16ea:13)
    at r (plupload.full.min.js?16ea:14)
    at h.u (plupload.full.min.js?16ea:14)
    at h.send (plupload.full.min.js?16ea:14)
    at s (plupload.full.min.js?16ea:29)
    at l.Uploader.E (plupload.full.min.js?16ea:29)
    at l.Uploader.dispatchEvent (plupload.full.min.js?16ea:29)

目前的做法是找到plupload.full.min.js将m.upload.addEventListener改为m.addEventListener后能正常编译可上传,也能正常成功上传到服务器,但无论如何UploadProgress进度只有上传成功后才返回一个100,请大神帮忙看看如何解决,谢谢

...
UploadProgress: function(up, file) {
    var percent = file.percent;
    console.log(file.percent); //百分比显示,
},
...
阅读 8.6k
2 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏