当前位置:网站首页>Notes on the 3rd harmonyos training in the studio
Notes on the 3rd harmonyos training in the studio
2022-06-26 03:01:00 【Eternal @ [email protected]】
Catalog
One 、 Directory structure
- Directory structure

- Main concern entry--》src--》main This file

- app.js Files are used for global JavaScript Logic and entire application lifecycle management .
- pages The directory is used to store all component pages .
- common Directory is used to store public resource files , such as : Media resources and JS file .
- i18n The directory is used to configure the content of resources in different language scenes , such as : Apply text entry , Path... Pictures, etc , Be careful i18n Is the development retention folder , Cannot rename .
Two 、 Life cycle
Page Different state transitions in the lifecycle and their corresponding callbacks

- onStart()
When the system was first created Page When an instance , Trigger the callback . For one Page example , The callback is triggered only once during its life cycle , Page After this logic will enter INACTIVE state . Developers have to rewrite the method , And configure the default display here AbilitySlice.
- onActive()
Page Will be entering INACTIVE The status goes to the front desk , Then the system calls the callback .Page After that, enter ACTIVE state , This state is the state in which the application interacts with the user .Page Will remain in this state , Unless something happens that causes Page Lose focus , For example, the user clicks the back button or navigates to other Page. When something like this happens , Will trigger Page go back to INACTIVE state , The system will call onInactive() Callback . thereafter ,Page Maybe back to ACTIVE state , The system will call again onActive() Callback . therefore , Developers often need to implement in pairs onActive() and onInactive(), And in onActive() To obtain in onInactive() The released resources in .
- onStop()
The system is about to be destroyed Page when , This callback function will be triggered , Inform users to release system resources .
3、 ... and 、list Components
Group list :<list-item-group>
Normal list :<list-item>

Four 、 Routing jump
Use router.push, Import the module first

5、 ... and 、swipe Components
Developers just need to focus on the implementation logic , Provide the ability to switch the display of sub components

版权声明
本文为[Eternal @ [email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260219462224.html
边栏推荐
- 【系统架构】-如何评估软件架构
- GD32 ADC采集电压
- I am in Zhongshan. Where can I open an account? Is it safe to open an account online?
- Technology is to be studied
- Explain the JVM clearly at one time and don't be asked by the interviewer again
- 分享一些在内网操作的远程办公经验| 社区征文
- 程序员的八年工资变动,令网友羡慕不已:你一个月顶我一年工资
- Oracle exercise
- 多测师拱墅校区肖sir_jenkins中搭建出现页面报错
- Multi surveyor Gongshu campus Xiao sir_ Page error in Jenkins
猜你喜欢

UE5全局光照系统Lumen解析与优化

数据库的授权

学习太极创客 — MQTT(四)服务端连接操作

Gold three silver four~

ArrayList#subList这四个坑,一不小心就中招

OpenAPI 3.0 specification - Food Guide

The programmer's eight-year salary change has made netizens envious: you pay me one year's salary per month

《你不可不知的人性》经典语录

业务流程图设计

【解决】CMake was unable to find a build program corresponding to “Unix Makefiles“.
随机推荐
scrapy返回400
[flask introduction series] flask processing request and response
Is it safe to open a securities account at the school of Finance and business in 2022?
OpenAPI 3.0 规范-食用指南
Matlab|基于BP神经网络进行电力系统短期负荷预测
应届毕业生谈毕业的故事
《你不可不知的人性》經典語錄
业务流程图设计
MySQL updates records based on the queried data
如何在 ggplot2 中向绘图中添加表格
[machinetranslation] - Calculation of Bleu value
NoSQL之Redis配置与优化
分享一些在内网操作的远程办公经验| 社区征文
MySQL根据查询的数据更新记录
R language survival analysis
分布式电商项目 谷粒商城 学习笔记<3>
UTONMOS:以数字藏品助力华夏文化传承和数字科技发展
R 语言降维的 PCA 与自动编码器
Which securities company should I choose to open an account online? Is it safe to open an account online?
Oracle练习

