el-upload上传文件,显示进度条
deviceFile.vue
<el-upload
class="upload-demo"
ref="upload"
action="donothing"
:http-request="fileUpload"
:multiple="true"
:show-file-list="false"
:file-list="fileList">
<el-button type="warning" size="mini" @click="chooseFile">上传文件</el-button>
</el-upload>
// methods
fileUpload(file){
this.$emit('fileUpload',this.client.sessionId,file.file,this.filesystem[0].currentDirectory)
}
使用element中的el-upload来实现文件上传,点击上传文件,去触发父组建里面的上传文件的函数。
uploadTip.vue
<div slot="header">
<span>上传列表</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="progressTipClose">关闭</el-button>
</div>
<div class="text item">
<template>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="Filename"
label="文件名"
width="150px">
</el-table-column>
<el-table-column
prop="Totalsize"
label="大小">
</el-table-column>
<el-table-column
prop="progress"
labe