react-component / banner-anim

Animate Banner React Component
http://react-component.github.io/banner-anim/
MIT License
170 stars 32 forks source link

BannerAnim 可以提供 currentShowInt 接口吗 #15

Closed catiscat closed 6 years ago

catiscat commented 6 years ago

如题,需求场景是:页面切换的方式,除了 autoPlay 切换,通过pre,next箭头切换,也可以通过 点击页面对应的icon切换,此时需要 currentShowInt 接口,来控制当前显示的是哪个页面。

jljsj33 commented 6 years ago

有的,, ant motion 里有写,,这里漏写了,,,


ref 来控制跳转: <BannerAnim ref={(c) => { this.banner = c; }}/>

上一个: this.banner.prev();

下一个: this.banner.next();

跳转: this.banner.slickGoTo(number); number 从 0 开始;