iview/src/components/carousel/carousel-item.vue
梁灏 bb71140e7b support Carousel
support Carousel @rijn you can review when you are free
2017-03-02 15:36:39 +08:00

36 lines
880 B
Vue

<template>
<div :class="prefixCls" :style="styles"><slot></slot></div>
</template>
<script>
const prefixCls = 'ivu-carousel-item';
export default {
componentName: 'carousel-item',
name: 'CarouselItem',
data () {
return {
prefixCls: prefixCls,
width: 0,
height: 'auto',
left: 0
};
},
computed: {
styles () {
return {
width: `${this.width}px`,
height: `${this.height}`,
left: `${this.left}px`
};
}
},
mounted () {
// todo while
this.$parent.slotChange();
},
beforeDestroy () {
// todo while
this.$parent.slotChange();
}
};
</script>