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
linweijiong
jinfa-platform
Commits
6c0178da
Commit
6c0178da
authored
Oct 20, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
798857bd
7a07d622
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
index.tsx
src/components/ImgUpload/index.tsx
+14
-12
index.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
+2
-2
No files found.
src/components/ImgUpload/index.tsx
View file @
6c0178da
...
@@ -54,17 +54,19 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
...
@@ -54,17 +54,19 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
setData
(
imgs
:
string
[])
{
setData
(
imgs
:
string
[])
{
const
newFileList
=
imgs
.
map
((
item
,
index
)
=>
{
if
(
imgs
)
{
return
{
const
newFileList
=
imgs
.
map
((
item
,
index
)
=>
{
uid
:
`uid
${
index
}
`
,
return
{
name
:
'image.png'
,
uid
:
`uid
${
index
}
`
,
status
:
'done'
,
name
:
'image.png'
,
url
:
item
,
status
:
'done'
,
}
url
:
item
,
})
}
// 直接走一次回调,使值可以set进表单
})
handleChange
({
file
:
{
status
:
'success'
},
fileList
:
newFileList
})
// 直接走一次回调,使值可以set进表单
// setFileList(newFileList)
handleChange
({
file
:
{
status
:
'success'
},
fileList
:
newFileList
})
// setFileList(newFileList)
}
},
},
}))
}))
...
@@ -137,7 +139,7 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
...
@@ -137,7 +139,7 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
{
fileList
.
length
>=
maxCount
||
disabled
?
null
:
uploadButtonElement
}
{
fileList
.
length
>=
maxCount
||
disabled
?
null
:
uploadButtonElement
}
</
Upload
>
</
Upload
>
{
{
tips
&&
tips
&&
<
div
className=
{
styles
.
tips
}
>
<
div
className=
{
styles
.
tips
}
>
<
div
>
支持
{
fileType
.
map
(
item
=>
item
.
split
(
'/'
)[
1
]).
join
(
'/'
)
}
</
div
>
<
div
>
支持
{
fileType
.
map
(
item
=>
item
.
split
(
'/'
)[
1
]).
join
(
'/'
)
}
</
div
>
<
div
>
最大不超过
{
maxSize
}
{
unit
}
,
</
div
>
<
div
>
最大不超过
{
maxSize
}
{
unit
}
,
</
div
>
...
...
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
View file @
6c0178da
...
@@ -156,8 +156,8 @@ const OwnMallAboutUs = () => {
...
@@ -156,8 +156,8 @@ const OwnMallAboutUs = () => {
const
{
albumName
,
albumUrl
,
honorPics
,
workshopPics
,
...
rest
}
=
data
const
{
albumName
,
albumUrl
,
honorPics
,
workshopPics
,
...
rest
}
=
data
const
newAlbumUrls
=
albumName
&&
albumUrl
?
[{
name
:
albumName
,
url
:
albumUrl
}]
:
[]
const
newAlbumUrls
=
albumName
&&
albumUrl
?
[{
name
:
albumName
,
url
:
albumUrl
}]
:
[]
workshopImgRef
.
current
?.
setData
(
workshopPics
)
workshop
Pics
&&
workshop
ImgRef
.
current
?.
setData
(
workshopPics
)
honorImgRef
.
current
?.
setData
(
honorPics
)
honor
Pics
&&
honor
ImgRef
.
current
?.
setData
(
honorPics
)
form
.
setFieldsValue
({
form
.
setFieldsValue
({
...
rest
,
...
rest
,
albumUrls
:
newAlbumUrls
albumUrls
:
newAlbumUrls
...
...
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