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版本 底部导航栏被隐藏了 #4561

Closed
BlueDancers opened this issue Oct 4, 2019 · 6 comments
Closed

h5版本 底部导航栏被隐藏了 #4561

BlueDancers opened this issue Oct 4, 2019 · 6 comments
Assignees

Comments

@BlueDancers
Copy link

问题描述
当访问http://localhost:10086/的时候底部导航栏是存在的
但是一旦跳转了页面,url变成 http://localhost:10086/#/pages/category/category类似这样的,刷新页面底部导航栏就被隐藏了
看到了一个相似问题的issues,但是未找到解决办法

复现步骤
[复现问题的步骤]
路由配置

list: [
        {
          pagePath: 'pages/index/index',
          text: '首页',
          iconPath: './images/public/home.png',
          selectedIconPath: './images/public/homeActive.png'
        },
        {
          pagePath: 'pages/category/category',
          text: '分类',
          iconPath: './images/public/sort.png',
          selectedIconPath: './images/public/sortActive.png'
        },
        {
          pagePath: 'pages/orderlist/orderlist',
          text: '购物车',
          iconPath: './images/public/shopping.png',
          selectedIconPath: './images/public/shoppingActive.png'
        },
        {
          pagePath: 'pages/user/user',
          text: '我的',
          iconPath: './images/public/my.png',
          selectedIconPath: './images/public/myActive.png'
        }
      ]

生成的h5的_tabs配置

__tabs: {
      backgroundColor: '#FFFFFF',
      color: '#707070',
      borderStyle: 'white',
      selectedColor: '#F34C56',
      list: [{
        pagePath: "/pages/index/index",
        text: '首页',
        iconPath: require("././images/public/home.png"),
        selectedIconPath: require("././images/public/homeActive.png")
      }, {
        pagePath: "/pages/category/category",
        text: '分类',
        iconPath: require("././images/public/sort.png"),
        selectedIconPath: require("././images/public/sortActive.png")
      }, {
        pagePath: "/pages/orderlist/orderlist",
        text: '购物车',
        iconPath: require("././images/public/shopping.png"),
        selectedIconPath: require("././images/public/shoppingActive.png")
      }, {
        pagePath: "/pages/user/user",
        text: '我的',
        iconPath: require("././images/public/my.png"),
        selectedIconPath: require("././images/public/myActive.png")
      }],
      mode: "hash",
      basename: "/",
      customRoutes: {}
    }

image

image

期望行为
底部导航栏不消失

报错信息

系统信息
👽 Taro v1.3.19

Taro CLI 1.3.19 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.13.0
Yarn: 1.12.3
npm: 6.4.1

@taro-bot
Copy link

taro-bot bot commented Oct 4, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Oct 5, 2019

CC @Littly

@tourze
Copy link
Contributor

tourze commented Oct 6, 2019

同样发现这个问题。。。应该是1.3.17或之后才有的问题

@admiao
Copy link

admiao commented Oct 7, 2019

taro 只是一个玩具框架,转一端都困难,如果只能用于微信小程序 为何不用原生写呢 效率更高,文档更好也更齐全。这广告很漂亮 用react来写小程序 其实react 和taro 有多大关系呢 ?react 的生态也就只有个redux , 我是奔着能原生小程序转react 来的 , 原转T T转weapp 就千疮百孔 H5那就不忍直视。许多愚蠢的问题也并没有在框架的多次迭代中修复,奉劝各位不要浪费大好时光来填坑吧,是的我写了那么长,我是愤怒的 官方所示夸大 十之差九 ,这就是京东团队 。

@ZakaryCode
Copy link
Contributor

fixed in commit 61dc79a

@realeve
Copy link

realeve commented Jun 18, 2020

我以前通过hack一个样式来显示的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants