当前位置:网站首页>uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
2022-07-07 11:07:00 【愛敲代碼的狼仔】
在onLaunch中重定向會導致點擊事件失效的問題
解决方法:
1、在跳轉的函數加一個setTimeout,但是會導致有時setTimeout函數內的跳轉失敗
onLaunch() { setTimeout(() => { uni.reLaunch({ url: '/pages/user/user' }) }, 0) }
2、在新跳轉的頁面的onLoad中編寫自己的邏輯
边栏推荐
- Find the root of equation ax^2+bx+c=0 (C language)
- 如何顺利通过下半年的高级系统架构设计师?
- uniCloud
- Mysql的json格式查询
- The fifth training assignment
- What are the contents of the intermediate soft test, the software designer test, and the test outline?
- Installation and configuration of slurm resource management and job scheduling system
- 书签整理-程序员常用网站导航
- 滚动踩坑--UNI_APP(八)
- 2022.7.6DAY598
猜你喜欢
Deeply understand the characteristics of database transaction isolation
2021 summary and 2022 outlook
How much review time does it usually take to take the intermediate soft exam?
SQL Server 知识汇集9 : 修改数据
【推荐系统 02】DeepFM、YoutubeDNN、DSSM、MMOE
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
CSAPP bomb lab parsing
1321: [example 6.3] deletion problem (noip1994)
[untitled]
PHP \ newline cannot be output
随机推荐
【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer
Online hard core tools
【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
中级软件评测师考什么
软考中级,软件设计师考试那些内容,考试大纲什么的?
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
The difference between monotonicity constraint and anti monotonicity constraint
2022年7月10日“五心公益”活动通知+报名入口(二维码)
shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)
[recommendation system 01] rechub
变量的解构赋值
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
软考信息处理技术员有哪些备考资料与方法?
Unity determines whether the mouse clicks on the UI
VR development optimization
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
SQL Server knowledge collection 11: Constraints
[untitled]
Long list performance optimization scheme memo