carousel basic position
This commit is contained in:
parent
41f83010fa
commit
65c64ce935
4 changed files with 155 additions and 4 deletions
|
@ -1,10 +1,26 @@
|
|||
<template>
|
||||
<div :class="prefixCls"><slot></slot></div>
|
||||
<div :class="prefixCls" v-bind:style="styles">{{width}}<slot></slot></div>
|
||||
</template>
|
||||
<script>
|
||||
const prefixCls = 'ivu-carousel-item';
|
||||
|
||||
export default {
|
||||
name: 'CarouselItem'
|
||||
componentName: 'carousel-item',
|
||||
|
||||
data () {
|
||||
return {
|
||||
prefixCls: prefixCls,
|
||||
width: 0,
|
||||
left: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
styles () {
|
||||
return {
|
||||
width: `${this.width}px`,
|
||||
left: `${this.left}px`
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue