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

!17502 【文档修复】去除无效二级模块、修复卡片用例

Merge pull request !17502 from wangkailong/beta5
...@@ -15,21 +15,20 @@ import common from '@ohos.app.ability.common'; ...@@ -15,21 +15,20 @@ import common from '@ohos.app.ability.common';
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase **系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 说明 |
| ----------- | -------------------- | ---- | ------------------------------------------------------------ | | ----------- | -------------------- | ------------------------------------------------------------ |
| UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | 否 | UIAbilityContext二级模块。 | | UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | UIAbilityContext二级模块。 |
| AbilityStageContext | [AbilityStageContext](js-apis-inner-application-abilityStageContext.md) | 否 | AbilityStageContext二级模块。 | | AbilityStageContext | [AbilityStageContext](js-apis-inner-application-abilityStageContext.md) | AbilityStageContext二级模块。 |
| ApplicationContext | [ApplicationContext](js-apis-inner-application-applicationContext.md) | 否 | ApplicationContext二级模块。 | | ApplicationContext | [ApplicationContext](js-apis-inner-application-applicationContext.md) | ApplicationContext二级模块。 |
| BaseContext | [BaseContext](js-apis-inner-application-baseContext.md) | 否 | BaseContext二级模块。 | | BaseContext | [BaseContext](js-apis-inner-application-baseContext.md) | BaseContext二级模块。 |
| Context | [Context](js-apis-inner-application-context.md) | 否 | Context二级模块。 | | Context | [Context](js-apis-inner-application-context.md) | Context二级模块。 |
| ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | 否 | ExtensionContext二级模块。 | | ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | ExtensionContext二级模块。 |
| FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | 否 | FormExtensionContext二级模块。 | | FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | FormExtensionContext二级模块。 |
| AreaMode | [AreaMode](#areamode) | 否 | AreaMode枚举值。 | | ServiceExtensionContext | [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md) | ServiceExtensionContext二级模块。 |
| EventHub | [EventHub](js-apis-inner-application-eventHub.md) | 否 | EventHub二级模块。 | | EventHub | [EventHub](js-apis-inner-application-eventHub.md) | EventHub二级模块。 |
| PermissionRequestResult | [PermissionRequestResult](js-apis-inner-application-permissionRequestResult.md) | 否 | PermissionRequestResult二级模块。 | | PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | PacMap二级模块。 |
| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | 否 | PacMap二级模块。 | | AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | AbilityResult二级模块。 |
| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | 否 | AbilityResult二级模块。 | | ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | ConnectOptions二级模块。 |
| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | 否 | ConnectOptions二级模块。 |
**示例:** **示例:**
```ts ```ts
...@@ -42,21 +41,8 @@ let baseContext: common.BaseContext; ...@@ -42,21 +41,8 @@ let baseContext: common.BaseContext;
let context: common.Context; let context: common.Context;
let extensionContext: common.ExtensionContext; let extensionContext: common.ExtensionContext;
let formExtensionContext: common.FormExtensionContext; let formExtensionContext: common.FormExtensionContext;
let areaMode: common.AreaMode;
let eventHub: common.EventHub; let eventHub: common.EventHub;
let permissionRequestResult: common.PermissionRequestResult;
let pacMap: common.PacMap; let pacMap: common.PacMap;
let abilityResult: common.AbilityResult; let abilityResult: common.AbilityResult;
let connectOptions: common.ConnectOptions; let connectOptions: common.ConnectOptions;
``` ```
\ No newline at end of file
## AreaMode
访问的文件分区,每个文件分区有对应自己的内容。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
| 名称 | 值 | 说明 |
| --------------- | ---- | --------------- |
| EL1 | 0 | 设备级加密区。 |
| EL2 | 1 | 用户凭据加密区。默认为EL2。 |
\ No newline at end of file
...@@ -48,20 +48,17 @@ createFormBindingData(obj?: Object | string): FormBindingData ...@@ -48,20 +48,17 @@ createFormBindingData(obj?: Object | string): FormBindingData
**示例:** **示例:**
```ts ```ts
import featureAbility from '@ohos.ability.featureAbility'; import formBindingData from '@ohos.app.form.formBindingData';
import fileio from '@ohos.fileio'; import fs from '@ohos.file.fs';
let context=featureAbility.getContext();
context.getOrCreateLocalDir((err,data)=>{ try {
let path=data+'/xxx.jpg'; let fd = fs.openSync('/path/to/form.png');
let fd = fileio.openSync(path);
let obj = { let obj = {
'temperature': '21°', 'temperature': '21°',
'formImages': {'image': fd} 'formImages': { 'image': fd }
}; };
try {
formBindingData.createFormBindingData(obj); formBindingData.createFormBindingData(obj);
} catch (error) { } catch (error) {
console.log(`catch err->${JSON.stringify(err)}`); 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.
先完成此消息的编辑!
想要评论请 注册