Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Coping0606
Docs
提交
109be425
D
Docs
项目概览
Coping0606
/
Docs
与 Fork 源项目一致
Fork自
OpenHarmony / Docs
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
109be425
编写于
6月 28, 2022
作者:
X
xuzhihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix spell error of Ability & Notification docs
Signed-off-by:
N
xuzhihao
<
xuzhihao16@huawei.com
>
上级
62098058
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
27 deletion
+27
-27
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
...application-dev/reference/apis/js-apis-ability-context.md
+9
-9
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-notification.md
zh-cn/application-dev/reference/apis/js-apis-notification.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-service-extension-context.md
...n-dev/reference/apis/js-apis-service-extension-context.md
+9
-9
zh-cn/application-dev/reference/apis/js-apis-serviceExtAbilityContext.md
...on-dev/reference/apis/js-apis-serviceExtAbilityContext.md
+3
-3
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
浏览文件 @
109be425
...
...
@@ -490,7 +490,7 @@ terminateSelf(callback: AsyncCallback<void>): void
```
js
this
.
context
.
terminateSelf
((
err
)
=>
{
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -512,9 +512,9 @@ terminateSelf(): Promise<void>
```
js
this
.
context
.
terminateSelf
(
want
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
@@ -740,7 +740,7 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void
```
js
this
.
context
.
setMissionLabel
(
"
test
"
,(
result
)
=>
{
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
stringfy
(
result
));
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
string
i
fy
(
result
));
});
```
...
...
@@ -769,9 +769,9 @@ setMissionLabel(label: string): Promise\<void>
```
js
this
.
context
.
setMissionLabel
(
"
test
"
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
@@ -794,7 +794,7 @@ requestPermissionsFromUser(permissions: Array<string>, requestCallback: As
```
js
this
.
context
.
requestPermissionsFromUser
(
permissions
,(
result
)
=>
{
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
stringfy
(
result
));
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
string
i
fy
(
result
));
});
```
...
...
@@ -823,9 +823,9 @@ requestPermissionsFromUser(permissions: Array<string>) : Promise<Permis
```
js
this
.
context
.
requestPermissionsFromUser
(
permissions
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
浏览文件 @
109be425
...
...
@@ -34,7 +34,7 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void
```
js
import
app
from
'
@ohos.application.appManager
'
;
app
.
isRunningInStabilityTest
((
err
,
flag
)
=>
{
console
.
log
(
'
startAbility result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
startAbility result:
'
+
JSON
.
string
i
fy
(
err
));
})
```
...
...
@@ -58,9 +58,9 @@ static isRunningInStabilityTest(): Promise<boolean>
```
js
import
app
from
'
@ohos.application.appManager
'
;
app
.
isRunningInStabilityTest
().
then
((
flag
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
flag
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
flag
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
zh-cn/application-dev/reference/apis/js-apis-notification.md
浏览文件 @
109be425
...
...
@@ -2525,12 +2525,12 @@ function onConsumeCallback(data) {
let
wantAgent
=
data
.
wantAgent
;
wantAgent
.
getWant
(
wantAgent
)
.
then
((
data1
)
=>
{
console
.
log
(
'
===> getWant success want:
'
+
JSON
.
stringfy
(
data1
));
console
.
log
(
'
===> getWant success want:
'
+
JSON
.
string
i
fy
(
data1
));
})
.
catch
((
err
)
=>
{
console
.
error
(
'
===> getWant failed because
'
+
JSON
.
stringfy
(
err
));
console
.
error
(
'
===> getWant failed because
'
+
JSON
.
string
i
fy
(
err
));
});
console
.
info
(
'
===> onConsume callback req.wantAgent:
'
+
JSON
.
stringfy
(
req
.
wantAgent
));
console
.
info
(
'
===> onConsume callback req.wantAgent:
'
+
JSON
.
string
i
fy
(
req
.
wantAgent
));
};
var
subscriber
=
{
...
...
zh-cn/application-dev/reference/apis/js-apis-service-extension-context.md
浏览文件 @
109be425
...
...
@@ -30,7 +30,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
"
abilityName
"
:
"
com.example.myapp.MyAbility
"
};
this
.
context
.
startAbility
(
want
,
(
err
)
=>
{
console
.
log
(
'
startAbility result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
startAbility result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -63,9 +63,9 @@ startAbility(want: Want): Promise<void>;
"
abilityName
"
:
"
com.example.myapp.MyAbility
"
};
this
.
context
.
startAbility
(
want
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
@@ -88,7 +88,7 @@ terminateSelf(callback: AsyncCallback<void>): void;
```
js
this
.
context
.
terminateSelf
((
err
)
=>
{
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -111,9 +111,9 @@ terminateSelf(): Promise<void>;
```
js
this
.
context
.
terminateSelf
(
want
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
@@ -174,7 +174,7 @@ disconnectAbility(connection: number, callback:AsyncCallback<void>): void;
```
js
this
.
context
.
disconnectAbility
(
connection
,
(
err
)
=>
{
// connection为connectAbility中的返回值
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -203,9 +203,9 @@ disconnectAbility(connection: number): Promise<void>;
```
js
this
.
context
.
disconnectAbility
(
connection
).
then
((
data
)
=>
{
// connection为connectAbility中的返回值
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
zh-cn/application-dev/reference/apis/js-apis-serviceExtAbilityContext.md
浏览文件 @
109be425
...
...
@@ -239,7 +239,7 @@ terminateSelf(callback: AsyncCallback<void>): void
```
js
this
.
context
.
terminateSelf
((
err
)
=>
{
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -261,9 +261,9 @@ terminateSelf(): Promise<void>
```
js
this
.
context
.
terminateSelf
(
want
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录