import { Popover, Space } from 'antd' import React, { useMemo } from 'react' function Box(props: { b: any }) { const { b } = props let el = useMemo(() => { if (b?.imagePreviewUrl?.length > 0 || b?.videoKeyFrameImageUrl) {//图片存在? 或者视频首针图存在? return
{b?.title &&
标题:{b?.title}
} { b?.imagePreviewUrl?.length > 0 ? b?.imagePreviewUrl?.map((img: string | undefined) => { return }) : } {b?.description && 描述:{b?.description}}
}> } else if (b?.videoPreviewUrl) {//视频存在? return {b?.title &&
标题:{b?.title}
}
} else { return {b?.title &&
标题:{b?.title}
} {b?.description && 描述:{b?.description}} }>
--
} }, [b]) return el } export default React.memo(Box)