<el-upload class="upload-demo" :action="actionurl" :show-file-list="false" :on-success="handleavatarsuccess"
:before-upload=" beforeUpload">
beforeUpload(file, index){
let url = URL.createObjectURL(file.raw)
var audioElement = new Audio(url)
audioElement.addEventListener('loadedmetadata',() => {
this.tableList[index].videoTime = Math.round(audioElement.duration * 100) / 100 //videoTime 就是当前视频长度即保留两位小数
/*let playTime = ~~audioElement.duration;~~ //playTime就是当前视频长度*/
})
},