update pos when slot changes.

added remove test
This commit is contained in:
Rijn 2017-01-16 18:02:51 -06:00
parent 5e8be9b390
commit 8f4e2cf0c3
3 changed files with 10 additions and 1 deletions

View file

@ -22,5 +22,10 @@
}
}
},
compiled () {
// this.$parent.slotChange();
// this.$parent.updateSlides(true, true);
// this.$parent.updatePos();
}
};
</script>

View file

@ -125,6 +125,8 @@
});
this.slides = slides;
this.updatePos();
},
updatePos () {
this.findChild((child) => {

View file

@ -21,6 +21,7 @@
</i-col>
<i-col span="4">
<i-button @click="push">Push</i-button>
<i-button @click="remove = true">Remove</i-button>
</i-col>
</Row>
<Carousel style="width: 50%; border: solid 1px #000"
@ -28,7 +29,7 @@
:autoplay="autoplay"
:autoplay-speed="autoplaySpeed"
easing="linear">
<Carousel-item>
<Carousel-item v-if="!remove">
<Alert type="warning" show-icon>
警告提示文案
<template slot="desc">
@ -52,6 +53,7 @@
currentIndex: 0,
autoplay: true,
autoplaySpeed: 2000,
remove: false,
pushItem: []
}
},