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
问题描述 直接看代码吧
{ products.map((product,index)=>{ console.log(`isLastItem----`,(index + 1 )=== products.length) return <ProductCell product={product} key={index} islast={(index + 1 )=== products.length} /> }) }
然后在ProductCell组件内输出this.props;
行吧,换个写法
{ products.map((product,index)=>{ console.log(`isLastItem----`,(index + 1 )=== products.length) const isLast=(index + 1 )=== products.length; return isLast?<ProductCell product={product} key={index} islast />:<ProductCell product={product} key={index} islast={false} /> }) }
结果: 这应该是同一个cell先被赋值了true后被赋值了false
系统信息
The text was updated successfully, but these errors were encountered:
恩,是组件化的问题,正在重构,本周修改完成
Sorry, something went wrong.
最新的 beta 版本已经修复了这个问题
No branches or pull requests
问题描述
直接看代码吧
然后在ProductCell组件内输出this.props;
行吧,换个写法
结果:
这应该是同一个cell先被赋值了true后被赋值了false
系统信息
The text was updated successfully, but these errors were encountered: