Commit fe823c08 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-admin]: 对象存储页面图片上传成功以后,不能再次上传

parent a0c58e08
......@@ -41,7 +41,7 @@
<!-- 添加对话框 -->
<el-dialog :visible.sync="createDialogVisible" title="上传对象">
<el-upload :show-file-list="false" :limit="1" :http-request="handleUpload" action="#" list-type="picture">
<el-upload ref="upload" :show-file-list="false" :limit="1" :http-request="handleUpload" action="#" list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-dialog>
......@@ -124,6 +124,8 @@ export default {
this.createDialogVisible = true
},
handleUpload(item) {
this.$refs.upload.clearFiles()
const formData = new FormData()
formData.append('file', item.file)
createStorage(formData).then(response => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment