Reactjs 我如何让我的内容结束类在tailwind正常工作?
我只是创建一个简单的产品渲染组件,并希望产品在最后垂直对齐,但tailwind类并没有按照文档中的说明为我工作。任何帮助都将不胜感激 产品状态:Reactjs 我如何让我的内容结束类在tailwind正常工作?,reactjs,tailwind-css,Reactjs,Tailwind Css,我只是创建一个简单的产品渲染组件,并希望产品在最后垂直对齐,但tailwind类并没有按照文档中的说明为我工作。任何帮助都将不胜感激 产品状态: const products = [ {id: '1', name: 'Kelvin', cultivates: ['grey', 'microbial', 'plant cells', 'insect cells'], high_capacity: ['blur', 'blur', 'blur', 'blur']
const products = [
{id: '1',
name: 'Kelvin',
cultivates: ['grey', 'microbial', 'plant cells', 'insect cells'],
high_capacity: ['blur', 'blur', 'blur', 'blur'],
low_capacity: ['grey', true, true, true],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/kelvin.png'},
{id: '2',
name: 'ISF4-X (Climo-Shaker)', cultivates: ['mammalian', 'microbial', 'plant cells', 'insect cells'],
high_capacity: [true, true, true, true],
low_capactiy: ['grey', 'blur', 'blur', 'blur'],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/isf4-x.png'},
{id: '3',
name: 'ISF1-Z',
cultivates: ['mammalian', 'microbial', 'plant Cells', 'insect cells'],
high_capacity: [true, true, true, true],
low_capacity: [true, true, true, true],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/isf1-z.png'},
{id: '4',
name: 'SBM-X',
cultivates: ['blur', 'microbial', 'blur', 'blur' ],
high_capacity: ['blur', true, 'blur', 'blur' ],
low_capacity: ['blur', 'blur', 'blur', 'blur'],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/sbm-x.png'},
{id: '5',
name: 'LT-X (Lab-Therm)',
cultivates: ['Mammalian', 'Plant Cells', 'Insect Cells'],
high_capacity: [false, false, false, false],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/lt-x.png'},
{id: '6',
name: 'Orbshake',
cultivates: ['mammalian', 'blur', 'plant cells', 'insect cells'],
high_capacity: ['blur', 'blur', 'blur', 'blur' ],
low_capacity: [true, 'blur', true, true],
image_url: 'https://raw.githubusercontent.com/mathiusjohnson/state-fader/master/src/images/lz-shaker.png'},
]
产品功能:
const selector = () => {
const productsRendered = products.map((product, id) => {
console.log(product.image_url);
return (
<div key={id} class="max-w-xs">
<img alt="kuhner product" src={product.image_url}></img>
</div>
)
})
return (
<div class="flex content-end flex-wrap">
{productsRendered}
</div>
);
};
常量选择器=()=>{
const productsrended=products.map((产品,id)=>{
console.log(product.image\uURL);
返回(
)
})
返回(
{productsRendered}
);
};