组件A中的上传功能:
<el-table-column label="操作" width="430">
<template #default="scope">
<el-button type="info" size="small" @click="details(scope.row)">查看</el-button>
<el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button>
<el-button type="warning" size="small" @click="uploadVideo(scope.row)">编辑预览项</el-button>
<el-upload
style="margin:0px 10px"
multiple
action
:show-file-list="false"
:file-list="fileList"
:http-request="function (file,) { return upload(file, scope.row, scope.$index)}"
>
<el-button size="small" type="warning">{
{scope.row.downloadUrl ? '更新游戏包' : '上传游戏包'}}</el-button>
</el-upload>
<el-button type="danger" size="small" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
upload(data, item, index){
// console.log(data, item, index);
this.fileList.push(data.file)
let formdata = new FormData();
formdata.append('file', data.file);
//修改progressFlag值