Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
9c594465
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9c594465
编写于
4月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3338 开发指南中引入Samples/Codelabs&快速入门system.router改为ohos.router:无需翻译
Merge pull request !3338 from 葛亚芳/OpenHarmony-3.1-Release
上级
96eb872d
e3c6bb0a
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
70 addition
and
69 deletion
+70
-69
en/application-dev/quick-start/start-with-ets-low-code.md
en/application-dev/quick-start/start-with-ets-low-code.md
+3
-3
en/application-dev/quick-start/start-with-ets.md
en/application-dev/quick-start/start-with-ets.md
+3
-3
en/application-dev/quick-start/start-with-js-low-code.md
en/application-dev/quick-start/start-with-js-low-code.md
+3
-3
en/application-dev/quick-start/start-with-js.md
en/application-dev/quick-start/start-with-js.md
+3
-3
zh-cn/application-dev/ability/fa-brief.md
zh-cn/application-dev/ability/fa-brief.md
+12
-1
zh-cn/application-dev/ability/fa-dataability.md
zh-cn/application-dev/ability/fa-dataability.md
+3
-9
zh-cn/application-dev/ability/fa-formability.md
zh-cn/application-dev/ability/fa-formability.md
+4
-6
zh-cn/application-dev/ability/fa-pageability.md
zh-cn/application-dev/ability/fa-pageability.md
+3
-6
zh-cn/application-dev/ability/fa-serviceability.md
zh-cn/application-dev/ability/fa-serviceability.md
+4
-21
zh-cn/application-dev/database/database-mdds-guidelines.md
zh-cn/application-dev/database/database-mdds-guidelines.md
+4
-0
zh-cn/application-dev/database/database-relational-guidelines.md
...pplication-dev/database/database-relational-guidelines.md
+4
-0
zh-cn/application-dev/database/database-storage-guidelines.md
...n/application-dev/database/database-storage-guidelines.md
+6
-1
zh-cn/application-dev/quick-start/start-with-ets-low-code.md
zh-cn/application-dev/quick-start/start-with-ets-low-code.md
+3
-3
zh-cn/application-dev/quick-start/start-with-ets.md
zh-cn/application-dev/quick-start/start-with-ets.md
+3
-3
zh-cn/application-dev/quick-start/start-with-js-low-code.md
zh-cn/application-dev/quick-start/start-with-js-low-code.md
+3
-3
zh-cn/application-dev/quick-start/start-with-js.md
zh-cn/application-dev/quick-start/start-with-js.md
+6
-3
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
+3
-1
未找到文件。
en/application-dev/quick-start/start-with-ets-low-code.md
浏览文件 @
9c594465
...
...
@@ -118,7 +118,7 @@ You can implement page redirection through the page router, which finds the targ
-
In the
**index.ets**
file:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
@@ -131,7 +131,7 @@ You can implement page redirection through the page router, which finds the targ
*/
onclick() {
router.push({
ur
i
: 'pages/second', // Specify the page to be redirected to.
ur
l
: 'pages/second', // Specify the page to be redirected to.
})
}
...
...
@@ -149,7 +149,7 @@ You can implement page redirection through the page router, which finds the targ
-
In the
**second.ets**
file:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
en/application-dev/quick-start/start-with-ets.md
浏览文件 @
9c594465
...
...
@@ -153,7 +153,7 @@ You can implement page redirection through the page router, which finds the targ
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
@@ -181,7 +181,7 @@ You can implement page redirection through the page router, which finds the targ
.height('5%')
// Bind the onClick event to the Next button so that clicking the button redirects the user to the second page.
.onClick(() => {
router.push({ ur
i
: 'pages/second' })
router.push({ ur
l
: 'pages/second' })
})
}
.width('100%')
...
...
@@ -196,7 +196,7 @@ You can implement page redirection through the page router, which finds the targ
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
en/application-dev/quick-start/start-with-js-low-code.md
浏览文件 @
9c594465
...
...
@@ -104,12 +104,12 @@ You can implement page redirection through the [page router](../ui/ui-js-buildin
-
In the
**index.js**
file:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
onclick() {
router.push({
ur
i
:'pages/second/second', // Specify the page to be redirected to.
ur
l
:'pages/second/second', // Specify the page to be redirected to.
})
}
}
...
...
@@ -127,7 +127,7 @@ You can implement page redirection through the [page router](../ui/ui-js-buildin
-
In the
**second.js**
file:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
back() {
...
...
en/application-dev/quick-start/start-with-js.md
浏览文件 @
9c594465
...
...
@@ -163,12 +163,12 @@ You can implement page redirection through the [page router](../ui/ui-js-buildin
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
onclick: function () {
router.push({
ur
i
: "pages/second/second"
ur
l
: "pages/second/second"
})
}
}
...
...
@@ -179,7 +179,7 @@ You can implement page redirection through the [page router](../ui/ui-js-buildin
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
back: function () {
...
...
zh-cn/application-dev/ability/fa-brief.md
浏览文件 @
9c594465
...
...
@@ -32,4 +32,15 @@ Ability框架在API 8及更早版本使用FA模型。FA模型中Ability分为Pag
## 进程线程模型
应用独享独立进程,Ability独享独立线程,应用进程在Ability第一次启动时创建,并为启动的Ability创建线程,应用启动后再启动应用内其他Ability,会为每一个Ability创建相应的线程。每个Ability绑定一个独立的JSRuntime实例,因此Ability之间是隔离的。
![
fa-threading-nodel
](
figures/fa-threading-model.png
)
\ No newline at end of file
![
fa-threading-nodel
](
figures/fa-threading-model.png
)
## 相关实例
针对Ability开发,有以下相关实例可供参考:
-
[
Page内和Page间导航跳转
](
https://gitee.com/openharmony/codelabs/tree/master/Ability/PageAbility
)
-
[
分布式调度启动远程FA
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA
)
-
[
分布式新闻客户端
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo
)
-
[
分布式手写板(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts
)
-
[
分布式鉴权(JS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/GameAuthOpenH
)
-
[
分布式游戏手柄(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/HandleGameApplication
)
-
[
分布式邮件(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/OHMailETS
)
-
[
分布式亲子早教系统(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/OpenHarmonyPictureGame
)
-
[
分布式遥控器(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteControllerETS
)
\ No newline at end of file
zh-cn/application-dev/ability/fa-dataability.md
浏览文件 @
9c594465
...
...
@@ -272,14 +272,8 @@ Data提供方可以自定义数据的增、删、改、查,以及文件打开
);
```
##
开发
实例
##
相关
实例
针对
dataAbility开发,有以下示例工程
可供参考:
针对
DataAbility开发,有以下相关实例
可供参考:
-
[
DataAbility
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DataAbility
)
本示例DataAbility中:
在DataAbility目录中的data.ts文件创建一个Data实例。
在MainAbility目录中封装了访问Data的流程。
-
[
`DataAbility`:DataAbility的创建与访问(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DataAbility
)
zh-cn/application-dev/ability/fa-formability.md
浏览文件 @
9c594465
...
...
@@ -326,10 +326,8 @@ Form需要在应用配置文件config.json中进行配置。
![
fa-form-example
](
figures/fa-form-example.png
)
##
开发
实例
##
相关
实例
针对FA模型卡片提供方的开发,有以下示例工程可供参考:
[
FormAbility
](
https://gitee.com/openharmony/app_samples/tree/master/ability/FormAbility
)
本示例FormAbility提供了一张卡片。用户可以通过桌面或者自己开发的卡片使用方,进行卡片的创建、更新和删除等操作。并且本示例通过轻量级数据存储实现了卡片信息的持久化。
\ No newline at end of file
针对FA模型卡片提供方的开发,有以下相关实例可供参考:
-
[
`FormAbility`:FA模型卡片(JS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/FormAbility
)
-
[
`FormLauncher`:卡片使用方(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/FormLauncher
)
\ No newline at end of file
zh-cn/application-dev/ability/fa-pageability.md
浏览文件 @
9c594465
...
...
@@ -259,9 +259,6 @@ export default {
},
}
```
### 开发实例
针对pageAbility开发,有以下示例工程可供参考:
[
DMS
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
在本示例中完整展示了启动本地Ability、启动远程Ability的使用方法。
\ No newline at end of file
## 相关实例
针对PageAbility开发,有以下相关实例可供参考:
-
[
`DMS`:分布式Demo(eTS)(API7)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
\ No newline at end of file
zh-cn/application-dev/ability/fa-serviceability.md
浏览文件 @
9c594465
...
...
@@ -395,25 +395,8 @@ export default {
};
```
##
开发
实例
##
相关
实例
### 针对serviceAbility开发,有以下示例工程可供参考:
-
[
ServiceAbility
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility
)
本示例ServiceAbility中:
在ServiceAbility目录中的service.ts文件创建一个本地Service。
在MainAbility目录中封装了启动、连接本地Services的流程。
### 针对跨设备serviceAbility开发,有以下示例工程可供参考:
-
[
DMS
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
本示例DMS中:
在ServiceAbility目录中的service.ts文件创建一个远程Service。
在RemoteAbility目录中封装了连接远程Services的流程。
针对ServiceAbility开发,有以下相关实例可供参考:
-
[
`ServiceAbility`:ServiceAbility的创建与使用(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility
)
-
[
`DMS`:分布式Demo(eTS)(API7)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
\ No newline at end of file
zh-cn/application-dev/database/database-mdds-guidelines.md
浏览文件 @
9c594465
...
...
@@ -172,3 +172,7 @@ OpenHarmony系统中的分布式数据服务模块为开发者提供下面几种
}
kvStore.sync(deviceIds, distributedData.SyncMode.PUSH_ONLY, 1000);
```
## 相关实例
针对分布式数据开发,有以下相关实例可供参考:
-
[
`KvStore`:分布式数据库(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/data/Kvstore
)
-
[
分布式数据库
](
https://gitee.com/openharmony/codelabs/tree/master/Data/JsDistributedData
)
\ No newline at end of file
zh-cn/application-dev/database/database-relational-guidelines.md
浏览文件 @
9c594465
...
...
@@ -306,3 +306,7 @@
let tableName = rdbStore.obtainDistributedTableName(deviceId, "test");
let resultSet = rdbStore.querySql("SELECT * FROM " + tableName)
```
## 相关实例
针对关系型数据库开发,有以下相关实例可供参考:
-
[
`Rdb`:关系型数据库(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/data/Rdb
)
-
[
关系型数据库
](
https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData
)
\ No newline at end of file
zh-cn/application-dev/database/database-storage-guidelines.md
浏览文件 @
9c594465
...
...
@@ -161,4 +161,9 @@
console.info("Deleted successfully.")
}).catch((err) => {
console.info("Deleted failed with err: " + err)})
```
\ No newline at end of file
```
## 相关实例
针对轻量级数据存储开发,有以下相关实例可供参考:
-
[
`LiteStorage`:轻量级存储(eTS)(API7)
](
https://gitee.com/openharmony/app_samples/tree/master/data/LiteStorage
)
-
[
轻量级偏好数据库
](
https://gitee.com/openharmony/codelabs/tree/master/Data/Database
)
-
[
备忘录(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Data/NotePad_OH_ETS
)
\ No newline at end of file
zh-cn/application-dev/quick-start/start-with-ets-low-code.md
浏览文件 @
9c594465
...
...
@@ -120,7 +120,7 @@ OpenHarmony低代码开发方式具有丰富的UI界面编辑功能,通过可
-
“
**index.ets**
”示例如下:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
@@ -133,7 +133,7 @@ OpenHarmony低代码开发方式具有丰富的UI界面编辑功能,通过可
*/
onclick() {
router.push({
ur
i
: 'pages/second', // 指定要跳转的页面
ur
l
: 'pages/second', // 指定要跳转的页面
})
}
...
...
@@ -151,7 +151,7 @@ OpenHarmony低代码开发方式具有丰富的UI界面编辑功能,通过可
-
“
**second.ets**
”示例如下:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
zh-cn/application-dev/quick-start/start-with-ets.md
浏览文件 @
9c594465
...
...
@@ -155,7 +155,7 @@
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
@@ -183,7 +183,7 @@
.height('5%')
// 跳转按钮绑定onClick事件,点击时跳转到第二页
.onClick(() => {
router.push({ ur
i
: 'pages/second' })
router.push({ ur
l
: 'pages/second' })
})
}
.width('100%')
...
...
@@ -198,7 +198,7 @@
```
import router from '@
system
.router';
import router from '@
ohos
.router';
@Entry
@Component
...
...
zh-cn/application-dev/quick-start/start-with-js-low-code.md
浏览文件 @
9c594465
...
...
@@ -107,12 +107,12 @@ OpenHarmony低代码开发方式具有丰富的UI界面编辑功能,通过可
-
“
**index.js**
”示例如下:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
onclick() {
router.push({
ur
i
:'pages/second/second', // 指定要跳转的页面
ur
l
:'pages/second/second', // 指定要跳转的页面
})
}
}
...
...
@@ -130,7 +130,7 @@ OpenHarmony低代码开发方式具有丰富的UI界面编辑功能,通过可
-
“
**second.js**
”示例如下:
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
back() {
...
...
zh-cn/application-dev/quick-start/start-with-js.md
浏览文件 @
9c594465
...
...
@@ -168,12 +168,12 @@
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
onclick: function () {
router.push({
ur
i
: "pages/second/second"
ur
l
: "pages/second/second"
})
}
}
...
...
@@ -184,7 +184,7 @@
```
import router from '@
system
.router';
import router from '@
ohos
.router';
export default {
back: function () {
...
...
@@ -210,3 +210,6 @@
!
[
zh-cn_image_0000001217527892
](
figures/zh-cn_image_0000001217527892.png
)
恭喜您已经使用JS语言开发(传统代码方式)完成了第一个OpenHarmony应用,快来
[
探索更多的OpenHarmony功能
](
../application-dev-guide.md
)
吧。
## 相关实例
针对使用JS语言(传统代码方式)开发快速入门,有以下相关实例可供参考:
-
[
`JsHelloWorld`:你好世界(JS)(API7)
](
https://gitee.com/openharmony/app_samples/tree/master/common/JsHelloWorld
)
\ No newline at end of file
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
浏览文件 @
9c594465
...
...
@@ -35,4 +35,6 @@ screenshot.save(ScreenshotOptions).then((image) => {
console
.
log
(
'
screenshot.save failed, error :
'
+
JSON
.
stringify
(
err
));
})
```
## 相关实例
针对屏幕截图开发,有以下相关实例可供参考:
-
[
`Screenshot`:基础功能-屏幕截图(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/Basic/Screenshot
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录