[new feature] ImagePreview: add onChange option (#3630)

This commit is contained in:
neverland
2019-06-25 15:49:17 +08:00
committed by GitHub
parent 045c75669b
commit fbd751a641
7 changed files with 64 additions and 13 deletions

View File

@@ -228,7 +228,7 @@ export default sfc({
}
},
onChange(active) {
onSwipeChange(active) {
this.resetScale();
this.active = active;
this.$emit('change', active);
@@ -261,7 +261,7 @@ export default sfc({
indicatorColor="white"
initialSwipe={this.startPosition}
showIndicators={this.showIndicators}
onChange={this.onChange}
onChange={this.onSwipeChange}
>
{images.map((image, index) => {
const props = {