File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
ruoyi-fastapi-frontend/src/components/FileUpload Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1313 :headers =" headers"
1414 class =" upload-file-uploader"
1515 ref =" fileUpload"
16+ v-if =" !disabled"
1617 >
1718 <!-- 上传按钮 -->
1819 <el-button type =" primary" >选取文件</el-button >
1920 </el-upload >
2021 <!-- 上传提示 -->
21- <div class =" el-upload__tip" v-if =" showTip" >
22+ <div class =" el-upload__tip" v-if =" showTip && !disabled " >
2223 请上传
2324 <template v-if =" fileSize " > 大小不超过 <b style =" color : #f56c6c " >{{ fileSize }}MB</b > </template >
2425 <template v-if =" fileType " > 格式为 <b style =" color : #f56c6c " >{{ fileType.join("/") }}</b > </template >
3132 <span class =" el-icon-document" > {{ getFileName(file.name) }} </span >
3233 </el-link >
3334 <div class =" ele-upload-list__item-content-action" >
34- <el-link :underline =" false" @click =" handleDelete(index)" type =" danger" >删除</el-link >
35+ <el-link :underline =" false" @click =" handleDelete(index)" type =" danger" v-if = " !disabled " >删除</el-link >
3536 </div >
3637 </li >
3738 </transition-group >
@@ -62,6 +63,11 @@ const props = defineProps({
6263 isShowTip: {
6364 type: Boolean ,
6465 default: true
66+ },
67+ // 禁用组件(仅查看文件)
68+ disabled: {
69+ type: Boolean ,
70+ default: false
6571 }
6672});
6773
You can’t perform that action at this time.
0 commit comments