Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
f4003f57
Commit
f4003f57
authored
Jul 13, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 展示非图片文件
parent
8e027563
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
index.less
...pages/member/components/MemberDocQualification/index.less
+16
-0
index.tsx
src/pages/member/components/MemberDocQualification/index.tsx
+16
-2
No files found.
src/pages/member/components/MemberDocQualification/index.less
View file @
f4003f57
...
@@ -21,12 +21,28 @@
...
@@ -21,12 +21,28 @@
margin-right: @margin-sm;
margin-right: @margin-sm;
width: 175px;
width: 175px;
height: 120px;
height: 120px;
display: flex;
align-items: center;
justify-content: center;
> img {
> img {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
object-fit: cover;
object-fit: cover;
}
}
> a {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: inherit;
}
&-file {
border: 1px solid @border-color-split;
}
}
}
&-right {
&-right {
...
...
src/pages/member/components/MemberDocQualification/index.tsx
View file @
f4003f57
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-05-21 17:25:39
* @Date: 2021-05-21 17:25:39
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
09 10:36:24
* @LastEditTime: 2021-07-
13 10:10:42
* @Description: 会员公司资质
* @Description: 会员公司资质
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Descriptions
}
from
'antd'
;
import
{
Descriptions
}
from
'antd'
;
import
{
FileOutlined
}
from
'@ant-design/icons'
;
import
classNames
from
'classnames'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
...
@@ -36,6 +38,8 @@ interface IProps extends MellowCardProps {
...
@@ -36,6 +38,8 @@ interface IProps extends MellowCardProps {
dataSource
:
ValueType
[],
dataSource
:
ValueType
[],
}
}
const
imgReg
=
/
\.(
png|jpg|gif|jpeg|webp
)
$/
;
const
MemberDocQualification
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
MemberDocQualification
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
dataSource
=
[],
...
rest
}
=
props
;
const
{
dataSource
=
[],
...
rest
}
=
props
;
...
@@ -48,8 +52,18 @@ const MemberDocQualification: React.FC<IProps> = (props: IProps) => {
...
@@ -48,8 +52,18 @@ const MemberDocQualification: React.FC<IProps> = (props: IProps) => {
{
dataSource
.
map
((
item
,
index
)
=>
(
{
dataSource
.
map
((
item
,
index
)
=>
(
<
li
key=
{
index
}
className=
{
styles
[
'qualification-item'
]
}
>
<
li
key=
{
index
}
className=
{
styles
[
'qualification-item'
]
}
>
<
div
className=
{
styles
[
'qualification-item-wrap'
]
}
>
<
div
className=
{
styles
[
'qualification-item-wrap'
]
}
>
<
div
className=
{
styles
[
'qualification-item-left'
]
}
>
<
div
className=
{
classNames
(
styles
[
'qualification-item-left'
],
{
[
styles
[
'qualification-item-left-file'
]]:
!
imgReg
.
test
(
item
.
url
),
})
}
>
{
imgReg
.
test
(
item
.
url
)
?
(
<
img
src=
{
item
.
url
}
/>
<
img
src=
{
item
.
url
}
/>
)
:
(
<
a
href=
{
item
.
url
}
target=
"__black"
>
<
FileOutlined
style=
{
{
fontSize
:
36
}
}
/>
</
a
>
)
}
</
div
>
</
div
>
<
div
className=
{
styles
[
'qualification-item-right'
]
}
>
<
div
className=
{
styles
[
'qualification-item-right'
]
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
column=
{
1
}
>
...
...
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