Commit 9a495d52 authored by 田翔's avatar 田翔

fix: 图片样式优化

parent e2c8da1b
import React, { useEffect, useState } from 'react'
import styles from './index.less'
import { Button, Upload, message } from 'antd'
import { accepts,getFileType } from '../../../../../../constant'
import { accepts, getFileType } from '../../../../../../constant'
import { uploadFileUrl, downloadFileUrl, downloadFile } from '../../../../../../apis/process'
import {
SnippetsOutlined,
......@@ -42,9 +42,16 @@ const FileView = (props) => {
<div className={styles.fileView}>
<Viewer>
{
fileList.map(v => {
fileList.map((v, i) => {
return (
<img className={styles.img} src={`${window.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles?filePath=${v}`}></img>
<span className={styles.imgSpan} style={{ display: i == 0 ? 'inline-block' : 'none' }}>
{fileList.length !== 1 ? <span className={styles.imgSub}>{fileList.length}</span> : null}
<img
className={styles.img}
src={`${window.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles?filePath=${v}`}
>
</img>
</span>
)
})
}
......@@ -108,7 +115,7 @@ const FileView = (props) => {
}
})
setShowList(JSON.stringify(list))
},[value])
}, [value])
return (
<div className={styles.fileView}>
......
......@@ -3,14 +3,30 @@
display: flex;
justify-content: center;
align-items: center;
.img {
width: 65px;
margin-right: 5px;
.imgSpan {
position: relative;
transition: all 0.2s ease-in;
&:hover {
cursor: pointer;
transform: scale(1.2);
}
.img {
width: 65px;
}
.imgSub {
position: absolute;
z-index: 99;
top: 0;
right: 0;
background: red;
color: white;
width: 14px;
height: 14px;
text-align: center;
line-height: 14px;
font-size: 12px;
border-radius: 50%;
}
}
.iconImg {
width: 45px;
......
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