diff --git a/demo/main.js b/demo/main.js index 87d0f4b..45174ec 100644 --- a/demo/main.js +++ b/demo/main.js @@ -1,5 +1,6 @@ import Vue from 'vue' import App from './App.vue' +window.Bus = new Vue; new Vue({ el: '#app', diff --git a/src/MultipleFileUploader.vue b/src/MultipleFileUploader.vue index 95319aa..d20e7df 100644 --- a/src/MultipleFileUploader.vue +++ b/src/MultipleFileUploader.vue @@ -147,7 +147,7 @@ export default { }, showHttpMessages: { type: Boolean, - default: true + default: false } }, @@ -225,9 +225,10 @@ export default { axios({method: this.method, url: this.postURL, data: this.formData,headers:this.postHeader}) .then((response) => { this.isLoaderVisible = false; + Bus.$emit('upload-success'); // Show success message if(this.showHttpMessages) - this.successMsg = response + "." + this.successMessagePath; + this.successMsg = response + this.successMessagePath; this.removeItems(); }) .catch((error) => {