docs(ShutoApi): 添加事件处理函数的字段说明注释
This commit is contained in:
@@ -57,6 +57,12 @@ ShutoApi.removeEventListener = function (eventName, callback) {
|
|||||||
|
|
||||||
// 内部事件处理函数,用于接收原生代码的事件通知
|
// 内部事件处理函数,用于接收原生代码的事件通知
|
||||||
function onEvent(eventData) {
|
function onEvent(eventData) {
|
||||||
|
/*
|
||||||
|
字段 无回调事件 带回调事件
|
||||||
|
事件名字段 type eventName
|
||||||
|
回调ID字段 ❌ 无 ✅ callbackId
|
||||||
|
原生方法 fireEvent: fireEventWithCallback:
|
||||||
|
*/
|
||||||
if (eventData && eventData.type) {
|
if (eventData && eventData.type) {
|
||||||
// 无回调的事件
|
// 无回调的事件
|
||||||
eventEmitter.emit(eventData.type, eventData.params);
|
eventEmitter.emit(eventData.type, eventData.params);
|
||||||
|
|||||||
Reference in New Issue
Block a user