Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
32ba6c79
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
32ba6c79
编写于
9月 06, 2023
作者:
O
openharmony_ci
提交者:
Gitee
9月 06, 2023
浏览文件
操作
浏览文件
下载
差异文件
!24044 【资料问题】元能力文档接口一致性问题修改
Merge pull request !24044 from yuyaozhi/master
上级
61a8c2a8
3b664be3
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
104 addition
and
16 deletion
+104
-16
zh-cn/application-dev/reference/apis/js-apis-ability-ability.md
...application-dev/reference/apis/js-apis-ability-ability.md
+9
-7
zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md
...lication-dev/reference/apis/js-apis-app-ability-common.md
+0
-2
zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
...plication-dev/reference/apis/js-apis-app-form-formHost.md
+37
-1
zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md
...ation-dev/reference/apis/js-apis-app-form-formProvider.md
+12
-1
zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
...n-dev/reference/apis/js-apis-application-configuration.md
+2
-0
zh-cn/application-dev/reference/apis/js-apis-application-formHost.md
...cation-dev/reference/apis/js-apis-application-formHost.md
+32
-1
zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md
...on-dev/reference/apis/js-apis-application-formProvider.md
+6
-1
zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md
...ce/apis/js-apis-inner-application-formExtensionContext.md
+4
-1
zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
...apis/js-apis-inner-application-serviceExtensionContext.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
...erence/apis/js-apis-inner-application-uiAbilityContext.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-ability-ability.md
浏览文件 @
32ba6c79
...
...
@@ -24,15 +24,17 @@ AbilityResult:SystemCapability.Ability.AbilityBase
ConnectOptions:SystemCapability.Ability.AbilityRuntime.Core
StartAbilityParameter:SystemCapability.Ability.AbilityRuntime.FAModel
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
| 名称 | 类型 | 描述 |
| ----------- | -------------------- | ------------------------------------------------------------ |
| DataAbilityHelper |
[
DataAbilityHelper
](
js-apis-inner-ability-dataAbilityHelper.md
)
| DataAbilityHelper二级模块。
|
| PacMap |
[
PacMap
](
js-apis-inner-ability-dataAbilityHelper.md#pacmap
)
| PacMap二级模块。 |
| DataAbilityOperation |
[
DataAbilityOperation
](
js-apis-inner-ability-dataAbilityOperation.md
)
| DataAbilityOperation二级模块。 |
| DataAbilityResult |
[
DataAbilityResult
](
js-apis-inner-ability-dataAbilityResult.md
)
| DataAbilityResult二级模块。 |
| AbilityResult |
[
AbilityResult
](
js-apis-inner-ability-abilityResult.md
)
| AbilityResult二级模块。 |
| ConnectOptions |
[
ConnectOptions
](
js-apis-inner-ability-connectOptions.md
)
| ConnectOptions二级模块。 |
| StartAbilityParameter |
[
StartAbilityParameter
](
js-apis-inner-ability-startAbilityParameter.md
)
| StartAbilityParameter二级模块。 |
| DataAbilityHelper |
[
DataAbilityHelper
](
js-apis-inner-ability-dataAbilityHelper.md
)
| DataAbilityHelper二级模块。
<br/>
SystemCapability.Ability.AbilityRuntime.FAModel
|
| PacMap |
[
PacMap
](
js-apis-inner-ability-dataAbilityHelper.md#pacmap
)
| PacMap二级模块。
<br/>
SystemCapability.Ability.AbilityRuntime.FAModel
|
| DataAbilityOperation |
[
DataAbilityOperation
](
js-apis-inner-ability-dataAbilityOperation.md
)
| DataAbilityOperation二级模块。
<br/>
SystemCapability.Ability.AbilityRuntime.FAModel
|
| DataAbilityResult |
[
DataAbilityResult
](
js-apis-inner-ability-dataAbilityResult.md
)
| DataAbilityResult二级模块。
<br/>
SystemCapability.Ability.AbilityRuntime.FAModel
|
| AbilityResult |
[
AbilityResult
](
js-apis-inner-ability-abilityResult.md
)
| AbilityResult二级模块。
<br/>
SystemCapability.Ability.AbilityBase
|
| ConnectOptions |
[
ConnectOptions
](
js-apis-inner-ability-connectOptions.md
)
| ConnectOptions二级模块。
<br/>
SystemCapability.Ability.AbilityRuntime.Core
|
| StartAbilityParameter |
[
StartAbilityParameter
](
js-apis-inner-ability-startAbilityParameter.md
)
| StartAbilityParameter二级模块。
<br/>
ystemCapability.Ability.AbilityRuntime.FAModel
|
**示例:**
```
ts
...
...
zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md
浏览文件 @
32ba6c79
...
...
@@ -16,8 +16,6 @@ import common from '@ohos.app.ability.common';
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
**系统API**
:该接口为系统接口,三方应用不支持调用。
| 名称 | 类型 | 说明 |
| ----------- | -------------------- | ------------------------------------------------------------ |
| UIAbilityContext |
[
UIAbilityContext
](
js-apis-inner-application-uiAbilityContext.md
)
| UIAbilityContext二级模块。 |
...
...
zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
浏览文件 @
32ba6c79
...
...
@@ -11,7 +11,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
```
## deleteForm
...
...
@@ -50,6 +49,7 @@ deleteForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -107,6 +107,7 @@ deleteForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -156,6 +157,7 @@ releaseForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -206,6 +208,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -261,6 +264,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -310,6 +314,7 @@ requestForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -364,6 +369,7 @@ requestForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -414,6 +420,7 @@ castToNormalForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -468,6 +475,7 @@ castToNormalForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
=
'
12400633174999288
'
;
...
...
@@ -515,6 +523,7 @@ notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -567,6 +576,7 @@ notifyVisibleForms(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -614,6 +624,7 @@ notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<vo
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -666,6 +677,7 @@ notifyInvisibleForms(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -714,6 +726,7 @@ enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void&
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -767,6 +780,7 @@ enableFormsUpdate(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -816,6 +830,7 @@ disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -870,6 +885,7 @@ disableFormsUpdate(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
...
...
@@ -910,6 +926,7 @@ isSystemReady(callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
isSystemReady
((
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -948,6 +965,7 @@ isSystemReady(): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
isSystemReady
().
then
(()
=>
{
...
...
@@ -994,6 +1012,7 @@ getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>):
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
getAllFormsInfo
((
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
...
...
@@ -1041,6 +1060,7 @@ getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
getAllFormsInfo
().
then
((
data
:
formInfo
.
FormInfo
[])
=>
{
...
...
@@ -1089,6 +1109,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.Fo
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
(
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
...
...
@@ -1140,6 +1161,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
'
entry
'
,
(
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
...
...
@@ -1196,6 +1218,7 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formI
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
'
entry
'
).
then
((
data
:
formInfo
.
FormInfo
[])
=>
{
...
...
@@ -1242,6 +1265,7 @@ deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<numb
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
...
...
@@ -1296,6 +1320,7 @@ deleteInvalidForms(formIds: Array<string>): Promise<number>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
try
{
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
...
...
@@ -1346,6 +1371,7 @@ acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo&g
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
'
deviceId
'
:
''
,
...
...
@@ -1412,6 +1438,7 @@ acquireFormState(want: Want): Promise<formInfo.FormStateInfo>
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
'
deviceId
'
:
''
,
...
...
@@ -1538,6 +1565,7 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: A
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1592,6 +1620,7 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1641,6 +1670,7 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean, c
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1695,6 +1725,7 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean):
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1743,6 +1774,7 @@ shareForm(formId: string, deviceId: string, callback: AsyncCallback<void>)
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
let
deviceId
:
string
=
'
EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2
'
;
...
...
@@ -1798,6 +1830,7 @@ shareForm(formId: string, deviceId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
let
deviceId
:
string
=
'
EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2
'
;
...
...
@@ -1847,6 +1880,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string>, isProtected: boolean, callb
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1898,6 +1932,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string\>, isProtected: boolean): Pro
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
try
{
...
...
@@ -1996,6 +2031,7 @@ acquireFormData(formId: string): Promise<{[key: string]: Object}>;
```
ts
import
formHost
from
'
@ohos.app.form.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
try
{
...
...
zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md
浏览文件 @
32ba6c79
...
...
@@ -9,7 +9,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在
```
ts
import
formProvider
from
'
@ohos.app.form.formProvider
'
;
import
Base
from
'
@ohos.base
'
;
```
## setFormNextRefreshTime
...
...
@@ -46,6 +45,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
**示例:**
```
ts
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
try
{
formProvider
.
setFormNextRefreshTime
(
formId
,
5
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -99,6 +100,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise<void>
**示例:**
```
ts
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
try
{
formProvider
.
setFormNextRefreshTime
(
formId
,
5
).
then
(()
=>
{
...
...
@@ -145,6 +148,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
```
ts
import
formBindingData
from
'
@ohos.app.form.formBindingData
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
try
{
...
...
@@ -208,6 +212,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
```
ts
import
formBindingData
from
'
@ohos.app.form.formBindingData
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
class
createFormBindingDataParamType
{
...
...
@@ -353,6 +358,7 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.For
```
ts
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
const
filter
:
formInfo
.
FormInfoFilter
=
{
// get info of forms belong to module entry.
...
...
@@ -404,6 +410,7 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData,
```
ts
import
formBindingData
from
'
@ohos.app.form.formBindingData
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
abilityName
:
'
FormAbility
'
,
...
...
@@ -468,6 +475,7 @@ requestPublishForm(want: Want, callback: AsyncCallback<string>): void
```
ts
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
abilityName
:
'
FormAbility
'
,
...
...
@@ -529,6 +537,7 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData
```
ts
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
abilityName
:
'
FormAbility
'
,
...
...
@@ -580,6 +589,7 @@ isRequestPublishFormSupported(callback: AsyncCallback<boolean>): void
```
ts
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formProvider
.
isRequestPublishFormSupported
((
error
:
Base
.
BusinessError
,
isSupported
:
boolean
)
=>
{
...
...
@@ -644,6 +654,7 @@ isRequestPublishFormSupported(): Promise<boolean>
```
ts
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
try
{
formProvider
.
isRequestPublishFormSupported
().
then
((
isSupported
:
boolean
)
=>
{
...
...
zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
浏览文件 @
32ba6c79
...
...
@@ -13,6 +13,8 @@
import
Configuration
from
'
@ohos.application.Configuration
'
;
```
## 属性
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 类型 | 可读 | 可写 | 说明 |
...
...
zh-cn/application-dev/reference/apis/js-apis-application-formHost.md
浏览文件 @
32ba6c79
...
...
@@ -12,7 +12,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
```
## deleteForm
...
...
@@ -71,6 +70,7 @@ deleteForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
deleteForm
(
formId
).
then
(()
=>
{
...
...
@@ -101,6 +101,7 @@ releaseForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
releaseForm
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -134,6 +135,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
releaseForm
(
formId
,
true
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -172,6 +174,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
releaseForm
(
formId
,
true
).
then
(()
=>
{
...
...
@@ -202,6 +205,7 @@ requestForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
requestForm
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -237,6 +241,7 @@ requestForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
requestForm
(
formId
).
then
(()
=>
{
...
...
@@ -267,6 +272,7 @@ castTempForm(formId: string, callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
castTempForm
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -302,6 +308,7 @@ castTempForm(formId: string): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
castTempForm
(
formId
).
then
(()
=>
{
...
...
@@ -332,6 +339,7 @@ notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
notifyVisibleForms
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -367,6 +375,7 @@ notifyVisibleForms(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
notifyVisibleForms
(
formId
).
then
(()
=>
{
...
...
@@ -397,6 +406,7 @@ notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<vo
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
notifyInvisibleForms
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -432,6 +442,7 @@ notifyInvisibleForms(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
notifyInvisibleForms
(
formId
).
then
(()
=>
{
...
...
@@ -462,6 +473,7 @@ enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void&
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
enableFormsUpdate
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -497,6 +509,7 @@ enableFormsUpdate(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
enableFormsUpdate
(
formId
).
then
(()
=>
{
...
...
@@ -527,6 +540,7 @@ disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
disableFormsUpdate
(
formId
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -562,6 +576,7 @@ disableFormsUpdate(formIds: Array<string>): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
[]
=
[
'
12400633174999288
'
];
formHost
.
disableFormsUpdate
(
formId
).
then
(()
=>
{
...
...
@@ -589,6 +604,7 @@ isSystemReady(callback: AsyncCallback<void>): void
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
isSystemReady
((
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -616,6 +632,7 @@ isSystemReady(): Promise<void>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formId
:
string
=
'
12400633174999288
'
;
formHost
.
isSystemReady
().
then
(()
=>
{
...
...
@@ -646,6 +663,7 @@ getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>):
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
formHost
.
getAllFormsInfo
((
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
if
(
error
.
code
)
{
...
...
@@ -677,6 +695,7 @@ getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
formHost
.
getAllFormsInfo
().
then
((
data
:
formInfo
.
FormInfo
[])
=>
{
console
.
log
(
'
formHost getAllFormsInfo data: ${JSON.stringify(data)}
'
);
...
...
@@ -707,6 +726,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.Fo
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
(
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
if
(
error
.
code
)
{
...
...
@@ -740,6 +760,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
'
entry
'
,
(
error
:
Base
.
BusinessError
,
data
:
formInfo
.
FormInfo
[])
=>
{
if
(
error
.
code
)
{
...
...
@@ -777,6 +798,8 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formI
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
formHost
.
getFormsInfo
(
'
com.example.ohos.formjsdemo
'
,
'
entry
'
).
then
((
data
:
formInfo
.
FormInfo
[])
=>
{
console
.
log
(
`formHost getFormsInfo, data:
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -806,6 +829,7 @@ deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<numb
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
deleteInvalidForms
(
formIds
,
(
error
:
Base
.
BusinessError
,
data
:
number
)
=>
{
...
...
@@ -843,6 +867,7 @@ deleteInvalidForms(formIds: Array<string>): Promise<number>
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
deleteInvalidForms
(
formIds
).
then
((
data
:
number
)
=>
{
...
...
@@ -875,6 +900,7 @@ acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo&g
import
formHost
from
'
@ohos.application.formHost
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
'
deviceId
'
:
''
,
...
...
@@ -923,6 +949,7 @@ acquireFormState(want: Want): Promise<formInfo.FormStateInfo>
import
formHost
from
'
@ohos.application.formHost
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
Base
from
'
@ohos.base
'
;
let
want
:
Want
=
{
'
deviceId
'
:
''
,
...
...
@@ -1013,6 +1040,7 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: A
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
notifyFormsVisible
(
formIds
,
true
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -1049,6 +1077,7 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
notifyFormsVisible
(
formIds
,
true
).
then
(()
=>
{
...
...
@@ -1080,6 +1109,7 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean, c
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
notifyFormsEnableUpdate
(
formIds
,
true
,
(
error
:
Base
.
BusinessError
)
=>
{
...
...
@@ -1116,6 +1146,7 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean):
```
ts
import
formHost
from
'
@ohos.application.formHost
'
;
import
Base
from
'
@ohos.base
'
;
let
formIds
:
string
[]
=
new
Array
(
'
12400633174999288
'
,
'
12400633174999289
'
);
formHost
.
notifyFormsEnableUpdate
(
formIds
,
true
).
then
(()
=>
{
...
...
zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md
浏览文件 @
32ba6c79
...
...
@@ -10,7 +10,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在
```
ts
import
formProvider
from
'
@ohos.application.formProvider
'
;
import
Base
from
'
@ohos.base
'
```
## setFormNextRefreshTime
...
...
@@ -32,6 +31,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
**示例:**
```
ts
import
Base
from
'
@ohos.base
'
let
formId
:
string
=
'
12400633174999288
'
;
formProvider
.
setFormNextRefreshTime
(
formId
,
5
,
(
error
:
Base
.
BusinessError
)
=>
{
if
(
error
.
code
)
{
...
...
@@ -64,6 +65,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise<void>
**示例:**
```
ts
import
Base
from
'
@ohos.base
'
let
formId
:
string
=
'
12400633174999288
'
;
formProvider
.
setFormNextRefreshTime
(
formId
,
5
).
then
(()
=>
{
console
.
log
(
'
formProvider setFormNextRefreshTime success
'
);
...
...
@@ -92,6 +95,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
```
ts
import
formBindingData
from
'
@ohos.app.form.formBindingData
'
;
import
Base
from
'
@ohos.base
'
let
formId
=
'
12400633174999288
'
;
class
createBindingDataType
{
...
...
@@ -135,6 +139,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
```
ts
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
Base
from
'
@ohos.base
'
let
formId
:
string
=
'
12400633174999288
'
;
class
createBindingDataType
{
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md
浏览文件 @
32ba6c79
...
...
@@ -13,7 +13,6 @@ FormExtensionContext模块提供FormExtensionAbility具有的接口和能力。
```
ts
import
common
from
'
@ohos.app.ability.common
'
;
import
Base
from
'
@ohos.base
'
;
```
## FormExtensionContext.startAbility
...
...
@@ -51,6 +50,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void
```
ts
import
FormExtensionAbility
from
'
@ohos.app.form.FormExtensionAbility
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
export
default
class
MyFormExtensionAbility
extends
FormExtensionAbility
{
onFormEvent
(
formId
:
string
,
message
:
string
)
{
...
...
@@ -115,6 +115,7 @@ startAbility(want: Want): Promise<void>
```
ts
import
FormExtensionAbility
from
'
@ohos.app.form.FormExtensionAbility
'
;
import
Want
from
'
@ohos.app.ability.Want
'
;
import
Base
from
'
@ohos.base
'
;
export
default
class
MyFormExtensionAbility
extends
FormExtensionAbility
{
onFormEvent
(
formId
:
string
,
message
:
string
)
{
...
...
@@ -250,6 +251,7 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback<
import
FormExtensionAbility
from
'
@ohos.app.form.FormExtensionAbility
'
;
import
rpc
from
'
@ohos.rpc
'
;
import
common
from
'
@ohos.app.ability.common
'
;
import
Base
from
'
@ohos.base
'
;
// commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例
let
commRemote
:
rpc
.
IRemoteObject
|
null
=
null
;
...
...
@@ -316,6 +318,7 @@ disconnectServiceExtensionAbility(connection: number): Promise<void>;
import
FormExtensionAbility
from
'
@ohos.app.form.FormExtensionAbility
'
;
import
rpc
from
'
@ohos.rpc
'
;
import
common
from
'
@ohos.app.ability.common
'
;
import
Base
from
'
@ohos.base
'
;
// commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例
let
commRemote
:
rpc
.
IRemoteObject
|
null
=
null
;
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
浏览文件 @
32ba6c79
...
...
@@ -770,7 +770,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
## ServiceExtensionContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback
\<
void>): void;
star
t
AbilityAsCaller(want: Want, callback: AsyncCallback
\<
void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
浏览文件 @
32ba6c79
...
...
@@ -3000,7 +3000,7 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller&
## UIAbilityContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback
\<
void>): void;
star
t
AbilityAsCaller(want: Want, callback: AsyncCallback
\<
void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录