【发布时间】:2021-02-24 05:43:53
【问题描述】:
我有一个旋转木马,里面有一些卡片物品。但是当轮播动画时它会变得模糊。我找不到解决办法。我将 Next.js 与 TypeScript 一起使用。
const ref = useRef<any>();
const settings = {
arrows: false,
variableWidth: true,
infinite: true,
draggable: true,
speed: 2000,
swipe: true,
autoplay: true,
autoplaySpeed: 2000,
cssEase: 'linear',
};
<Slider {...settings} ref={ref}>
{isLoading
? [...Array(9)].map((x, i) => <ExpertCardPlaceholder key={i} />)
: experts.map(expert => <ExpertCard key={expert.userId} expert={expert} />)}
</Slider>
【问题讨论】:
标签: javascript reactjs next.js react-slick