wx-cardscanner
wx-cardscanner copied to clipboard
onImageChanged 这个函数是哪里来的
scanner.onImageChanged && scanner.onImageChanged(res.tempFilePaths[0])
这个函数没找到出处,怎么理解啊
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)
})