Closed bigZ-again closed 7 years ago
When a crop image embedded in a Vue's el, the getElementById() MUST be behind 'new Vue()', otherwise the cropjs don't working. I have a fall here.
《div id="wrapper"》
《img id="cropImage" src='xxx.jpg'》
《/div》
var image = document.getElementById('cropImage') var vm = new Vue({el: '#wrapper'}) var cropper = new Cropper(image)
var image = document.getElementById('cropImage')
var vm = new Vue({el: '#wrapper'})
var cropper = new Cropper(image)
Try this: https://github.com/Agontuk/vue-cropperjs
When a crop image embedded in a Vue's el, the getElementById() MUST be behind 'new Vue()', otherwise the cropjs don't working. I have a fall here.
《div id="wrapper"》
《img id="cropImage" src='xxx.jpg'》
《/div》
var image = document.getElementById('cropImage')
var vm = new Vue({el: '#wrapper'})
var cropper = new Cropper(image)