我正在使用Laravel + spark + vue js,我正在尝试整合https://github.com/Vanthink-UED/vue-core-image-upload,以下是代码。
app.js
import VueCoreImageUpload from 'vue-core-image-upload';
Vue.component('vue-core-image-upload',VueCoreImageUpload);
Vue.component('spark-image-resize',require('./components/image-resize/show'));
show.js
module.exports = {
data() {
return {
src: 'http://img1.vued.vanthink.cn/vued0a233185b6027244f9d43e653227439a.png'
};
},
created() {
},
methods: {
},
events: {
imageuploaded(res) {
}
}
};
刀片文件
<vue-core-image-upload
v-bind:class="['pure-button','pure-button-primary','js-btn-crop']"
v-bind:crop="true" url="/process-image"
extensions="png,gif,jpeg,jpg"
v-on:imageuploaded="imageuploaded">
</vue-core-image-upload>
它给了我以下错误。
[Vue警告]:未定义属性或方法“imageuploaded” 实例,但在渲染期间引用。确保声明被动 数据选项中的数据属性。(在根实例中找到)app.js%20line%201722%20%3E%20eval:525:7
[Vue警告]:事件“imageuploaded”的处理程序无效:未定义 (在组件中找到)
任何建议,可能是错误和可能的解决方案?