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设置使用微信小程序底部Tab栏时,会有如下报错:TypeError: Cannot read property 'height' of null #2777

Closed
ye21st opened this issue Dec 21, 2023 · 2 comments · Fixed by #2775

Comments

@ye21st
Copy link

ye21st commented Dec 21, 2023

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.2.4

平台

weapp

重现链接

https://github.com/ye21st/nutui-taro-bug-report/tree/main/1-Tabbar-BUG

重现步骤

1、编译代码
2、微信开发者工具查看
3、控制台报错:
image

期望的结果是什么?

控制台不报错

实际的结果是什么?

控制栏报错:TypeError: Cannot read property 'height' of null

环境信息

Taro CLI 3.6.20 environment info:
    System:
      OS: macOS 14.1.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.15.0 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.5.5 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.21 => 3.6.21 
      @tarojs/components: 3.6.21 => 3.6.21 
      @tarojs/helper: 3.6.21 => 3.6.21 
      @tarojs/plugin-framework-vue3: 3.6.21 => 3.6.21 
      @tarojs/plugin-html: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-alipay: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-h5: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-jd: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-qq: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-swan: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-tt: 3.6.21 => 3.6.21 
      @tarojs/plugin-platform-weapp: 3.6.21 => 3.6.21 
      @tarojs/runtime: 3.6.21 => 3.6.21 
      @tarojs/shared: 3.6.21 => 3.6.21 
      @tarojs/taro: 3.6.21 => 3.6.21 
      @tarojs/taro-loader: 3.6.21 => 3.6.21 
      @tarojs/webpack5-runner: 3.6.21 => 3.6.21 
      babel-preset-taro: 3.6.21 => 3.6.21 
      eslint-config-taro: 3.6.21 => 3.6.21 

其他补充信息

No response

@eiinu eiinu linked a pull request Dec 21, 2023 that will close this issue
21 tasks
@eiinu
Copy link
Member

eiinu commented Dec 21, 2023

1、同时开启 bottom、placeholder 时会获取元素宽高信息,获取失败后会报错。这个问题已经修复,下个版本发布。
2、如果只是在 custom-tabbar 中使用 nut-tabbar,不需要开启 bottom、placeholder 就可以。

@eiinu eiinu closed this as completed Dec 21, 2023
@ye21st
Copy link
Author

ye21st commented Dec 21, 2023

好的,谢谢。

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

Successfully merging a pull request may close this issue.

2 participants