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
df0a053e
Commit
df0a053e
authored
May 31, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 自定义niceform文件上传样式
parent
a2afbca9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
index.tsx
src/components/NiceForm/components/AntUpload/index.tsx
+21
-5
index.tsx
...procurement/tender/readyQualifityChecked/detail/index.tsx
+1
-1
No files found.
src/components/NiceForm/components/AntUpload/index.tsx
View file @
df0a053e
...
...
@@ -7,7 +7,9 @@ import {
LoadingOutlined
,
PlusOutlined
,
UploadOutlined
,
InboxOutlined
InboxOutlined
,
FileFilled
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
getAuth
}
from
'@/utils/auth'
...
...
@@ -191,6 +193,14 @@ export const Upload = connect({
this
.
props
.
onChange
(
fileList
)
}
public
removeItem
=
(
item
)
=>
{
const
{
onChange
}
=
this
.
props
this
.
setState
({
value
:
this
.
state
.
value
.
filter
(
ele
=>
ele
.
uid
!==
item
.
uid
)
})
onChange
(
this
.
state
.
value
.
filter
(
ele
=>
ele
.
uid
!==
item
.
uid
))
}
public
onChangeHandler
=
({
fileList
})
=>
{
const
{
onChange
}
=
this
.
props
fileList
=
toArr
(
fileList
)
...
...
@@ -243,8 +253,7 @@ export const Upload = connect({
public
render
()
{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
{
listType
,
locale
,
onChange
,
value
,
...
others
}
=
this
.
props
const
{
listType
,
locale
,
onChange
,
value
=
[],
...
others
}
=
this
.
props
if
(
listType
.
indexOf
(
'card'
)
>
-
1
)
{
return
(
<
AntdUpload
...
...
@@ -279,7 +288,13 @@ export const Upload = connect({
</
UploadDragger
>
)
}
return
(
return
(<
div
>
{
value
.
map
(
item
=>
(<
p
key=
{
item
.
uid
}
style=
{
{
width
:
424
,
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
a
href=
{
item
.
url
}
><
FileFilled
/>
{
item
.
name
}
</
a
>
<
span
style=
{
{
cursor
:
'pointer'
}
}
onClick=
{
()
=>
this
.
removeItem
(
item
)
}
><
DeleteOutlined
/></
span
>
</
p
>))
}
<
AntdUpload
{
...
others
}
fileList=
{
this
.
state
.
value
}
...
...
@@ -287,6 +302,7 @@ export const Upload = connect({
onRemove=
{
this
.
onRemoveHandler
}
listType=
{
listType
}
headers=
{
{
token
}
}
itemRender=
{
()
=>
null
}
>
{
!
others
.
readOnly
?
(
<
Button
style=
{
{
margin
:
'0 0 10px'
}
}
>
...
...
@@ -295,7 +311,7 @@ export const Upload = connect({
</
Button
>
)
:
null
}
</
AntdUpload
>
)
</
div
>
)
}
}
)
...
...
src/pages/procurement/tender/readyQualifityChecked/detail/index.tsx
View file @
df0a053e
...
...
@@ -217,7 +217,7 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
<
Col
span=
{
2
}
><
p
className=
{
style
[
'card-list_title'
]
}
>
资格证明文件:
</
p
></
Col
>
<
Col
>
{
fileList
.
map
(
item
=>
(<
p
className=
{
style
.
fileItem
}
><
a
href=
{
item
.
url
}
><
FileFilled
/>
{
item
.
name
}
</
a
>
<
span
onClick=
{
()
=>
removeItem
(
item
)
}
><
DeleteOutlined
/></
span
></
p
>))
fileList
.
map
(
(
item
,
index
)
=>
(<
p
key=
{
index
}
className=
{
style
.
fileItem
}
><
a
href=
{
item
.
url
}
><
FileFilled
/>
{
item
.
name
}
</
a
>
<
span
onClick=
{
()
=>
removeItem
(
item
)
}
><
DeleteOutlined
/></
span
></
p
>))
}
<
Upload
{
...
uploadProps
}
...
...
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