Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTaro转百度小程序,组件中使用this.props.children,页面无法显示 #3553
Open
Labels
Comments
|
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
|
初步怀疑是百度小程序支持在 template 中使用 slot,你可以先把 |
百度小程序支持slot,链接https://smartprogram.baidu.com/docs/develop/framework/custom-component_temp/ |
|
请问一下,有计划兼容renderPropsChildren在百度小程序中的问题么? |
|
Taro 3 应该没有这个问题了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


问题描述
使用Taro文档中Children,无法显示出来https://nervjs.github.io/taro/docs/children.html#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9
复现步骤
[复现问题的步骤]
- 编写组件A
- 页面B引用组件A,
3. 百度开发工具运行,无法显示Taro Children
期望行为
经过多次尝试,在组件A中如果不使用renderPropsChildren函数渲染,而是直接在render方法中直接return {this.props.children}是可以,但是我需要在renderPropsChildren函数进行逻辑判断渲染。期望在renderPropsChildren中正常渲染(微信小程序没问题)
报错信息
无法显示传入的Children
系统信息
Taro CLI 1.3.4 environment info:
System:
OS: macOS 10.14.5
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.5.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
npmPackages:
@tarojs/async-await: 1.3.4 => 1.3.4
@tarojs/components: 1.3.4 => 1.3.4
@tarojs/plugin-babel: 1.3.4 => 1.3.4
@tarojs/plugin-csso: 1.3.4 => 1.3.4
@tarojs/plugin-less: 1.3.4 => 1.3.4
@tarojs/plugin-uglifyjs: 1.3.4 => 1.3.4
@tarojs/redux: 1.3.4 => 1.3.4
@tarojs/router: 1.3.4 => 1.3.4
@tarojs/taro: 1.3.4 => 1.3.4
@tarojs/taro-alipay: 1.3.4 => 1.3.4
@tarojs/taro-h5: 1.3.4 => 1.3.4
@tarojs/taro-swan: 1.3.4 => 1.3.4
@tarojs/taro-tt: 1.3.4 => 1.3.4
@tarojs/taro-weapp: 1.3.4 => 1.3.4
@tarojs/webpack-runner: 1.3.4 => 1.3.4
eslint-config-taro: 1.3.4 => 1.3.4
eslint-plugin-taro: 1.3.4 => 1.3.4
nerv-devtools: ^1.4.3 => 1.4.3
nervjs: ^1.4.3 => 1.4.3