o***@lfwellness.com
o***@lfwellness.com
  • 发布:2020-11-13 16:41
  • 更新:2020-12-14 18:02
  • 阅读:1463

uni.switchTab跳转底部显示正确,但页面内容显示不正确

分类:uni-app

有两个tab页面 index和user
在nvue页面使用uni.switchTab跳转至user页,底部激活状态是正确的,但是页面内容显示的是index页面(index是首页),请问这是为什么,没啥头绪~~

2020-11-13 16:41 负责人:DCloud_Android_DQQ 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

问题确认,已加分,后续优化
和页面后退冲突了,临时解决方案:延迟一下

setTimeout(() => {  
                uni.switchTab({  
                    url: '../user/user'  
                })  
            }, 300)
DCloud_iOS_XHY

DCloud_iOS_XHY

你好,那个平台呀,请上传测试工程,方便排查一下

  • o***@lfwellness.com (作者)

    是android APP

    2020-11-14 10:28

  • o***@lfwellness.com (作者)

    复现了一下,具体是在onBackPress方法去执行uni.switchTab跳转就出现了

    2020-11-14 10:43

  • j***@163.com

    回复 o***@lfwellness.com: 都2022年了。官方还没解决这个问题 结果还得用你的方法解决哈哈

    2022-12-27 11:30

o***@lfwellness.com

o***@lfwellness.com (作者)

demo如附件

1***@163.com

1***@163.com - 矬男孩

我偶尔也会有遇到这个问题,还以为是自己问题.....

该问题目前已经被锁定, 无法添加新回复