elementUI upload 上传 传参

<el-upload
  class="upload-demo"
  action="https://jsonplaceholder.typicode.com/posts/"
  :on-preview="handlePreview"
  :on-remove="handleRemove"
  :before-remove="beforeRemove"
  multiple
  :limit="3"
  :on-exceed="handleExceed"
:on-success="(response, file, fileList) => uploadSuccess(response, file, fileList, scope.$index)" :file-list="fileList"> <el-button size="small" type="primary">点击上传</el-button> <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> </el-upload>

  js

methods:{
   uploadSuccess(response, file, fileList, scope.$index){

   }

}

  

上一篇:Vue-UploadImg(图片/视频上传)


下一篇:element ui图片上传方法