当前位置:网站首页>鸿蒙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 |
重点三:各类组件的应用
视频在群里

边栏推荐
- Vscode outline preview cannot find file symbol
- Understanding management - four dimensions of executive power
- ‘CMRESHandler‘ object has no attribute ‘_timer‘,socket.gaierror: [Errno 8] nodename nor servname pro
- Imx6q PWM drive
- The function of C language string Terminator
- 5、 El expression & JSTL tag library
- D cannot use a non CTFE pointer
- New knowledge: monkey improved app crawler
- D
- [data clustering] data set, visualization and precautions are involved in this column
猜你喜欢

Explain ADC in stm32

2022电工(初级)考试题库及模拟考试

初中学历,从不到3K,到月薪30K+,不设限的人生有多精彩

Scons compiling imgui

Introduction to JDE object management platform and use of from

应届生苦恼:是去华为拿1万多低薪,还是去互联网拿2万多高薪

基于eNSP加防火墙的千人中型校园/企业网络规划与设计(附所有配置命令)

Detailed explanation of memory addressing in 8086 real address mode

Troubleshooting of cl210openstack operation -- Chapter experiment
![[image detection] SAR image change detection based on depth difference and pcanet with matlab code](/img/c7/05bfa88ef1a4a38394b81755966e46.png)
[image detection] SAR image change detection based on depth difference and pcanet with matlab code
随机推荐
d不能用非常ctfe指针
Putty installation and use
【图像去噪】基于高斯滤波、均值滤波、中值滤波、双边滤波四种滤波实现椒盐噪声图像去噪附matlab代码
Day 6 of pyhon
右击文件转圈卡住、刷新、白屏、闪退、桌面崩溃的通用解决方法
Difference and application of SPI, UART and I2C communication
Design an open source continuous deployment pipeline based on requirements
Decryption game of private protocol: from secret text to plaintext
knife4j 初次使用
"I was laid off by a big factory"
‘CMRESHandler‘ object has no attribute ‘_timer‘,socket.gaierror: [Errno 8] nodename nor servname pro
【图像检测】基于深度差分和PCANet实现SAR图像变化检测附matlab代码
[image denoising] image denoising based on partial differential equation (PDE) with matlab code
Beginners can't tell the difference between framework and class library
Kali and programming: how to quickly build the OWASP website security test range?
【图像去噪】基于偏微分方程(PDE)实现图像去噪附matlab代码
基于eNSP加防火墙的千人中型校园/企业网络规划与设计(附所有配置命令)
初中学历,从不到3K,到月薪30K+,不设限的人生有多精彩
libprint2
Imx6q PWM drive