1
0

feat(web): 增加文件上传接口

This commit is contained in:
2024-11-21 12:25:19 +08:00
parent 6d63c20b7f
commit d68f8a27ee
10 changed files with 338 additions and 6 deletions

View File

@@ -83,6 +83,14 @@ export function paginationTemplate(perPage = 20, maxButtons = 5) {
}
}
export function inputFileFormItemCommonOptions(accept = '*', maxSize = 5242880) {
return {
accept: accept,
maxSize: maxSize,
autoUpload: false,
}
}
export function copyField(field, tips = '复制', ignoreLength = 0, extra = undefined) {
let tpl = ignoreLength === 0 ? `\${${field}}` : `\${TRUNCATE(${field}, ${ignoreLength})}`
let content = extra