From d16a250a4c295619e11a6ae721a3aee3f2ff083b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=A4=A7=E5=BE=B7?= Date: Thu, 22 Jan 2026 19:01:47 +0800 Subject: [PATCH] =?UTF-8?q?docs(ShutoApi):=20=E6=B7=BB=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=87=BD=E6=95=B0=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=AF=B4=E6=98=8E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/ShutoApi.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/ShutoApi.js b/www/ShutoApi.js index 9afc24f..4f120f3 100644 --- a/www/ShutoApi.js +++ b/www/ShutoApi.js @@ -57,6 +57,12 @@ ShutoApi.removeEventListener = function (eventName, callback) { // 内部事件处理函数,用于接收原生代码的事件通知 function onEvent(eventData) { + /* + 字段 无回调事件 带回调事件 + 事件名字段 type eventName + 回调ID字段 ❌ 无 ✅ callbackId + 原生方法 fireEvent: fireEventWithCallback: + */ if (eventData && eventData.type) { // 无回调的事件 eventEmitter.emit(eventData.type, eventData.params);