1.show-file-list:隐藏自带的上传文件的列表
2. :data=“datas” //如果接口还需别的参数可以配置
const datas= { pid: null};
3. fileList:对应文件列表(可要可不要,const fileList = ref<UploadUserFile[]>([]);
import type { UploadUserFile } from “element-plus”😉
4.a链接下载上传的文件<a style="cursor: pointer" :href="
${scope.row.url_ext}" download >下载</a>
<el-upload
:data="datas" //如果接口还需别的参数可以配置
class="upload-demo"
action="http://-----------------------"//文件上传路径
multiple
auto-upload
v-model:file-list="fileList"
:show-file-list="false"
>
<!-- <template #tip>
<div class="el-upload__tip">提示</div>
</template> -->
</el-upload>
下载上传的文件
<el-table
border
:data="itemdatalist"
style="width: 100%; white-space: nowrap"
stripe
row-key="fid"
show-overflow-tooltip
default-expand-all
:default-sort="{ prop: 'fareaid', order: 'ascending' }"
>
<el-table-column label="操作" width="60">
<template #default="scope">
<div style="color: red">
<a style="cursor: pointer" :href="`${scope.row.url_ext}`" download >下载</a>
</div>
</template>
</el-table-column>
</el-table>