Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Taro 2.2.11]switchTab 跳转到对应tabBar 页面为空 #7164

Closed
mengtianren opened this issue Jul 25, 2020 · 7 comments
Closed

[Taro 2.2.11]switchTab 跳转到对应tabBar 页面为空 #7164

mengtianren opened this issue Jul 25, 2020 · 7 comments
Assignees
Labels
duplicate This issue or pull request already exists F-react Framework - React T-h5 Target - 编译到 H5 V-2 Version - 2.x

Comments

@mengtianren
Copy link

相关平台

H5

**浏览器版本: Chrome **
使用框架: React

复现步骤

login登录之后 switchTab 跳转到 首页 页面为空 需要刷新

期望结果

从非tabbar页面switchTab 跳转到tabbar页面可以显示页面

实际结果

h5模式下路由发生变化,但是页面为空

环境信息

aro CLI 2.2.11 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.14.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.12.3 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 6.13.0 - C:\Program Files\nodejs\npm.CMD


补充信息

app.js config配置项

config = {
pages: [
"pages/login",
"pages/home/index",
...
],
window: {
...
},
tabBar: {
list: [
{
pagePath: "pages/home/index",
text: "首页",
iconPath: "./static/image/tabBar/home.png",
selectedIconPath: "./static/image/tabBar/home_1.png"
},
...
],
color: "#333",
selectedColor: "#06BF89",
backgroundColor: "#fdfdfd",
borderStyle: "black"
}
};

login.js

Taro.switchTab({
url: "/pages/home/index"
})

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Jul 25, 2020
@taozidada
Copy link

我也这样,怎么解决,就H5有

@Chen-jj Chen-jj added V-2 Version - 2.x and removed V-3 Version - 3.x labels Jul 30, 2020
@luckyadam
Copy link
Member

@mengtianren @taozidada 能否提供一个简单的 demo 看下~

@luckyadam luckyadam self-assigned this Jul 30, 2020
@mengtianren
Copy link
Author

mengtianren commented Jul 30, 2020

@mengtianren @taozidada能否提供一个简单的demo看下〜
@luckyadam 已上传到这个仓库 https://github.com/mengtianren/taro2.2.11-switchTab.git

@yuuk
Copy link
Contributor

yuuk commented Aug 12, 2020

同,路由变化,页面display还是none

@ZakaryCode ZakaryCode added the duplicate This issue or pull request already exists label Aug 14, 2020
@ZakaryCode
Copy link
Contributor

#6878 问题重复,在 #7344 中修复该问题

@shenghanqin
Copy link
Collaborator

@ZakaryCode 在什么版本发布呢?

@Chen-jj
Copy link
Contributor

Chen-jj commented Aug 14, 2020

下一个 patch 版本发布

@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-h5 Target - 编译到 H5 V-2 Version - 2.x
Projects
Archived in project
Development

No branches or pull requests

8 participants