Browse Source

Image: don't show image-viewer when preview is false (#18967)

inooNgt 5 years ago
parent
commit
bc7dcc6281
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/image/src/main.vue

+ 4 - 0
packages/image/src/main.vue

@@ -217,6 +217,10 @@
         }
         }
       },
       },
       clickHandler() {
       clickHandler() {
+        // don't show viewer when preview is false
+        if (!this.preview) {
+          return;
+        }
         // prevent body scroll
         // prevent body scroll
         prevOverflow = document.body.style.overflow;
         prevOverflow = document.body.style.overflow;
         document.body.style.overflow = 'hidden';
         document.body.style.overflow = 'hidden';