map方法(table中图片数组回显)
{
title: "整改完成图片/附件",
align: "center",
dataIndex: "photo",
customRender: (text, record, index) => {
const srcList = record.photos;
const style = {
width: "50px",
height: "50px"
};
let content = srcList.map((item, index) => {
return (
<div>
<img src={item} style={style} />
</div>
);
});
const obj = {
children: content,
attrs: { colSpan: 1 }
};
return obj;
},
}
网友评论