iview/src/components/carousel/carousel-item.vue
2017-01-16 04:00:52 -06:00

26 lines
588 B
Vue

<template>
<div :class="prefixCls" v-bind:style="styles">{{width}}<slot></slot></div>
</template>
<script>
const prefixCls = 'ivu-carousel-item';
export default {
componentName: 'carousel-item',
data () {
return {
prefixCls: prefixCls,
width: 0,
left: 0
};
},
computed: {
styles () {
return {
width: `${this.width}px`,
left: `${this.left}px`
}
}
},
};
</script>