2017-01-16 02:45:11 -06:00
|
|
|
<template>
|
2017-01-16 02:59:46 -06:00
|
|
|
<div :class="classes">
|
|
|
|
<slot></slot>
|
2017-01-16 02:45:11 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2017-01-16 02:59:46 -06:00
|
|
|
import Icon from '../icon/icon.vue';
|
|
|
|
|
|
|
|
const prefixCls = 'ivu-carousel';
|
2017-01-16 02:45:11 -06:00
|
|
|
|
|
|
|
export default {
|
2017-01-16 02:59:46 -06:00
|
|
|
name: 'Carousel',
|
|
|
|
props: {
|
|
|
|
arrows: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
autoplay: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
autoplaySpeed: {
|
|
|
|
type: Number,
|
|
|
|
default: 2000
|
|
|
|
},
|
|
|
|
easing: {
|
|
|
|
type: String,
|
|
|
|
default: 'ease'
|
|
|
|
},
|
|
|
|
dots: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
fade: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
vertical: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// events: before-change(from, to), after-change(current, from)
|
|
|
|
computed: {
|
|
|
|
classes () {
|
|
|
|
return [
|
|
|
|
`${prefixCls}`,
|
|
|
|
{
|
|
|
|
[`${prefixCls}-vertical`]: this.vertical
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
2017-01-16 02:45:11 -06:00
|
|
|
};
|
|
|
|
</script>
|