(1)轮播图 react-slick 的使用,但是页面中有其他定时器的时候,轮播图不滚动
npm install react-slick
import Carousel from "react-slick";
const settings = {
speed: 200,
autoplay: true,
dots: false,
infinite: true,
slidesToShow: 1, //一页展示几条数据
slidesToScroll: 1,
vertical: true,
verticalSwiping: true,
arrows: false }
{this.state.users &&
{this.state.users.map((item,index) => {
return(
{item.phone}
{item.content}
{item.amountYuan}
{index < this.state.users.length -1 &&
}
)
})}
}
(2)想要轮播滚动,要用 antd-mobile
npm install antd-mo