Skip to content

Commit

Permalink
Image: don't show image-viewer when preview is false (ElemeFE#18967)
Browse files Browse the repository at this point in the history
  • Loading branch information
inooNgt authored and zihe-xu committed Jun 27, 2020
1 parent c9838c1 commit 9f44259
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/image/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@
}
},
clickHandler() {
// don't show viewer when preview is false
if (!this.preview) {
return;
}
// prevent body scroll
prevOverflow = document.body.style.overflow;
document.body.style.overflow = 'hidden';
Expand Down

0 comments on commit 9f44259

Please sign in to comment.