Commit 3ed91a61 authored by GuanHua's avatar GuanHua
parents 5a1c726d f3c79920
...@@ -37,6 +37,17 @@ const ProductImageForm: React.FC<{}> = (props) => { ...@@ -37,6 +37,17 @@ const ProductImageForm: React.FC<{}> = (props) => {
} }
}, []) }, [])
// 修改图片操作中icon的描述
useEffect(() => {
let parentEle = document.getElementById('uploadBox');
let btns = parentEle.getElementsByClassName('ant-upload-list-item-card-actions-btn');
for(let i = 0; i < btns.length; i++){
if(btns[i].getAttribute('title') === '下载文件'){
btns[i].setAttribute('title', '编辑文件')
}
}
})
useEffect(() => { useEffect(() => {
// 品类 变动清空数据 // 品类 变动清空数据
// 编辑下 flag为false 不清空;编辑下 flag为true 新建清空 // 编辑下 flag为false 不清空;编辑下 flag为true 新建清空
...@@ -257,7 +268,7 @@ const ProductImageForm: React.FC<{}> = (props) => { ...@@ -257,7 +268,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
</ul> </ul>
</Col> </Col>
{/* 按属性设置---所有属性共用 */} {/* 按属性设置---所有属性共用 */}
<Col span={20} style={{ padding: 24 }}> <Col span={20} style={{ padding: 24 }} id="uploadBox">
{ {
!setImageType ? !setImageType ?
(priceAttributeParamsByRender?.length>0 && priceAttributeParamsByRender[0]?.attributeAndValueList?.length!=0 ? priceAttributeParamsByRender.map((item, index) => (priceAttributeParamsByRender?.length>0 && priceAttributeParamsByRender[0]?.attributeAndValueList?.length!=0 ? priceAttributeParamsByRender.map((item, index) =>
...@@ -277,6 +288,7 @@ const ProductImageForm: React.FC<{}> = (props) => { ...@@ -277,6 +288,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
onDownload={(file)=>handlefileEdit(file, index)} onDownload={(file)=>handlefileEdit(file, index)}
showUploadList={{showDownloadIcon: true, downloadIcon: <EditOutlined style={{color: '#fff'}} />}} showUploadList={{showDownloadIcon: true, downloadIcon: <EditOutlined style={{color: '#fff'}} />}}
data={{fileType: UPLOAD_TYPE}} data={{fileType: UPLOAD_TYPE}}
className="uploadBox"
> >
{item.commodityPic.length >= 6 ? null : uploadButton} {item.commodityPic.length >= 6 ? null : uploadButton}
</Upload> </Upload>
...@@ -310,6 +322,7 @@ const ProductImageForm: React.FC<{}> = (props) => { ...@@ -310,6 +322,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
onDownload={(file)=>handlefileEdit(file, 0)} onDownload={(file)=>handlefileEdit(file, 0)}
showUploadList={{showDownloadIcon: true, downloadIcon: <EditOutlined style={{color: '#fff'}} />}} showUploadList={{showDownloadIcon: true, downloadIcon: <EditOutlined style={{color: '#fff'}} />}}
data={{fileType: UPLOAD_TYPE}} data={{fileType: UPLOAD_TYPE}}
className="uploadBox"
> >
{commonImageList.length >= 6 ? null : uploadButton} {commonImageList.length >= 6 ? null : uploadButton}
</Upload> </Upload>
......
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