当前位置:网站首页>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
边栏推荐
猜你喜欢

《你不可不知的人性》經典語錄
![2022-06-25:给定一个正数n, 表示有0~n-1号任务, 给定一个长度为n的数组time,time[i]表示i号任务做完的时间, 给定一个二维数组matrix, matrix[j] = {a,](/img/93/d95255bae20b138851bdc8a50f8647.png)
2022-06-25:给定一个正数n, 表示有0~n-1号任务, 给定一个长度为n的数组time,time[i]表示i号任务做完的时间, 给定一个二维数组matrix, matrix[j] = {a,

组件与路由

分享一些在内网操作的远程办公经验| 社区征文

【解决】联想拯救者vmware启动虚拟机蓝屏重启问题

Gold three silver four~

Introduction to bloc: detailed explanation of cube

Multi surveyor Gongshu Xiao sir_ The solution of using websocket error reporting under working directory

55 pictures make you feel a bit B-tree at one time

df报错Stale file handle
随机推荐
如何提词条
Problem solving process of no internet access
Gd32 ADC acquisition voltage
限制输入字符长度length英文1个字符中文2个字符
《你不可不知的人性》经典语录
Google 推荐在 MVVM 架构中使用 Kotlin Flow
在UE内添加控制台工程(Programs)
Redis configuration and optimization of NoSQL
Teach you to quickly record sounds on PC web pages as audio files
55 pictures make you feel a bit B-tree at one time
2021-08-04
2022-06-25:给定一个正数n, 表示有0~n-1号任务, 给定一个长度为n的数组time,time[i]表示i号任务做完的时间, 给定一个二维数组matrix, matrix[j] = {a,
解读Oracle
ORB-SLAM3论文概述
Translation notes of orb-slam series papers
NoSQL之Redis配置与优化
R 语言降维的 PCA 与自动编码器
2022-06-25: given a positive number n, it means that there are tasks 0~n-1. Given an array of length N, time[i] means the time when task I is completed. Given a two-dimensional array matrix, matrix[j]
R语言 生存分析
学习太极创客 — MQTT(五)发布、订阅和取消订阅

