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.
26 lines
526 B
26 lines
526 B
2 years ago
|
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);
|
||
|
}
|
||
|
};
|