提交 ae191aba 编写于 作者: C chenyuyan

form资料刷新

Signed-off-by: Nchenyuyan <chenyuyan3@huawei.com>
Change-Id: I153770cf46681ad9469bdaa822c095a31d8e2ede
上级 d9e044a5
...@@ -40,6 +40,8 @@ let formId = '12400633174999288'; ...@@ -40,6 +40,8 @@ let formId = '12400633174999288';
formHost.deleteForm(formId, (error, data) => { formHost.deleteForm(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost deleteForm, error:' + JSON.stringify(error)); console.error('formHost deleteForm, error:' + JSON.stringify(error));
} else {
console.log('formHost deleteForm success');
} }
}); });
``` ```
...@@ -66,7 +68,7 @@ deleteForm(formId: string): Promise&lt;void&gt; ...@@ -66,7 +68,7 @@ deleteForm(formId: string): Promise&lt;void&gt;
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 | | Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**参数:** **示例:**
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
...@@ -206,6 +208,8 @@ let formId = '12400633174999288'; ...@@ -206,6 +208,8 @@ let formId = '12400633174999288';
formHost.requestForm(formId, (error, data) => { formHost.requestForm(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost requestForm, error:' + JSON.stringify(error)); console.error('formHost requestForm, error:' + JSON.stringify(error));
} else {
console.log('formHost requestForm success');
} }
}); });
``` ```
...@@ -271,6 +275,8 @@ let formId = '12400633174999288'; ...@@ -271,6 +275,8 @@ let formId = '12400633174999288';
formHost.castTempForm(formId, (error, data) => { formHost.castTempForm(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost castTempForm, error:' + JSON.stringify(error)); console.error('formHost castTempForm, error:' + JSON.stringify(error));
} else {
console.log('formHost castTempForm success');
} }
}); });
``` ```
...@@ -336,6 +342,8 @@ let formId = ['12400633174999288']; ...@@ -336,6 +342,8 @@ let formId = ['12400633174999288'];
formHost.notifyVisibleForms(formId, (error, data) => { formHost.notifyVisibleForms(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost notifyVisibleForms, error:' + JSON.stringify(error)); console.error('formHost notifyVisibleForms, error:' + JSON.stringify(error));
} else {
console.log('formHost notifyVisibleForms success');
} }
}); });
``` ```
...@@ -401,6 +409,8 @@ let formId = ['12400633174999288']; ...@@ -401,6 +409,8 @@ let formId = ['12400633174999288'];
formHost.notifyInvisibleForms(formId, (error, data) => { formHost.notifyInvisibleForms(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost notifyInvisibleForms, error:' + JSON.stringify(error)); console.error('formHost notifyInvisibleForms, error:' + JSON.stringify(error));
} else {
console.log('formHost notifyInvisibleForms success');
} }
}); });
``` ```
...@@ -466,6 +476,8 @@ let formId = ['12400633174999288']; ...@@ -466,6 +476,8 @@ let formId = ['12400633174999288'];
formHost.enableFormsUpdate(formId, (error, data) => { formHost.enableFormsUpdate(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost enableFormsUpdate, error:' + JSON.stringify(error)); console.error('formHost enableFormsUpdate, error:' + JSON.stringify(error));
} else {
console.log('formHost enableFormsUpdate success');
} }
}); });
``` ```
...@@ -531,6 +543,8 @@ let formId = ['12400633174999288']; ...@@ -531,6 +543,8 @@ let formId = ['12400633174999288'];
formHost.disableFormsUpdate(formId, (error, data) => { formHost.disableFormsUpdate(formId, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost disableFormsUpdate, error:' + JSON.stringify(error)); console.error('formHost disableFormsUpdate, error:' + JSON.stringify(error));
} else {
console.log('formHost disableFormsUpdate success');
} }
}); });
``` ```
...@@ -593,6 +607,8 @@ let formId = '12400633174999288'; ...@@ -593,6 +607,8 @@ let formId = '12400633174999288';
formHost.isSystemReady((error, data) => { formHost.isSystemReady((error, data) => {
if (error.code) { if (error.code) {
console.error('formHost isSystemReady, error:' + JSON.stringify(error)); console.error('formHost isSystemReady, error:' + JSON.stringify(error));
} else {
console.log('formHost isSystemReady success');
} }
}); });
``` ```
...@@ -1011,6 +1027,8 @@ let formIds = new Array('12400633174999288', '12400633174999289'); ...@@ -1011,6 +1027,8 @@ let formIds = new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsVisible(formIds, true, (error, data) => { formHost.notifyFormsVisible(formIds, true, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost notifyFormsVisible, error:' + JSON.stringify(error)); console.error('formHost notifyFormsVisible, error:' + JSON.stringify(error));
} else {
console.log('formHost notifyFormsVisible, data:' + JSON.stringify(data));
} }
}); });
``` ```
...@@ -1078,6 +1096,8 @@ let formIds = new Array('12400633174999288', '12400633174999289'); ...@@ -1078,6 +1096,8 @@ let formIds = new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsEnableUpdate(formIds, true, (error, data) => { formHost.notifyFormsEnableUpdate(formIds, true, (error, data) => {
if (error.code) { if (error.code) {
console.error('formHost notifyFormsEnableUpdate, error:' + JSON.stringify(error)); console.error('formHost notifyFormsEnableUpdate, error:' + JSON.stringify(error));
} else {
console.log('formHost notifyFormsEnableUpdate, data:' + JSON.stringify(data));
} }
}); });
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册