自定义进度条
//我的部分不完整代码
<el-upload
:action="UploadUrlR()"
:on-success="handleSuccessR"
:on-error="handleErrR"
multiple
:limit="1"
:show-file-list=false
:on-exceed="handleExceed"
:file-list="fileList"
:on-progress="uploadVideoProcess"
style="display: inline-block;float:right">
<el-button type="text"
size="small"
icon="el-icon-upload"
plain
class="none-border"
>入口上传
</el-button>
</el-upload>
</template>
</avue-crud>
<!-- 进度条 -->
<el-progress v-if="progressFlag" type="circle" :percentage="loadProgress" width="250" style="position: absolute;left: 34%;top: 37%;"></el-progress >data() { return { loadProgress: 0, // 动态显示进度条 progressFlag: false, // 关闭进度条
uploadVideoProcess(event, file, fileList) { this.progressFlag = true; this.loadProgress = parseInt(event.percent); if (this.loadProgress >= 100) { this.loadProgress = 100 setTimeout( () => {this.progressFlag = false}, 2000); } },