File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " vue-cat-carousel" ,
3- "version" : " 0.9.3-1 " ,
3+ "version" : " 0.9.3-2 " ,
44 "description" : " vue-cat-carousel is a slider component of Vue.js." ,
55 "keywords" : [
66 " slide" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ export default {
3838 } ,
3939 data ( ) {
4040 return {
41- itemWidth : 0 ,
4241 wrapper : {
4342 translateX : 0
4443 } ,
@@ -52,7 +51,6 @@ export default {
5251 } ,
5352 mounted ( ) {
5453 this . maxSlide = Math . ceil ( this . items . length / this . itemPerPage )
55- this . itemWidth = this . carouselItem . length > 0 && this . carouselItem [ 0 ] . clientWidth
5654 this . initSlides ( )
5755 } ,
5856 watch : {
@@ -62,7 +60,6 @@ export default {
6260 }
6361 this . track = 0
6462 this . maxSlide = Math . ceil ( this . items . length / this . itemPerPage )
65- this . itemWidth = this . carouselItem . length > 0 && this . carouselItem [ 0 ] . clientWidth
6663 this . initSlides ( )
6764 }
6865 } ,
@@ -76,6 +73,9 @@ export default {
7673 carouselWrapper ( ) {
7774 return this . $refs . carouselWrapper
7875 } ,
76+ itemWidth ( ) {
77+ return this . carouselItem && this . carouselItem . length > 0 && this . carouselItem [ 0 ] . clientWidth
78+ } ,
7979 wrapperStyles ( ) {
8080 if ( this . centerMode . enabled ) {
8181 return { transform : `translateX(calc(${ this . wrapper . translateX } px + ${ this . centerMode . paddingCenter } %)` }
You can’t perform that action at this time.
0 commit comments