diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md index cedc34b23bb67788c98024bea7b4ad303075f175..0289fc67984d9cce33aed0ddc3d537fa3a7c7a40 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md @@ -60,7 +60,7 @@ } function FunBCall(data) { - console.info('FunACall param:' + JSON.stringify(data.readString())); + console.info('FunBCall param:' + JSON.stringify(data.readString())); return null; } @@ -71,11 +71,13 @@ // 监听call事件所需的方法 this.callee.on('funA', FunACall); this.callee.on('funB', FunBCall); - } catch (error) { + } catch (err) { console.error(`Failed to register callee on. Cause: ${JSON.stringify(err)}`); } } + ... + // 进程退出时,解除监听 onDestroy() { try { diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md index 1e984be68a6921e90853dd064ebc040308689d2a..67845df50f758ec6b99f4bcd69ce7421d5fc2d14 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md @@ -55,7 +55,7 @@ Button('拉至后台') 'abilityName': 'EntryAbility', 'params': { 'method': 'fun', // 自定义调用的方法名,必填 - 'message': 'testForcall' // 自定义要发送的message + 'message': 'testForCall' // 自定义要发送的message } }); }) diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md index 009683ed2d6a21fc29d2a0c0fce0e2d43e126f4e..857c403ab6aeeb7025bb694885273c0f0ed75aa1 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md @@ -148,7 +148,6 @@ import UIAbility from '@ohos.app.ability.UIAbility'; import formBindingData from '@ohos.app.form.formBindingData'; import formProvider from '@ohos.app.form.formProvider'; - import formInfo from '@ohos.app.form.formInfo'; const MSG_SEND_METHOD: string = 'funA';