<template>
  <div>
    <el-upload
      class="upload-demo"
      action="/api/public/upload"
      :http-request="uploadFileVideo1Banner"
      list-type="picture-card"
      multiple>
    </el-upload>
    <pre>
      &lt;p&gt;
    </pre>
    <pre v-for="data in fileList">
      &lt;img src="{{data.url}}"  style="display:block"&gt;
    </pre>
    <pre>
      &lt;/p&gt;
    </pre>
  </div>
</template>

<script>
  import {uploadFileApi} from "../../service/api";
  export default {
    name: "upload",
    data(){
      return {
        fileList:[]
      }
    },
    methods:{
      uploadFileVideo1Banner(a){
        uploadFileApi({file:a.file,type:'local'}).then(res=>{
          res.url = process.env.IMAGE_URL_HEAD +  res.url;
          this.fileList.push(res)
        })
      }
    }
  }
</script>

<style scoped>

</style>
