diff --git a/src/components/carousel/carousel-item.vue b/src/components/carousel/carousel-item.vue index 9bf04af..929ffb0 100644 --- a/src/components/carousel/carousel-item.vue +++ b/src/components/carousel/carousel-item.vue @@ -22,5 +22,10 @@ } } }, + compiled () { + // this.$parent.slotChange(); + // this.$parent.updateSlides(true, true); + // this.$parent.updatePos(); + } }; diff --git a/src/components/carousel/carousel.vue b/src/components/carousel/carousel.vue index dd7fd60..b4ce57e 100644 --- a/src/components/carousel/carousel.vue +++ b/src/components/carousel/carousel.vue @@ -125,6 +125,8 @@ }); this.slides = slides; + + this.updatePos(); }, updatePos () { this.findChild((child) => { diff --git a/test/routers/carousel.vue b/test/routers/carousel.vue index a73652f..2cbcb5c 100644 --- a/test/routers/carousel.vue +++ b/test/routers/carousel.vue @@ -21,6 +21,7 @@ Push + Remove - + 警告提示文案