<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:http-request="afterRead"
:show-file-list="true"
></el-upload>
afterRead(e) {
let content = e.file;
let data = new FormData();
data.append("file", content);
this.$http.publicImg(data).then(res => {
// console.log(res)
this.imgPath = res.data.data.path;
console.log(this.imgPath);
});