kui-vue
Version:
A high quality UI Toolkit built on Vue.js 2.0
20 lines (19 loc) • 386 B
JSX
export default {
name: 'CarouselItem',
inject: {
Carousel: { default: null }
},
render() {
let width, height, carousel = this.Carousel
if (carousel) {
width = carousel.width
height = carousel.height
}
let styles = { width: `${width}px`, height: `${height}px` }
return (
<div class="k-carousel-item" style={styles}>
{this.$slots.default}
</div>
)
}
}