Refactor #4953 - For Galleria
parent
1e8903644c
commit
c797f944a6
|
@ -76,13 +76,16 @@ export default {
|
||||||
emits: ['activeitem-change', 'mask-hide'],
|
emits: ['activeitem-change', 'mask-hide'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: this.$attrs.id || UniqueComponentId(),
|
id: this.$attrs.id,
|
||||||
activeIndex: this.$attrs.activeIndex,
|
activeIndex: this.$attrs.activeIndex,
|
||||||
numVisible: this.$attrs.numVisible,
|
numVisible: this.$attrs.numVisible,
|
||||||
slideShowActive: false
|
slideShowActive: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
'$attrs.id': function (newValue) {
|
||||||
|
this.id = newValue || UniqueComponentId();
|
||||||
|
},
|
||||||
'$attrs.value': function (newVal) {
|
'$attrs.value': function (newVal) {
|
||||||
if (newVal && newVal.length < this.numVisible) {
|
if (newVal && newVal.length < this.numVisible) {
|
||||||
this.numVisible = newVal.length;
|
this.numVisible = newVal.length;
|
||||||
|
@ -98,6 +101,9 @@ export default {
|
||||||
newVal ? this.startSlideShow() : this.stopSlideShow();
|
newVal ? this.startSlideShow() : this.stopSlideShow();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.id = this.id || UniqueComponentId();
|
||||||
|
},
|
||||||
updated() {
|
updated() {
|
||||||
this.$emit('activeitem-change', this.activeIndex);
|
this.$emit('activeitem-change', this.activeIndex);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue