[fix]: i don't see any Events Support
zhougonglai opened this issue ยท 7 comments
zhougonglai commented
h('img', {
ref: 'img',
attrs: {
src: this.src,
alt: this.alt || 'image',
style: 'max-width: 100%'
},
nativeOn: { // missing this
ready: this.ready,
cropstart: this.cropstart, // ...
},
style: this.imgStyle
})]
These events are provided with props but not on Cropper Element
elanclarkson commented
+1 I need this so I can pass context with the cropend event.
themustafaomar commented
+2 they supposed to be events not as props.
it would be nice if they are like this.
<vue-cropper
@ready="readyFired"
@cropstart="cropstartFired"
@cropmove="cropmoveFired"
@cropend="cropendFired"
@crop="cropFired"
@zoom="zoomFired">
</vue-cropper>
zacharytyhacz commented
Yes +1, cropperjs shows it has events
https://github.com/fengyuanchen/cropperjs#events
but v-on:event
or @event
dont work with them!
themustafaomar commented
zacharytyhacz commented
@themustafaomar Awesome man! Was thinking of going in there myself to make a pull request like you have. Let's urge @Agontuk to merge
pintoflager commented
In case this never gets committed you can use .native modifier to hook into cropperjs event:
@crop.native="crop($event)"
Agontuk commented
Event support added in v4.1.0