taro 使用多个自定义 TabBar 报错

xxhby3vn  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(32)

相关平台

字节跳动小程序

复现仓库

https://github.com/simple5960/mini-reproduce.git
小程序基础库: 2.85.02
使用框架: React

复现步骤

只引用一次 TabBar 组件不会报错, 引用两次以上必定报错

期望结果

期望不会报错

实际结果

实际会报错

环境信息

👽 Taro v3.6.1

  Taro CLI 3.6.1 environment info:
    System:
      OS: macOS 12.6.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 15.4.0 - ~/.nvm/versions/node/v15.4.0/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 7.0.15 - ~/.nvm/versions/node/v15.4.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.1 => 3.6.1 
      @tarojs/components: 3.6.1 => 3.6.1 
      @tarojs/helper: 3.6.1 => 3.6.1 
      @tarojs/plugin-framework-react: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-alipay: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-h5: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-jd: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-qq: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-swan: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-tt: 3.6.1 => 3.6.1 
      @tarojs/plugin-platform-weapp: 3.6.1 => 3.6.1 
      @tarojs/react: 3.6.1 => 3.6.1 
      @tarojs/runtime: 3.6.1 => 3.6.1 
      @tarojs/shared: 3.6.1 => 3.6.1 
      @tarojs/taro: 3.6.1 => 3.6.1 
      @tarojs/webpack5-runner: 3.6.1 => 3.6.1 
      babel-preset-taro: 3.6.1 => 3.6.1 
      eslint-config-taro: 3.6.1 => 3.6.1 
      react: ^18.0.0 => 18.2.0 
      taro-ui: 3.0.0-alpha.7 => 3.0.0-alpha.7
cotxawn7

cotxawn71#

我运行你的代码正常没有报错,可以先升级 taro 到最新版本试下,另外环境信息为什么会有 taro-uipackage.json 里面没有?

相关问题