feat : 项目立项申请页面初始化

This commit is contained in:
2024-05-14 22:16:22 +08:00
parent 6d8dbaa8c4
commit 2a72de08a4
3 changed files with 153 additions and 32 deletions

View File

@@ -6,10 +6,11 @@
with-credentials
:multiple="maxSize > 0"
:data="uploadParams"
:show-file-list="false"
:show-file-list="showFileList"
:auto-upload="true"
:before-upload="beforeUpload"
:on-success="handleUploadSuccess"
:on-error="uploadError"
>
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
</el-upload>
@@ -37,6 +38,10 @@ const props = defineProps({
maxSize: {
type: Number,
default: 30
},
showFileList: {
type: Boolean,
default: false
}
})
@@ -77,6 +82,10 @@ const handleUploadSuccess = (res, file) => {
fileList.value.push(data)
emit("getFile", fileList.value)
}
const uploadError=(err)=>{
loading.value = false
ElMessage.error("上传失败,请稍后再试!")
}
</script>