未验证 提交 4d6f29b1 编写于 作者: O openharmony_ci 提交者: Gitee

!19329 优化ArkTS卡片示例代码

Merge pull request !19329 from zhongjianfei/rr0607
......@@ -60,7 +60,7 @@
}
function FunBCall(data) {
console.log('FunACall param:' + JSON.stringify(data.readString()));
console.log('FunBCall param:' + JSON.stringify(data.readString()));
return null;
}
......@@ -76,6 +76,8 @@
}
}
...
// 进程退出时,解除监听
onDestroy() {
try {
......
......@@ -55,7 +55,7 @@ Button('拉至后台')
'abilityName': 'EntryAbility',
'params': {
'method': 'fun', // 自定义调用的方法名,必填
'message': 'testForcall' // 自定义要发送的message
'message': 'testForCall' // 自定义要发送的message
}
});
})
......
......@@ -89,7 +89,7 @@
## 通过call事件刷新卡片内容
- 在使用**postCardAction**接口的call事件时,需要在FormExtensionAbility中的onAddForm生命周期回调中更新formId。
```ts
import formBindingData from '@ohos.app.form.formBindingData';
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
......@@ -148,10 +148,9 @@
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'
// 在收到call事件后会触发callee监听的方法
function FunACall(data) {
// 获取call事件中传递的所有参数
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册