当前位置:网站首页>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中編寫自己的邏輯
边栏推荐
- Mendeley -- a free document management tool that automatically inserts references into papers
- 如何顺利通过下半年的高级系统架构设计师?
- Deconstruction and assignment of variables
- Deep understanding of Apache Hudi asynchronous indexing mechanism
- Find the greatest common divisor and the least common multiple (C language)
- 打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?
- [untitled]
- Some online academic report websites and machine learning videos
- 【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
- 2022.7.6DAY598
猜你喜欢

Mysql的json格式查询
![[untitled]](/img/f9/18b85ad17d4c560f2b9d95a53ee72a.jpg)
[untitled]

深入理解Apache Hudi异步索引机制

香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法

What does intermediate software evaluator test

【亲测可行】error while loading shared libraries的解决方案

Ping tool ICMP message learning

【pyqt】tableWidget里的cellWidget使用信号与槽机制

Find the greatest common divisor and the least common multiple (C language)

想考中级软考,一般需要多少复习时间?
随机推荐
uniCloud
Galaxy Kirin desktop operating system installation postgresql13 (source code installation)
SQL Server knowledge collection 11: Constraints
BUUCTF---Reverse---reverse1
2021-05-21
Use of dotween
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
[recommendation system 02] deepfm, youtubednn, DSSM, MMOE
Go-Redis 中间件
Mpx 插件
P1223 queuing for water /1319: [example 6.1] queuing for water
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
2021 summary and 2022 outlook
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer
The fifth training assignment
1323: [example 6.5] activity selection
When do you usually get grades in the soft exam? Online pedaling?
一些线上学术报告网站与机器学习视频
[untitled]