- 开发这平台
developer.huawei.com/consumer/cn…
- 《鸿蒙工程师认证》速拿秘籍
- HarmonyOS应用开发者高级认证
developer.huawei.com/consumer/cn…
- arkTs开发文档
developer.huawei.com/consumer/cn…
- 知识点
-
openHarmonyOS包含HarmonyOS
-
stage模型是什么意思???
-
框架中对应的几个配置文件
-
AppScope/app.json5 描述app整体信息
{
"app": {
"bundleName": "com.example.card",
"vendor": "example", // 公司名称
"versionCode": 1000000, // 版本code
"versionName": "1.0.0", // 版本号
"icon": "$media:app_icon", // APPicon
"label": "$string:app_name" // app名字
}
}
- src/main/module.json5 描述模块基本信息
```
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [ // 模块页面详细信息
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"description": "$string:ability_desc",
"icon": "$media:icon",
"label": "$string:ability_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"launchType": "singleton",
"exported": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
]
}
}
```
- src/main/resources/base/profile/main_pages.json 描述页面pages信息,就是说有多少个页面
{ // 所有页面都存在
"src": [
"pages/BusinessCardPage",
"pages/DetailPage",
"pages/login"
]
}
-
Ability和libary
Ability是UI的组件,libary是包类型
- 父子组件通信
- @Prop 单项通信
- @Link 双向通信
- 生命周期
@compoetent所有组件都包含的生命周期
- aboutToAppear
- aboutToDisappear
@enter入口组件包含的生命周期
- onPageShow
- onBackPress
- onPageHide
- [ ]