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.
25 lines
528 B
25 lines
528 B
var Switch = {
|
|
_handleZanSwitchChange(e) {
|
|
var dataset = e.currentTarget.dataset;
|
|
|
|
var checked = !dataset.checked;
|
|
var loading = dataset.loading;
|
|
var disabled = dataset.disabled;
|
|
var componentId = dataset.componentId;
|
|
|
|
if (loading || disabled) return;
|
|
|
|
|
|
|
|
if (this.handleZanSwitchChange) {
|
|
this.handleZanSwitchChange({
|
|
checked,
|
|
componentId
|
|
});
|
|
} else {
|
|
console.warn('页面缺少 handleZanSwitchChange 回调函数');
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = Switch;
|
|
|