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
问题描述 小程序环境下。 引入图片时,如果在map循环中,则import进来的本地图片无法显示,渲染结果src=""。 如果将代码移出map循环,图片可正常显示。
例如:
import noticeBackground from "./[email protected]"; export class Notice extends Component { render() { return ( <Swiper className='notice-swiper' autoplay vertical circular> { [1,2,3].map((item, index) => ( <SwiperItem className='notice-swiper-item' key={index}> <View className='notice'> <Image className='background' src={noticeBackground} /> </View> </SwiperItem> )) } </Swiper> ) } }
系统信息
The text was updated successfully, but these errors were encountered:
请问换一张网络的图片可以吗
Sorry, something went wrong.
@yuche 用网络图片可以正常显示。
那暂时使用网络图片吧。
现在循环中只能使用 class 作用域的变量,目前的版本不打算修复这个问题了,v0.1.0 会对组件化进行重构,循环的逻辑会简单很多。应该本周应该能出来。
v0.1.0
最新的 beta 版本已经修复此问题~
yuche
No branches or pull requests
问题描述
小程序环境下。
引入图片时,如果在map循环中,则import进来的本地图片无法显示,渲染结果src=""。
如果将代码移出map循环,图片可正常显示。
例如:
系统信息
The text was updated successfully, but these errors were encountered: