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
linweijiong
jinfa-admin
Commits
75eb9ff1
Commit
75eb9ff1
authored
Jan 07, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
9199f48f
f10e5bcd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
index.tsx
src/components/NiceForm/components/AntUpload/index.tsx
+5
-4
No files found.
src/components/NiceForm/components/AntUpload/index.tsx
View file @
75eb9ff1
...
...
@@ -179,6 +179,7 @@ export interface IUploaderProps {
value
:
any
[]
listType
?:
UploadListType
readOnly
?:
boolean
maxCount
?:
number
}
export
const
Upload
=
connect
({
...
...
@@ -274,7 +275,7 @@ export const Upload = connect({
public
render
()
{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
{
listType
,
locale
,
onChange
,
value
=
[],
...
others
}
=
this
.
props
if
(
listType
.
indexOf
(
'card'
)
>
-
1
)
{
if
(
listType
!
.
indexOf
(
'card'
)
>
-
1
)
{
return
(
<
AntdUpload
{
...
others
}
...
...
@@ -283,13 +284,13 @@ export const Upload = connect({
onRemove=
{
this
.
onRemoveHandler
}
listType=
{
'picture-card'
}
>
{
!
others
.
readOnly
?
(
{
!
others
.
readOnly
&&
(
others
.
maxCount
!==
undefined
?
this
.
state
.
value
.
length
<
others
.
maxCount
:
true
)
?
(
<
UploadPlaceholder
/>
)
:
null
}
</
AntdUpload
>
)
}
if
(
listType
.
indexOf
(
'dragger'
)
>
-
1
)
{
if
(
listType
!
.
indexOf
(
'dragger'
)
>
-
1
)
{
return
(
<
UploadDragger
{
...
others
}
...
...
@@ -297,7 +298,7 @@ export const Upload = connect({
onChange=
{
this
.
onChangeHandler
}
onRemove=
{
this
.
onRemoveHandler
}
// TODO image 类型是跟 picture 一样 ?
listType=
{
listType
.
indexOf
(
'image'
)
>
-
1
?
'picture'
:
'text'
}
listType=
{
listType
!
.
indexOf
(
'image'
)
>
-
1
?
'picture'
:
'text'
}
>
<
p
className=
{
'ant-upload-drag-icon'
}
>
<
InboxOutlined
/>
...
...
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