|
@@ -37,7 +37,7 @@
|
|
|
{{ file.name }}
|
|
|
</span>
|
|
|
</el-link>
|
|
|
- <div class="ele-upload-list__item-content-action">
|
|
|
+ <div class="ele-upload-list__item-content-action" v-if="canRemove">
|
|
|
<el-link :underline="false" @click="handleRemove(index)" type="danger">删除</el-link>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -66,6 +66,7 @@ interface UploadFileProps {
|
|
|
icon?: string
|
|
|
fileType?: Array<string>
|
|
|
uploadApiPath?: string // 上传文件服务器地址
|
|
|
+ canRemove: boolean // 是否显示删除按钮
|
|
|
}
|
|
|
|
|
|
// 默认值
|
|
@@ -79,7 +80,8 @@ const props = withDefaults(defineProps<UploadFileProps>(), {
|
|
|
text: '文件上传',
|
|
|
isShowTip: true,
|
|
|
uploadApiPath: '/common/upload',
|
|
|
- icon: 'upload-filled'
|
|
|
+ icon: 'upload-filled',
|
|
|
+ canRemove: false
|
|
|
})
|
|
|
|
|
|
const baseUrl = import.meta.env.VITE_API_URL
|