Merge pull request #6902 from KumJungMin/fix/issue-6812

fix(Carousel): allow autoplay when value has valid count
pull/6188/merge
Tuğçe Küçükoğlu 2024-12-02 12:07:03 +03:00 committed by GitHub
commit cd1e7626e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -601,11 +601,14 @@ export default {
isVertical() {
return this.orientation === 'vertical';
},
hasValidItemCount() {
return this.value && this.value.length > this.d_numVisible;
},
isCircular() {
return this.value && this.d_circular && this.value.length >= this.d_numVisible;
return this.hasValidItemCount() && this.d_circular;
},
isAutoplay() {
return this.autoplayInterval && this.allowAutoplay;
return this.hasValidItemCount() && this.autoplayInterval && this.allowAutoplay;
},
firstIndex() {
return this.isCircular() ? -1 * (this.totalShiftedItems + this.d_numVisible) : this.totalShiftedItems * -1;