2019-01-12 03:33:27 +00:00
|
|
|
import '../assets/index.less';
|
|
|
|
import Slider from '../src/slider';
|
|
|
|
import imgList from './imglist';
|
2018-07-20 08:13:21 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
const { abstract01, abstract02, abstract03, abstract04 } = imgList;
|
2018-07-20 08:13:21 +00:00
|
|
|
|
|
|
|
export default {
|
2019-01-12 03:33:27 +00:00
|
|
|
render() {
|
2018-07-20 08:13:21 +00:00
|
|
|
const settings = {
|
|
|
|
props: {
|
|
|
|
dots: true,
|
|
|
|
dotsClass: 'slick-dots slick-thumb',
|
|
|
|
infinite: true,
|
|
|
|
speed: 500,
|
|
|
|
slidesToShow: 1,
|
|
|
|
slidesToScroll: 1,
|
|
|
|
},
|
|
|
|
scopedSlots: {
|
|
|
|
customPaging: ({ i }) => {
|
|
|
|
return (
|
|
|
|
<a>
|
|
|
|
<img src={imgList[`abstract0${i + 1}`]} />
|
|
|
|
</a>
|
2019-01-12 03:33:27 +00:00
|
|
|
);
|
2018-07-20 08:13:21 +00:00
|
|
|
},
|
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-07-20 08:13:21 +00:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h2>Custom Paging</h2>
|
|
|
|
<Slider {...settings}>
|
|
|
|
<div>
|
|
|
|
<img src={abstract01} />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<img src={abstract02} />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<img src={abstract03} />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<img src={abstract04} />
|
|
|
|
</div>
|
|
|
|
</Slider>
|
|
|
|
</div>
|
2019-01-12 03:33:27 +00:00
|
|
|
);
|
2018-07-20 08:13:21 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|