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

自定义tabbar状态切换错误 #17293

Open
rankaifeng opened this issue Feb 8, 2025 · 0 comments
Open

自定义tabbar状态切换错误 #17293

rankaifeng opened this issue Feb 8, 2025 · 0 comments

Comments

@rankaifeng
Copy link

相关平台

微信小程序

复现仓库

http://192.168.100.166/rankaifeng/py_smart_system_app.git
小程序基础库: 3.7.7
使用框架: React

复现步骤

https://github.com/NervJS/taro/tree/main/examples/custom-tabbar-react 复制这个代码
比如我下面有两个导航栏 当我点击第一个导航的时候 selected变成了1 但是页面会切换到第二个选中状态 然后又变成了第一个状态
这就导致 页面路由变了 但是底部导航的状态没变

期望结果

底部状态可以根据点击的index进行改变

实际结果

先切换一个状态 然后突然又回到了初始状态

环境信息

Taro CLI 3.6.28 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 20.17.0 - E:\node\node.EXE
      Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 10.8.2 - E:\node\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.9 => 4.0.9
      @tarojs/components: 4.0.9 => 4.0.9
      @tarojs/helper: 4.0.9 => 4.0.9
      @tarojs/plugin-framework-react: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-alipay: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-h5: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-jd: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-qq: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-swan: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-tt: 4.0.9 => 4.0.9
      @tarojs/plugin-platform-weapp: 4.0.9 => 4.0.9
      @tarojs/react: 4.0.9 => 4.0.9
      @tarojs/runtime: 4.0.9 => 4.0.9
      @tarojs/shared: 4.0.9 => 4.0.9
      @tarojs/taro: 4.0.9 => 4.0.9
      @tarojs/taro-loader: 4.0.9 => 4.0.9
      @tarojs/webpack5-runner: 4.0.9 => 4.0.9
      babel-preset-taro: 4.0.9 => 4.0.9
      eslint-config-taro: 4.0.9 => 4.0.9
      react: ^18.0.0 => 18.3.1
This was referenced Feb 15, 2025
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

1 participant