wx-cardscanner icon indicating copy to clipboard operation
wx-cardscanner copied to clipboard

onImageChanged 这个函数是哪里来的

Open wengxianxun opened this issue 6 years ago • 1 comments

scanner.onImageChanged && scanner.onImageChanged(res.tempFilePaths[0])

这个函数没找到出处,怎么理解啊

wengxianxun avatar Jun 06 '18 08:06 wengxianxun

on(action, callback) {
  if (actionTypes.indexOf(action) > -1 && typeof (callback) === 'function') {
    this['on' + action] = callback
  }
  return this
}
new CardScanner(this)
  .on('ImageChanged', (imgPath) => {
    console.log(imgPath)
  })

zh8637688 avatar Jun 06 '18 11:06 zh8637688