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
dbbda77f
Commit
dbbda77f
authored
Jun 21, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 上传token 问题
parent
ae8a8eef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
UploadFiles.less
src/components/UploadFiles/UploadFiles.less
+1
-1
UploadFiles.tsx
src/components/UploadFiles/UploadFiles.tsx
+5
-2
No files found.
src/components/UploadFiles/UploadFiles.less
View file @
dbbda77f
...
...
@@ -40,7 +40,7 @@
}
.error {
color:
'#ff4d4f'
;
color:
#ff4d4f
;
}
> a {
...
...
src/components/UploadFiles/UploadFiles.tsx
View file @
dbbda77f
...
...
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import
cx
from
'classnames'
import
{
UploadProps
,
UploadChangeParam
,
UploadFile
}
from
'antd/lib/upload/interface'
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
import
{
Upload
,
Progress
,
Button
}
from
'antd'
;
import
{
Upload
,
Progress
,
Button
,
message
}
from
'antd'
;
import
{
CloudUploadOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./UploadFiles.less'
;
import
pdf_icon
from
'@/assets/imgs/pdf_icon.png'
;
...
...
@@ -62,6 +62,10 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
// disabled: loading || disabled,
showUploadList
:
false
,
onChange
(
info
:
UploadChangeParam
)
{
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
"上传失败, 请检查上传接口"
);
}
// 如果不存在fileList, 只存在onChange 那么也要改变组件的file
if
(
!
(
"fileList"
in
props
))
{
setFiles
(
info
.
fileList
);
...
...
@@ -86,7 +90,6 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
setFiles
(
newFileList
);
}
}
const
renderFileItem
=
()
=>
{
return
(
<
div
className=
{
filesContainerCs
}
>
...
...
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