feat(ImagePreview): add scale event (#5658)

This commit is contained in:
landluck
2020-02-14 17:21:13 +08:00
committed by GitHub
parent f507b99cb7
commit 9ff8e5635c
5 changed files with 49 additions and 3 deletions

View File

@@ -274,7 +274,10 @@ export default createComponent({
},
setScale(scale) {
this.scale = range(scale, +this.minZoom, +this.maxZoom);
const value = range(scale, +this.minZoom, +this.maxZoom);
this.scale = value;
this.$emit('scale', { index: this.active, scale: value });
},
resetScale() {