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

44 lines
971 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
export default {
2019-01-12 03:33:27 +00:00
render() {
2018-07-20 08:13:21 +00:00
const settings = {
class: 'slider variable-width',
props: {
dots: true,
infinite: true,
centerMode: true,
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true,
},
2019-01-12 03:33:27 +00:00
};
2018-07-20 08:13:21 +00:00
return (
<div>
<h2>Variable width</h2>
<Slider {...settings}>
<div style={{ width: '100px' }}>
<p>100</p>
</div>
<div style={{ width: '200px' }}>
<p>200</p>
</div>
<div style={{ width: '75px' }}>
<p>75</p>
</div>
<div style={{ width: '300px' }}>
<p>300</p>
</div>
<div style={{ width: '225px' }}>
<p>225</p>
</div>
<div style={{ width: '175px' }}>
<p>175</p>
</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
};