You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
751 B
41 lines
751 B
import '../assets/index.less'
|
|
import Slider from '../src/slider'
|
|
|
|
const CustomSlide = {
|
|
props: ['index'],
|
|
render () {
|
|
return (
|
|
<div>
|
|
<h3>{this.index}</h3>
|
|
</div>
|
|
)
|
|
},
|
|
}
|
|
|
|
export default {
|
|
render () {
|
|
const settings = {
|
|
props: {
|
|
dots: true,
|
|
infinite: true,
|
|
speed: 500,
|
|
slidesToShow: 1,
|
|
slidesToScroll: 1,
|
|
},
|
|
}
|
|
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>
|
|
)
|
|
},
|
|
}
|