diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-ability.md b/zh-cn/application-dev/reference/apis/js-apis-ability-ability.md index ac6dfc795a1f34ed7bf4a47d4e86754910d4c548..4d37c36c8f6c7b809592bebf6f6288925d561cce 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-ability-ability.md +++ b/zh-cn/application-dev/reference/apis/js-apis-ability-ability.md @@ -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二级模块。
SystemCapability.Ability.AbilityRuntime.FAModel | +| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#pacmap) | PacMap二级模块。
SystemCapability.Ability.AbilityRuntime.FAModel | +| DataAbilityOperation | [DataAbilityOperation](js-apis-inner-ability-dataAbilityOperation.md) | DataAbilityOperation二级模块。
SystemCapability.Ability.AbilityRuntime.FAModel | +| DataAbilityResult | [DataAbilityResult](js-apis-inner-ability-dataAbilityResult.md) | DataAbilityResult二级模块。
SystemCapability.Ability.AbilityRuntime.FAModel | +| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | AbilityResult二级模块。
SystemCapability.Ability.AbilityBase | +| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | ConnectOptions二级模块。
SystemCapability.Ability.AbilityRuntime.Core | +| StartAbilityParameter | [StartAbilityParameter](js-apis-inner-ability-startAbilityParameter.md) | StartAbilityParameter二级模块。
ystemCapability.Ability.AbilityRuntime.FAModel | **示例:** ```ts diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md index 880d3e02b81c105c2cdeec1bb74f3e61da5eb7c7..5a2f72d2684e110b1d351e14f32f4a2cbce6f40f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-common.md @@ -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二级模块。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md index 107e2bbf0c8b6b388ea3bcf8e3133d5d97dffe72..f123c253434ac7796a57cdd7059eb42ec5468c52 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md @@ -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\, 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\, 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 { diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md index 1fbd76de0921498c621ad515db8ad57d30cdbf26..60813d822e5a0dc28c97fb73a85e74b72e45cc75 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md @@ -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) => { diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md index c2b16b57feadc0d6729f03423c094f32b5f15000..f3d3bf1f5c87454c69759e7fc95c59eda3f350af 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md @@ -13,6 +13,8 @@ import Configuration from '@ohos.application.Configuration'; ``` +## 属性 + **系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase | 名称 | 类型 | 可读 | 可写 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-formHost.md b/zh-cn/application-dev/reference/apis/js-apis-application-formHost.md index 3929632886844574e65e673b441be97b715edb46..9c9349d130538ca8f9e81ee79508db6284bb893d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-formHost.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-formHost.md @@ -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(() => { diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md b/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md index 372a6268be56f63b0ff8a2a21f6c75000da4f2c6..b65fefdb4c6e7958cdc96e7d2568b1d7ebc1c6c0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md @@ -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 { diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md index 616f462a96757b55d6fd8e9ef60bbb962f3735e9..a6f82c5fa9bf936d367ff4232b5e49668bee0218 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md @@ -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; diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md index 9f6f1b3d33dcce65e8f809f5325358e0d731242b..c2fa6f692c42fd15080bcce069ac71f6208d61b8 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md @@ -770,7 +770,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ## ServiceExtensionContext.startAbilityAsCaller10+ -starAbilityAsCaller(want: Want, callback: AsyncCallback\): void; +startAbilityAsCaller(want: Want, callback: AsyncCallback\): void; 使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md index d38bf1a062e55c3d4a55afd693bae6109d54b98e..ec3bdee9dd5454436d7ca93ed7985286aa09dd01 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md @@ -3000,7 +3000,7 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller& ## UIAbilityContext.startAbilityAsCaller10+ -starAbilityAsCaller(want: Want, callback: AsyncCallback\): void; +startAbilityAsCaller(want: Want, callback: AsyncCallback\): void; 使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。