xyxiao001 / vue-cropper

A simple picture clipping plugin for vue
https://github.xyxiao.cn/vue-cropper/docs/vue3.html
MIT License
4.3k stars 695 forks source link

First argument to DataView constructor must be an ArrayBuffer #134

Closed sky875576452 closed 6 years ago

sky875576452 commented 6 years ago

在官方vue-cli的新手脚架模板下会报这个错,单独引入cropper new也会报错,不知道是不是语法更新的原因!!

xyxiao001 commented 6 years ago

不是 这不涉及到vue的语法 检查下props img是否正常传过去

sky875576452 commented 6 years ago

no,no!我是确定过了传了的,直接复制你官网的demo示例代码,都报这个错误! 您可以尝试官网的新手脚架vue版本2.5.13的,运行demo

xyxiao001 commented 6 years ago

我3.x都可以

xyxiao001 commented 6 years ago

你用vue-devtools 检查下看看 你怎么传的img

sky875576452 commented 6 years ago

http://ofyaji162.bkt.clouddn.com/bg1.jpg 确认过了 props 里img是你官方demo的图片,我也尝试过file选择文件 赋值传递,同样的错误

xyxiao001 commented 6 years ago

https://codepen.io/xyxiao001/pen/wxwKGz

sky875576452 commented 6 years ago

好吧,我自己再看看

sky875576452 commented 6 years ago

找到原因了,貌似mock 服务影响了,注释就可以了!!!谢谢

xyxiao001 commented 6 years ago

哇 好像是这样的 之前也遇到过

sky875576452 commented 6 years ago

很神奇,也没有我没有配置相关路径拦截,居然会影响!折腾我两小时,从cropper 换到了插件还是会报错!!!