当缩小到正方形视图时,Gridlist将自动对图像进行居中和裁剪。仅图像标签支持此功能。
<GridListTile key={tile.img}>
<img src={tile.img} alt={tile.title} />
</GridListTile>
如何用React Lazy Load Image Component替换此图片而又不失去这种行为:
<GridListTile key={tile.img}>
<LazyLoadImage
alt={image.alt}
height={image.height}
src={image.src} // use normal <img> attributes as props
width={image.width} />
</GridListTile>