!674 【OpenHarmony开源贡献者计划2022】解决自定义组件事件绑定参数,无法获取问题

Merge pull request !674 from tangshengjian/master
This commit is contained in:
openharmony_ci 2022-09-14 03:57:31 +00:00 committed by Gitee
commit 8ed52c972a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -234,6 +234,9 @@ function bindSubEvent(vm: Vm, subVm: Vm, template: TemplateInterface): void {
if (vm[template.events[type]]
&& typeof vm[template.events[type]] === 'function') {
vm[template.events[type]].apply(vm, args);
} else if (template.events[type]
&& typeof template.events[type] === 'function') {
template.events[type].apply(vm, args);
}
});
}