当前位置:网站首页>Uni app advanced life cycle
Uni app advanced life cycle
2022-07-28 10:13:00 【Hua Weiyun】
uni-app Advanced lifecycle

Uni app The following application lifecycle features are supported :
Pay attention to the :
Ontabitemtap Usually used to click the current tab item to scroll or refresh the current page . If you click another tab item , Page switching will be triggered .
If you want to click an application side tab item without jumping to the page , Cannot be used ontabitemtap. You can use plus nativeObj. The view places a block over the original tab item , And intercept the click event .
Alipay applet platform ontabitemtap Triggered after clicking a non current tab item , So it cannot be used to click back to the top
onTabItemTap : function(e) { console.log(e); // e The return format of is json object : {"index":0,"text":" home page ","pagePath":"pages/index/index"}},1、uni app framework The life cycle of Vue And wechat applet Life cycle of
2、Onlaunch Used in global applications to indicate when the application starts
3、 Used on the page onload or Onshow Indicates when the page is loaded and when the page is displayed
4、 When installing components installed in components
app.vue:
onLaunch: function() { console.log('App Launch App launch ') }, In fact, it's just typing “ App launch ” Four words , The app was triggered
then , At run time , You can see that... Is displayed first “ Application startup ”, Then show “ Page loading complete ”
This is still the case . The second life cycle of the experiment Onshow It's still the same
But in the third experiment , We can try to install the lifecycle on the plug-in , We will find that it can run successfully
<script> export default { onLoad(){ console.log("my-form onLoad"); }, mounted() { console.log("myform mounted"); } }</script>Page cycle
1.onload( Listen for page loading )
2.onshow( Monitor page display )
3.onready( Complete the first rendering of the listening page )
4.onhide( Hide listening page )
5.onunload: Unload the listening page
6.onresize: Monitor window size changes
7.onpulldownrefresh: Listen for user drop-down actions . Usually used for pull-down refresh
onBackPress Callback parameter object :
export default { data() { return {}; }, onBackPress(options) { console.log('from:' + options.from) }}边栏推荐
- MySQL架构原理
- Kubernetes
- 头文件库文件
- Introduction to evaluatorfilter
- Redis interview questions must be known and learned
- Redis design specification
- What are the highlights of B2B2C system? How to help jewelry enterprises build an omni channel multi merchant mall management system
- _HUGE and __IMP__HUGE in “math.h“
- LandingSite电子标签Quuppa固件进入DFU状态说明
- 并查集
猜你喜欢

Voice chat app - how to standardize the development process?

Xiao Hei stands up again and looks at leetcode:653. Sum of two IV - enter BST

B2B e-commerce website scheme for building materials industry: enable the transformation and upgrading of building materials enterprises to achieve cost reduction and efficiency improvement

Digital transformation scheme of real estate: all-round digital intelligence system operation, helping real estate enterprises improve the effectiveness of management and control

Skillfully use NGX_ Lua makes traffic grouping
![[ESP32][esp-idf] esp32s3快速搭建LVGLV7.9](/img/39/8efef047d0a9223b97819a54b5edf8.png)
[ESP32][esp-idf] esp32s3快速搭建LVGLV7.9
![[jzof] 14 cut rope](/img/36/6f58b443a549ad245c1c4cfe5d13af.png)
[jzof] 14 cut rope

API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试
![[esp32][esp idf] esp32s3 quickly build lvglv7.9](/img/39/8efef047d0a9223b97819a54b5edf8.png)
[esp32][esp idf] esp32s3 quickly build lvglv7.9

Why should I take the first-class constructor examination? How high is the gold content of the first-class Constructor Certificate?
随机推荐
【学习笔记】border与period
Uni app advanced creation component / native rendering
二维前缀和
软件设计师考前20问,注意啦!!
什么样的知识付费系统功能,更有利于平台与讲师发展?
Choosing a supplier service system is the first step for large health industry enterprises to move towards digital transformation
并查集
ES(8.1)认证题目
Redis设计规范
Read Plato farm's eplato and the reason for its high premium
Function introduction and description of @jsontype annotation in fastjson
安装gmp
Arthas tutorial
CloudCompare&PCL 匹配点采样一致性抑制
SkiaSharp 之 WPF 自绘 拖曳小球(案例版)
JS promotion: the underlying principle of flat tiling
Installing MySQL for Linux operating system (centos7)
What are the advantages of MRO purchasing website for industrial products? One article will help you understand
Edge team explains how to improve the comprehensive performance experience through disk cache compression technology
select如果不加order by子句,返回结果的顺序是不可靠的