iview/src/components/carousel/carousel-item.vue
Rijn 50f4ac7088 Merge branch 'master' of https://github.com/iview/iview into carousel
Conflicts:
	src/styles/components/index.less
	test/app.vue
	test/main.js
2017-01-17 17:31:51 -06:00

34 lines
806 B
Vue

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