Fixed #1523 - Thumbnails are not displayed correctly on Galleria if numVisible is greater than the length of value
parent
f5226f6803
commit
e274666d4d
|
@ -286,6 +286,7 @@ export default {
|
|||
|
||||
.p-galleria-thumbnail-items-container {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.p-galleria-thumbnail-items {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@start-slideshow="startSlideShow" @stop-slideshow="stopSlideShow" />
|
||||
|
||||
<GalleriaThumbnails v-if="$attrs.showThumbnails" :containerId="id" :value="$attrs.value" v-model:activeIndex="activeIndex" :templates="$attrs.templates"
|
||||
:numVisible="$attrs.numVisible" :responsiveOptions="$attrs.responsiveOptions" :circular="$attrs.circular"
|
||||
:numVisible="numVisible" :responsiveOptions="$attrs.responsiveOptions" :circular="$attrs.circular"
|
||||
:isVertical="isVertical()" :contentHeight="$attrs.verticalThumbnailViewPortHeight" :showThumbnailNavigators="$attrs.showThumbnailNavigators"
|
||||
v-model:slideShowActive="slideShowActive" @stop-slideshow="stopSlideShow" />
|
||||
</div>
|
||||
|
@ -39,12 +39,21 @@ export default {
|
|||
return {
|
||||
id: this.$attrs.id || UniqueComponentId(),
|
||||
activeIndex: this.$attrs.activeIndex,
|
||||
numVisible: this.$attrs.numVisible,
|
||||
slideShowActive: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$attrs.value': function(newVal) {
|
||||
if (newVal && newVal.length < this.numVisible) {
|
||||
this.numVisible = newVal.length;
|
||||
}
|
||||
},
|
||||
'$attrs.activeIndex': function(newVal) {
|
||||
this.activeIndex = newVal;
|
||||
},
|
||||
'$attrs.numVisible': function(newVal) {
|
||||
this.numVisible = newVal;
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
|
|
Loading…
Reference in New Issue