how should the Table component of antd put the walking lantern Carousel component
Today, when I placed pictures in Table, I found that there was more than one picture data given to me by the background, so I planned to use the walking lantern Carousel to put multiple pictures. But no matter how you put it, it can"t be displayed.
I wonder if it is because of two return problems
here is the related code
related codes
const loop = (data) => {
data.map((item) => {
console.log(item)
return <div key="photo"><img src={item} width="200" height="350" alt="" ></img></div>
})
}
/* eslint-disable */
const columns = [{
title: "",
dataIndex: "xcsj",
key: "xcsj",
}, {
title: "",
dataIndex: "zt",
key: "zt",
}, {
title: "",
dataIndex: "bz",
key: "bz",
width: 250,
}, {
title: "",
dataIndex: "xczp",
key: "xczp",
render: (text, record) => {
let zzqzps = record.xczp.split(",")
// console.log(zzqzps)
return zzqzps == "" ? <div key="xczp"></div> : <Carousel autoplay={true}>{loop(zzqzps)}</Carousel>
},
}];