使用Upload+Progress实现文件上传进度条实时更新功能,需要借助http-request属性。具体使用方法如下:

GDScript3
10 行
  <el-upload
     action="#"
     :file-list="fileList"
     :on-change="changeData"
     :http-request="handleRequest"
     :before-upload="beforeUpload">
     <el-button class="btn upload-btn">上传附件</el-button>
     <div slot="tip" class="el-upload__tip">上传文件大小不超过50M</div>
  </el-upload>
  <el-progress :stroke-width="16" :percentage="progressPercent"></el-progress>

作者:书山有路_勤为径
链接:https://www.jianshu.com/p/3b00db2ace86
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。