Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
0a913b19
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看板
提交
0a913b19
编写于
6月 07, 2023
作者:
Y
yuyaozhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix docs vod of ability
Signed-off-by:
N
yuyaozhi
<
yuyaozhi@huawei.com
>
上级
027e66f8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
10 deletion
+10
-10
zh-cn/application-dev/application-models/access-dataability.md
.../application-dev/application-models/access-dataability.md
+1
-1
zh-cn/application-dev/application-models/application-context-fa.md
...lication-dev/application-models/application-context-fa.md
+2
-2
zh-cn/application-dev/application-models/connect-serviceability.md
...lication-dev/application-models/connect-serviceability.md
+5
-5
zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md
...reference/apis/js-apis-inner-ability-dataAbilityHelper.md
+1
-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/application-models/access-dataability.md
浏览文件 @
0a913b19
...
...
@@ -23,7 +23,7 @@
// 作为参数传递的URI,与config中定义的URI的区别是多了一个"/",有三个"/"
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
ohos_data_ability
from
'
@ohos.data.dataAbility
'
import
ohos_data_rdb
from
'
@ohos.data.rdb
'
import
relationalStore
from
'
@ohos.data.relationalStore
'
let
urivar
=
"
dataability:///com.ix.DataAbility
"
let
DAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
urivar
);
...
...
zh-cn/application-dev/application-models/application-context-fa.md
浏览文件 @
0a913b19
...
...
@@ -48,13 +48,13 @@ let context = featureAbility.getContext()
```
ts
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
bundle
from
'
@ohos.bundle
'
;
import
bundle
Manager
from
'
@ohos.bundle.bundleManager
'
;
export
default
{
onCreate
()
{
// 获取context并调用相关方法
let
context
=
featureAbility
.
getContext
();
context
.
setDisplayOrientation
(
bundle
.
DisplayOrientation
.
LANDSCAPE
).
then
(()
=>
{
context
.
setDisplayOrientation
(
bundle
Manager
.
DisplayOrientation
.
LANDSCAPE
).
then
(()
=>
{
console
.
info
(
"
Set display orientation.
"
)
})
console
.
info
(
'
Application onCreate
'
)
...
...
zh-cn/application-dev/application-models/connect-serviceability.md
浏览文件 @
0a913b19
...
...
@@ -17,14 +17,14 @@ PageAbility创建连接本地ServiceAbility回调实例的代码以及连接本
```
ts
import
rpc
from
"
@ohos.rpc
"
import
prompt
from
'
@system.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
let
option
=
{
onConnect
:
function
onConnectCallback
(
element
,
proxy
)
{
console
.
info
(
`onConnectLocalService onConnectDone`
)
if
(
proxy
===
null
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Connect service failed
"
})
return
...
...
@@ -34,19 +34,19 @@ let option = {
let
option
=
new
rpc
.
MessageOption
()
data
.
writeInterfaceToken
(
"
connect.test.token
"
)
proxy
.
sendRequest
(
0
,
data
,
reply
,
option
)
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Connect service success
"
})
},
onDisconnect
:
function
onDisconnectCallback
(
element
)
{
console
.
info
(
`onConnectLocalService onDisconnectDone element:
${
element
}
`
)
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Disconnect service success
"
})
},
onFailed
:
function
onFailedCallback
(
code
)
{
console
.
info
(
`onConnectLocalService onFailed errCode:
${
code
}
`
)
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Connect local service onFailed
"
})
}
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md
浏览文件 @
0a913b19
...
...
@@ -18,7 +18,7 @@ import ability from '@ohos.ability.ability';
使用前根据具体情况引入如下模块
```
ts
import
ohos_data_ability
from
'
@ohos.data.dataAbility
'
;
import
ohos_data_rdb
from
'
@ohos.data.rdb
'
;
import
relationalStore
from
'
@ohos.data.relationalStore
'
```
## DataAbilityHelper.openFile
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
浏览文件 @
0a913b19
...
...
@@ -985,7 +985,7 @@ terminateSelf(callback: AsyncCallback<void>): void;
terminateSelf(): Promise
<
void
>
;
停止自身。通过Promise返回结果。
停止
ability
自身。通过Promise返回结果。
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录