当前位置:网站首页>uniapp 在onLaunch中跳转页面后,点击事件失效解决方法
uniapp 在onLaunch中跳转页面后,点击事件失效解决方法
2022-07-07 09:01:00 【爱敲代码的狼仔】
在onLaunch中重定向会导致点击事件失效的问题
解决方法:
1、在跳转的函数加一个setTimeout,但是会导致有时setTimeout函数内的跳转失败
onLaunch() {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/user'
})
}, 0)
}2、在新跳转的页面的onLoad中编写自己的逻辑
边栏推荐
- SQL Server knowledge gathering 9: modifying data
- 中级网络工程师是什么?主要是考什么,有什么用?
- P1031 [noip2002 improvement group] average Solitaire
- 2021-04-08
- Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
- PHP \ newline cannot be output
- The seventh training assignment
- 南航 PA3.1
- JS实现链式调用
- 2022.7.4DAY596
猜你喜欢

Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!

shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)

在线硬核工具

Mendeley -- a free document management tool that automatically inserts references into papers

單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint

July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)

使用 load_decathlon_datalist (MONAI)快速加载JSON数据

Is the soft test intermediate useful??
![P1223 queuing for water /1319: [example 6.1] queuing for water](/img/09/29f19b32f0a3c82ddb3c30d5d0b16e.png)
P1223 queuing for water /1319: [example 6.1] queuing for water

Online hard core tools
随机推荐
Différences entre les contraintes monotones et anti - monotones
Laya common script commands
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
Deep understanding of Apache Hudi asynchronous indexing mechanism
A simple example of delegate usage
简单易修改的弹框组件
ThreadLocal is not enough
PR Lecture Notes
中级软件评测师考什么
【推荐系统 01】Rechub
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
Monai version has been updated to 0.9. See what new functions it has
uniCloud
SQL Server 知识汇集11 : 约束
滚动踩坑--UNI_APP(八)
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
Project ERROR: Unknown module(s) in QT: core gui
变量的解构赋值
POJ1821 Fence 题解报告
Mysql的json格式查询