当前位置:网站首页>HarmonyOS笔记-----------(三)
HarmonyOS笔记-----------(三)
2022-07-30 19:46:00 【头秃小程】
1.生命周期
页面A的生命周期接口的调用顺序
- 打开页面A:onInit() -> onReady() -> onShow()
- 在页面A打开页面B:onHide()
- 从页面B返回页面A:onShow()
- 退出页面A:onBackPress() -> onHide() -> onDestroy()
- 页面隐藏到后台运行:onInactive() -> onHide()
- 页面从后台运行恢复到前台:onShow() -> onActive()
2.案例
cookbook相关代码
<element name= "cb-swiper" src="./swiper/swiper"></element>
<element name= "cb-hotcate" src="./hotcate/hotcate"></element>
<div class= "cb-container">
<div class="cb-title">
<text>美食大全</text>
</div>
<div class="cb-body">
<list>
<list-item class="cb-body-item">
<cb-swiper list="{
{list}}"></cb-swiper>
</list-item>
<list-item class="cb-body-item">
<cb-hotcate></cb-hotcate>
</list-item>
</list>
</div>
</div>.cb-container {
flex-direction: column ;
}
.cb-body {
flex: 1;
}
.cb-body-item{
flex-direction: column;
}
.cb-title {
width: 100%;
height: 44px;
justify-content: center;
align-items: center;
background-color: #ee742f;
}
text{
font-size: 16px;
font-weight: normal;
color:#fff;
}// @ts-nocheck
import list from '../../../common/data/cook-list.json';
export default {
data: {
list: []
} ,
onInit() {
this.list=list.data
}
}边栏推荐
- el-input can only input integers (including positive numbers, negative numbers, 0) or only integers (including positive numbers, negative numbers, 0) and decimals
- 055 c# print
- iPhone真是十三香?两代产品完全对比,或许上一代更值得买
- MySQL六脉神剑,SQL通关大总结
- MindSpore:自定义dataset的tensor问题
- Linux download and install mysql5.7 version tutorial the most complete and detailed explanation
- MySQL性能优化(硬件,系统配置,表结构,SQL语句)
- centos7安装mysql8
- jOOQ是如何设计事务API(详细指南)
- [hbuilder] cannot run some projects, open the terminal and cannot enter commands
猜你喜欢

Linux下安装MySQL教程

The 17th "Revitalization Cup" National Youth Vocational Skills Competition - Computer Programmers (Cloud Computing Platform and Operation and Maintenance) Participation Review and Summary

MindSpore:【模型训练】【mindinsight】timeline的时间和实际用时相差很远

Database indexes: indexes are not a panacea

MySQL性能优化(硬件,系统配置,表结构,SQL语句)

MySQL sub-database sub-table

Talking about Contrastive Learning (Contrastive Learning) the first bullet

已删除

MySQL数据库主从配置

ELK log analysis system
随机推荐
[Node implements data encryption]
Correct pose of Vulkan open feature
Install MySQL tutorial under Linux
MindSpore:自定义dataset的tensor问题
Cesium loads offline maps and offline terrain
ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
MYSQL(基本篇)——一篇文章带你走进MYSQL的奇妙世界
M3SDA:用于多源域自适应的矩匹配
【视频】极值理论EVT与R语言应用:GPD模型火灾损失分布分析
Google's AlphaFold claims to have predicted almost every protein structure on Earth
来了!东方甄选为龙江农产品直播带货
Start foreground Activity
MySQL数据库主从配置
时间复杂度与空间复杂度
Niuke.com - Huawei Question Bank (100~108)
Database indexes: indexes are not a panacea
【MindSpore】用coco2017训练Model_zoo上的 yolov4,迭代了两千多batch_size之后报错,大佬们帮忙看看。
MySql密码
MySQL database - DQL data query language
mysql慢查询优化