Yao 3d016db8b0
[improvement] 移除多余的日志信息 (#144)
* 正式编译移除 console 信息

* 移除无须的 warn
2018-03-11 20:35:43 +08:00

26 lines
526 B
JavaScript

const { extractComponentId } = require('../common/helper');
function handle(e) {
const componentId = extractComponentId(e);
const value = e.detail.value;
callback.call(this, componentId, value);
}
function callback(componentId, value) {
const e = { componentId, value };
if (this.handleZanSelectChange) {
this.handleZanSelectChange(e);
} else {
console.warn('页面缺少 handleZanSelectChange 回调函数');
}
}
module.exports = {
_handleZanSelectChange(e) {
handle.call(this, e);
}
};