You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
472 B
20 lines
472 B
2 years ago
|
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;
|