feat : 项目立项申请页面初始化
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user