Browse Source

[FIX] loader on click on background

Gogs 7 years ago
parent
commit
a88e9c5670
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/components/Loader.vue

+ 8 - 1
src/components/Loader.vue

@@ -1,5 +1,5 @@
 <template lang="pug">
-    modal(name="pos-loader" transition="nice-modal-fade")
+    modal(name="pos-loader" transition="nice-modal-fade" @before-close="beforeClose")
         h2 Cargando
 </template>
 
@@ -19,6 +19,13 @@
                 }
             }
         },
+        methods: {
+            beforeClose(e) {
+                if (!this.isLoaded) {
+                    e.stop()
+                }
+            }
+        },
         mounted() {
             this.$modal.show("pos-loader")
         }