vant-weapp/dist/tab/index.js
Yao 3d016db8b0
[improvement] 移除多余的日志信息 (#144)
* 正式编译移除 console 信息

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

20 lines
472 B
JavaScript

const { extractComponentId } = require('../common/helper');
var Tab = {
_handleZanTabChange(e) {
const componentId = extractComponentId(e);
const dataset = e.currentTarget.dataset;
const selectedId = dataset.itemId;
const data = { componentId, selectedId };
if (this.handleZanTabChange) {
this.handleZanTabChange(data);
} else {
console.warn('页面缺少 handleZanTabChange 回调函数');
}
}
};
module.exports = Tab;