Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
project
jinfa-admin
Commits
e2d30212
Commit
e2d30212
authored
Dec 08, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 完善类型;内部处理格式化逻辑
parent
e529843a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
index.tsx
...s/afterService/returnManage/components/FileList/index.tsx
+23
-4
No files found.
src/pages/afterService/returnManage/components/FileList/index.tsx
View file @
e2d30212
...
@@ -5,19 +5,38 @@
...
@@ -5,19 +5,38 @@
* @LastEditTime: 2020-11-06 10:02:30
* @LastEditTime: 2020-11-06 10:02:30
* @Description: 附件列表
* @Description: 附件列表
*/
*/
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Upload
}
from
'antd'
;
import
{
Upload
}
from
'antd'
;
import
{
FileData
}
from
'@/utils'
;
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
export
type
FaultFileListItem
=
{
/**
* 文件名
*/
fileName
:
string
/**
* 文件地址
*/
filePath
:
string
}
interface
FileListProps
{
interface
FileListProps
{
fileList
:
F
ileData
[];
fileList
:
F
aultFileListItem
[];
};
};
const
FileList
:
React
.
FC
<
FileListProps
>
=
({
const
FileList
:
React
.
FC
<
FileListProps
>
=
({
fileList
=
[],
fileList
=
[],
})
=>
{
})
=>
{
const
[
innerFileList
,
setInnerFileList
]
=
useState
<
FileData
[]
>
();
useEffect
(()
=>
{
if
(
fileList
&&
fileList
.
length
)
{
setInnerFileList
(
fileList
?.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
)),);
}
},
[
fileList
]);
return
(
return
(
<
MellowCard
<
MellowCard
title=
"相关不良原因举证附件"
title=
"相关不良原因举证附件"
...
@@ -25,7 +44,7 @@ const FileList: React.FC<FileListProps> = ({
...
@@ -25,7 +44,7 @@ const FileList: React.FC<FileListProps> = ({
>
>
<
Upload
<
Upload
className=
{
styles
.
file
}
className=
{
styles
.
file
}
fileList=
{
f
ileList
}
fileList=
{
innerF
ileList
}
/>
/>
</
MellowCard
>
</
MellowCard
>
);
);
...
...
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