Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dui123
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王天宇
Dui123
Commits
2cd330cd
Commit
2cd330cd
authored
Sep 01, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改默认图标为首字
parent
29e32d80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
ContentItem.jsx
src/component/Content/ContentItem.jsx
+7
-1
ContentItem.scss
src/component/Content/ContentItem.scss
+9
-0
No files found.
src/component/Content/ContentItem.jsx
View file @
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
>
...
...
src/component/Content/ContentItem.scss
View file @
2cd330cd
...
...
@@ -51,6 +51,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%
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment