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

!5425 翻译完成:4635 修复卡片资料问题

Merge pull request !5425 from wusongqing/TR4635
......@@ -591,7 +591,7 @@ SystemCapability.Ability.Form
## getAllFormsInfo
getAllFormsInfo(callback: AsyncCallback<Array<FormInfo>>): void;
getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
Obtains the widget information provided by all applications on the device. This API uses an asynchronous callback to return the result.
......@@ -619,7 +619,7 @@ SystemCapability.Ability.Form
## getAllFormsInfo
getAllFormsInfo(): Promise<Array<FormInfo>>;
getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>;
Obtains the widget information provided by all applications on the device. This API uses a promise to return the result.
......@@ -645,7 +645,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, callback: AsyncCallback<Array<FormInfo>>): void;
getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
Obtains the widget information provided by a given application on the device. This API uses an asynchronous callback to return the result.
......@@ -674,7 +674,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<Array<FormInfo>>): void;
getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
Obtains the widget information provided by a given application on the device. This API uses an asynchronous callback to return the result.
......@@ -704,7 +704,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<FormInfo>>;
getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>;
Obtains the widget information provided by a given application on the device. This API uses a promise to return the result.
......@@ -767,7 +767,7 @@ SystemCapability.Ability.Form
## deleteInvalidForms
function deleteInvalidForms(formIds: Array<string>): Promise<number>;
deleteInvalidForms(formIds: Array<string>): Promise<number>;
Deletes invalid widgets from the list. This API uses a promise to return the result.
......@@ -800,7 +800,7 @@ SystemCapability.Ability.Form
## acquireFormState
acquireFormState(want: Want, callback: AsyncCallback<FormStateInfo>): void;
acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void;
Obtains the widget state. This API uses an asynchronous callback to return the result.
......@@ -819,9 +819,14 @@ SystemCapability.Ability.Form
```js
var want = {
"deviceId": "",
"bundleName": "com.extreme.test",
"abilityName": "com.extreme.test.MainAbility"
"deviceId": "",
"bundleName": "ohos.samples.FormApplication",
"abilityName": "FormAbility",
"parameters": {
"ohos.extra.param.key.module_name": "entry",
"ohos.extra.param.key.form_name": "widget",
"ohos.extra.param.key.form_dimension": 2
}
};
formHost.acquireFormState(want, (error, data) => {
if (error.code) {
......@@ -834,7 +839,7 @@ SystemCapability.Ability.Form
## acquireFormState
function acquireFormState(want: Want): Promise<FormStateInfo>;
acquireFormState(want: Want): Promise<formInfo.FormStateInfo>;
Obtains the widget state. This API uses a promise to return the result.
......@@ -858,9 +863,14 @@ SystemCapability.Ability.Form
```js
var want = {
"deviceId": "",
"bundleName": "com.extreme.test",
"abilityName": "com.extreme.test.MainAbility"
"deviceId": "",
"bundleName": "ohos.samples.FormApplication",
"abilityName": "FormAbility",
"parameters": {
"ohos.extra.param.key.module_name": "entry",
"ohos.extra.param.key.form_name": "widget",
"ohos.extra.param.key.form_dimension": 2
}
};
formHost.acquireFormState(want).then((data) => {
console.log('formHost acquireFormState, data:' + JSON.stringify(data));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册