未验证 提交 7970313a 编写于 作者: O openharmony_ci 提交者: Gitee

!17347 FormBindingData相关描述更新(Release)

Merge pull request !17347 from wangkailong/cherry-pick-1681741531
......@@ -48,20 +48,17 @@ createFormBindingData(obj?: Object | string): FormBindingData
**示例:**
```ts
import featureAbility from '@ohos.ability.featureAbility';
import fileio from '@ohos.fileio';
let context=featureAbility.getContext();
context.getOrCreateLocalDir((err,data)=>{
let path=data+'/xxx.jpg';
let fd = fileio.openSync(path);
import formBindingData from '@ohos.app.form.formBindingData';
import fs from '@ohos.file.fs';
try {
let fd = fs.openSync('/path/to/form.png');
let obj = {
'temperature': '21°',
'formImages': {'image': fd}
'formImages': { 'image': fd }
};
try {
formBindingData.createFormBindingData(obj);
} catch (error) {
console.log(`catch err->${JSON.stringify(err)}`);
}
})
formBindingData.createFormBindingData(obj);
} catch (error) {
console.error(`catch error, code: ${error.code}, message: ${error.message}`);
}
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册