当前位置:网站首页>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
边栏推荐
- How to delete gridlines in ggplot2 (with examples)
- Camtasia 2022全新版超清錄制電腦視頻
- R 语言马尔可夫链蒙特卡洛:实用介绍
- Gd32 ADC acquisition voltage
- Gold three silver four~
- Can the main RF circuit be removed for projects that do not need the main RF?
- Arduino string to hexadecimal number for large color serial port screen.
- 在UE内添加控制台工程(Programs)
- 【QT】自定义控件-开关
- 限制输入字符长度length英文1个字符中文2个字符
猜你喜欢

Interviewer: please name four ways to exchange the values of two variables without using third-party variables

数据库查询语句SQL中like、%、-的区别

Classic quotations from "human nature you must not know"

【flask入门系列】flask处理请求和处理响应

ORB-SLAM3论文概述
![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,

UTONMOS坚持“藏品、版权”双优原则助力传统文化高质量发展

Learn Tai Chi Maker - mqtt (IV) server connection operation

Fresh graduates talk about their graduation stories

High availability in Internet three highs (high concurrency, high performance and high availability)
随机推荐
2021-08-04
Survival analysis based on ovarian data set
Business process diagram design
MySQL updates records based on the queried data
网上开户选哪个证券公司?网上开户是否安全么?
音视频与CPU架构
【QT】自定义控件-空气质量仪表盘
Camtasia 2022 nouvelle vidéo d'ordinateur d'enregistrement ultra - clair
UTONMOS:以数字藏品助力华夏文化传承和数字科技发展
Learn from Taiji makers - mqtt (V) publish, subscribe and unsubscribe
在 R 中创建非线性最小二乘检验
GD32 ADC采集电压
Multi surveyor Gongshu campus Xiao sir_ Page error in Jenkins
Authorization of database
Share some remote office experience in Intranet operation | community essay solicitation
数据库查询语句SQL中like、%、-的区别
【解决】CMake was unable to find a build program corresponding to “Unix Makefiles“.
PCA and automatic encoder for dimension reduction of R language
限制输入字符长度length英文1个字符中文2个字符
Classic quotations from "human nature you must not know"

