we-plugin / we-cropper

微信小程序图片裁剪工具
https://we-plugin.github.io/we-cropper/#/
MIT License
2.18k stars 451 forks source link

想在new weCroper()时调用pushOrign将图片显示出来该如何处理 #6

Closed 03128crz closed 7 years ago

03128crz commented 7 years ago
new weCropper(data)
  .on('ready', function (ctx) {
    console.log(`wecropper is ready for work!`)
  })
  .on('beforeImageLoad', (ctx) => {
    console.log(`before picture loaded, i can do something`)
    console.log(`current canvas context:`, ctx)
    wx.showToast({
      title: '上传中',
      icon: 'loading',
      duration: 20000
    })
  })
  .on('imageLoad', (ctx) => {
    console.log(`picture loaded`)
    console.log(`current canvas context:`, ctx)
    wx.hideToast()
  })
dlhandsome commented 7 years ago

参考文档:两种方式载入图片