company/src/components/common/upload.vue
@@ -57,6 +57,12 @@ }, getFile (e) { if (e.target && e.target.files.length > 0) { const loading = this.$loading({ lock: true, text: '上传中,请等待', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); this.$emit('loading') const formdate = new FormData() formdate.append('file', e.target.files[0]) @@ -69,6 +75,7 @@ this.$message.error(e) }) .finally(() => { loading.close(); this.$refs.file.value = null }) }