mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: 文件上传超过限制时禁止按钮
This commit is contained in:
parent
5d86265ac8
commit
12a263c69b
|
|
@ -93,7 +93,7 @@
|
|||
}}
|
||||
</div>
|
||||
</template>
|
||||
<el-button text>
|
||||
<el-button text :disabled="checkMaxFilesLimit()">
|
||||
<el-icon><Paperclip /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
|
|
@ -223,6 +223,10 @@ const getAcceptList = () => {
|
|||
return accepts.map((ext: any) => '.' + ext).join(',')
|
||||
}
|
||||
|
||||
const checkMaxFilesLimit = () => {
|
||||
return props.applicationDetails.file_upload_setting.maxFiles <= (uploadImageList.value.length + uploadDocumentList.value.length)
|
||||
}
|
||||
|
||||
const uploadFile = async (file: any, fileList: any) => {
|
||||
const { maxFiles, fileLimit } = props.applicationDetails.file_upload_setting
|
||||
// 单次上传文件数量限制
|
||||
|
|
|
|||
Loading…
Reference in New Issue