ant|ant design pro 轮播图加prev()和next()

效果如图: ant|ant design pro 轮播图加prev()和next()
文章图片

代码: 【ant|ant design pro 轮播图加prev()和next()】方法:

handlePrev = ()=>{ this.refs.img.prev(); //ref = img } handleNext = ()=>{ this.refs.img.next(); } handleWxLook = (val) =>{ this.setState({ visible: true, }); } onChange =(a, b, c)=>{ console.log(a, b, c); }handleOk = (e) => { console.log(e); this.setState({ visible: false, }); }handleCancel = (e) => { console.log(e); this.setState({ visible: false, }); }

return()函数中:
.box{ display: flex; justify-content: center; align-items: center; padding: 0 10px; }
1
2
3
4

    推荐阅读