当前位置:网站首页>鸿蒙os-第一次培训
鸿蒙os-第一次培训
2022-06-12 07:18:00 【沂安】
重点一:整体结构
JS FA 应用的 JS 模块 (entry/src/main/js/module) 的典型开发目录结构如下:

目录结构中文件分类如下:
hml 结尾的 HML 模板文件,这个文件用来描述当前页面的文件布局结构。
css 结尾的 CSS 样式文件,这个文件用于描述页面样式。
js 结尾的 JS 文件,这个文件用于处理页面和用户的交互。
各个文件夹的作用:
- app.js 文件用于全局 JavaScript 逻辑和应用生命周期管理。
- pages 目录用于存放所有组件页面。
- common 目录用于存放公共资源文件,比如:媒体资源和 JS 文件。
- i18n 目录用于配置不同语言场景资源内容,比如:应用文本词条,图片路径等资源,注意 i18n 是开发保留文件夹,不可重命名。
重点二:基础组件
组件(Component)是构建页面的核心,每个组件通过对数据和方法的简单封装,实现独立的可视、可交互功能单元。组件之间相互独立,随取随用,也可以在需求相同的地方重复使用。
鸿蒙 JS API 提供了完善的组件介绍,详细情况我们去查阅一下官方文档: 组件 - 官方介绍
根据组件的功能,可以分为以下四大类:
| 组件类型 | 主要组件 |
|---|---|
| 基础组件 | text、image、progress、rating、span、marquee、image-animator、divider、search、menu、chart |
| 容器组件 | div、list、list-item、stack、swiper、tabs、tab-bar、tab-content、list-item-group、refresh、dialog |
| 媒体组件 | video |
| 画布组件 | canvas |
重点三:各类组件的应用
视频在群里

边栏推荐
- Keil installation of C language development tool for 51 single chip microcomputer
- Descscheduler secondary scheduling makes kubernetes load more balanced
- Scons编译IMGUI
- i. Mx6ul porting openwrt
- Pyhon的第五天
- Installation and use of eigen under vs2017
- 右击文件转圈卡住、刷新、白屏、闪退、桌面崩溃的通用解决方法
- 五、EL 表达式& JSTL 标签库
- 基于eNSP加防火墙的千人中型校园/企业网络规划与设计(附所有配置命令)
- Kali与编程:如何快速搭建OWASP网站安全实验靶场?
猜你喜欢

LVDS drive adapter

esp32 hosted

Scons编译IMGUI

Curry carries the fourth game of the warriors against the Celtics

Scons compiling imgui

晶闸管,它是很重要的,交流控制器件

新知识:Monkey 改进版之 App Crawler

2022起重机械指挥考试题模拟考试平台操作

Design an open source continuous deployment pipeline based on requirements

Detailed explanation of memory addressing in 8086 real address mode
随机推荐
[image denoising] image denoising based on partial differential equation (PDE) with matlab code
Dynamic coordinate transformation in ROS (dynamic parameter adjustment + dynamic coordinate transformation)
LED lighting experiment with simulation software proteus
Explain in detail the use of dynamic parameter adjustment and topic communication in ROS (principle + code + example)
Detailed explanation of 14 registers in 8086CPU
Kotlin plug-ins kotlin Android extensions
Class as a non type template parameter of the template
应届生苦恼:是去华为拿1万多低薪,还是去互联网拿2万多高薪
基于eNSP加防火墙的千人中型校园/企业网络规划与设计(附所有配置命令)
Nine project management issues that PM should understand
d的扩大@nogc
5、 El expression & JSTL tag library
Win10 list documents
晶闸管,它是很重要的,交流控制器件
New knowledge: monkey improved app crawler
Tradeoff and selection of SWC compatible Polyfill
Node: cannot open /node: access denied
openwrt uci c api
Detailed explanation of coordinate tracking of TF2 operation in ROS (example + code)
2022起重机械指挥考试题模拟考试平台操作