获取el-upload 多文件上传选择了几个文件

// 在el-upload 上 命名 class: upload-file

var upload_img =document.getElementsByClassName('upload-file')

// console.log(upload_img,'upload_img')

if (upload_img && upload_img.length >0) {

var upload = upload_img[0].getElementsByTagName('input')

if (upload && upload.length >0 && upload[0].files && upload[0].files.length >0) {

this.uploadNum = upload[0].files.length

    // console.error(this.uploadNum )

  }

}

你可能感兴趣的:(获取el-upload 多文件上传选择了几个文件)