We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
循环体内,同时使用自定义组件与条件判断语句时,控制台会报错:“item is not define”,渲染异常
type State = { list: any } export default class Test extends Component<{}, State> { config = { navigationBarTitleText: 'Test' } constructor (props, ...rest) { super(props, ...rest) this.state = { list: [ { text: '1', }, { text: '2' }, { text: '3' }, { text: '4' } ] } } render () { const { list } = this.state return ( <View className='page'> { list.map((item) => { return <View> <View>{item.text}</View> {item.text==='1'&&<SoldOut />} </View> }) } </View> ) } }
微信小程序以及H5正常,但是百度小程序控制台报错
控制台不报错,可以正常渲染出组件
图片信息不知道为什么上传错误,taro和taro/cli版本都是2.2.6
The text was updated successfully, but these errors were encountered:
fix(transformer): 修复百度小程序编译问题,fix #6431
c5d0a97
06e6492
Chen-jj
Successfully merging a pull request may close this issue.
问题描述
循环体内,同时使用自定义组件与条件判断语句时,控制台会报错:“item is not define”,渲染异常
复现步骤
微信小程序以及H5正常,但是百度小程序控制台报错
期望行为
控制台不报错,可以正常渲染出组件
报错信息
系统信息
图片信息不知道为什么上传错误,taro和taro/cli版本都是2.2.6
The text was updated successfully, but these errors were encountered: