ant-design-vue/components/vc-slick/demo/CustomSlides.jsx

41 lines
756 B
Vue
Raw Normal View History

2019-01-12 03:33:27 +00:00
import '../assets/index.less';
import Slider from '../src/slider';
2018-07-20 08:13:21 +00:00
const CustomSlide = {
props: ['index'],
2019-01-12 03:33:27 +00:00
render() {
2018-07-20 08:13:21 +00:00
return (
<div>
<h3>{this.index}</h3>
</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
};
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,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
},
2019-01-12 03:33:27 +00:00
};
2018-07-20 08:13:21 +00:00
return (
<div>
<h2>Custom Slides</h2>
<Slider {...settings}>
<CustomSlide index={1} />
<CustomSlide index={2} />
<CustomSlide index={3} />
<CustomSlide index={4} />
<CustomSlide index={5} />
<CustomSlide index={6} />
</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
};