Commit 3f85eebb authored by 任建锋's avatar 任建锋
parents fba0547e 2cd330cd
......@@ -37,7 +37,13 @@ function ContentItem(props) {
return (
<div className="content-item">
<div className="item-icon" onClick={() => jumpUrl(toolBoxUrl)}>
<img src={itemIcon} alt='' onError={(e) => setItemIcon('noImg')}/>
{
!itemIcon && <div className="defaultIcon">{toolBoxName[0]}</div>
}
{
itemIcon && <img src={itemIcon} alt='' onError={e => setItemIcon(null)}/>
}
</div>
<div className="item-name" onClick={() => jumpUrl(toolBoxUrl)}>{toolBoxName}</div>
<div className="item-desc">{toolBoxDesc}</div>
......
......@@ -54,6 +54,15 @@
position: relative;
cursor: pointer;
.defaultIcon{
width: 100%;
height: 100%;
font-size: 30px;
font-weight: bold;
line-height: 65px;
text-align: center;
}
img{
width: 100%;
height: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment