we-cropper
we-cropper copied to clipboard
[Bug Report] 创建WeCropper对象后,在ready钩子中无法调用pushOrign方法
we-cropper 版本
1.3.4
对应工具或者iOS或者Andriod的版本号
ios12
微信版本号
6.0
重现步骤
onLoad(option) {
let _this = this;
const { cropperOpt } = _this.data
_this.setData({ cropperOpt })
_this.cropper = new WeCropper(cropperOpt)
.on('ready', (ctx) => {
let src="";//图片本地路径
console.log("cropper对象", _this.cropper);
_this.cropper.pushOrign(src)
})
.on('beforeImageLoad', (ctx) => {
wx.showToast({
title: '上传中',
icon: 'loading',
duration: 20000
})
})
.on('imageLoad', (ctx) => {
wx.hideToast()
})
}
期待的行为
可以在ready获取对象
实际的行为
无法取得对象,为undefined
源码单词拼写错了=>pushOrign