Commit ff487e85 authored by 前端-李俊鑫's avatar 前端-李俊鑫

fix: 自营商城关于我们图片回显问题

parent d18f3db9
......@@ -54,6 +54,7 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
useImperativeHandle(ref, () => ({
setData(imgs: string[]) {
if (imgs) {
const newFileList = imgs.map((item, index) => {
return {
uid: `uid${index}`,
......@@ -65,6 +66,7 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
// 直接走一次回调,使值可以set进表单
handleChange({ file: { status: 'success' }, fileList: newFileList})
// setFileList(newFileList)
}
},
}))
......
......@@ -156,8 +156,8 @@ const OwnMallAboutUs = () => {
const { albumName, albumUrl, honorPics, workshopPics, ...rest } = data
const newAlbumUrls = albumName && albumUrl ? [{ name: albumName, url: albumUrl }] : []
workshopImgRef.current?.setData(workshopPics)
honorImgRef.current?.setData(honorPics)
workshopPics && workshopImgRef.current?.setData(workshopPics)
honorPics && honorImgRef.current?.setData(honorPics)
form.setFieldsValue({
...rest,
albumUrls: newAlbumUrls
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment