📜  react-multi-carousel 不起作用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:55.502000             🧑  作者: Mango

代码示例1
const responsive = {
        superLargeDesktop: {
          breakpoint: { max: 4000, min: 3000 },
          items: 5
        },
        desktop: {
          breakpoint: { max: 3000, min: 1024 },
          items: 3
        },
        tablet: {
          breakpoint: { max: 1024, min: 464 },
          items: 2
        },
        mobile: {
          breakpoint: { max: 464, min: 0 },
          items: 1
        }
    };
    const size = 15;
    const Itemlist = props.data.slice(0, size).map((item,id) => {
        return(
            
{item.title.length > 30 ? item.title.substring(0,30) + ".." : item.title}

{`${moment(item.published_date).fromNow()}`}

) }) return ( {Itemlist} ); };