-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
这是我的ItemWeb组件代码:
import React from 'react';
import Lazyimg from 'react-lazyimg-component';
export default function ItemWeb(props) {
return (
<div className="item__web">
<a href={props.address} target="block">
<Lazyimg
className="lazy"
src={props.imgUrl}
/>
<p>{props.name}</p>
</a>
</div>
);
}
我是通过map循环生成的ItemWeb组件:
<div className="item__wrap">
{value.websites.map(item => (
<ItemWeb
key={item.id}
name={item.name}
imgUrl={item.imgUrl}
address={item.address}
/>
))}
</div>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
