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

h5设置basename后tabBar不显示 #9392

Closed
biluochun opened this issue May 24, 2021 · 3 comments · Fixed by #10505 or #10520
Closed

h5设置basename后tabBar不显示 #9392

biluochun opened this issue May 24, 2021 · 3 comments · Fixed by #10505 or #10520
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Milestone

Comments

@biluochun
Copy link

相关平台

H5

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

复现步骤

设置 h5 router为:

{
      mode: 'browser',
      basename: '/xxx',
}

路由会变成 /xxx/pages/index/index 导致与tarBar配置不一致,从而无法显示tarBar,而app.config.ts 文件 又无法为H5环境特殊配置。

期望结果

有个方案解决配置H5的basename后 tarBar 配置不需要变更也显示。

实际结果

tarBar内pagePath需要设置为 /xxx/pages/index/index 这种,才显示

环境信息

  Taro CLI 3.2.8 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.18.1 - C:\Program Files\nodejs\node.EXE       
      Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels May 24, 2021
@persist-xyz
Copy link

+1

@xueerli
Copy link

xueerli commented Jul 22, 2021

我遇到的问题是配置了mode: 'browser'后,h5打包后白屏,啥都不显示,开发环境是正常的

@beysong
Copy link

beysong commented Oct 27, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants