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

@@ -1,5 +1,5 @@
import './dialog-resource.css'
import {apiPost, horizontalFormOptions} from "../constants.js";
import {apiPost, horizontalFormOptions, inputFileFormItemCommonOptions} from "../constants.js";
const clearable = {
clearable: true,
@@ -99,8 +99,8 @@ export function resourceAddDialog() {
{
type: 'input-file',
name: 'filePath',
accept: '.zip',
description: '只适合小于2M的资源文件使用大文件请使用其他资源类型',
...inputFileFormItemCommonOptions('.zip', 2097152),
},
]
},
@@ -148,13 +148,13 @@ export function resourceAddDialog() {
type: 'input-file',
description: 'core-site.xml',
name: 'coreSiteFile',
accept: '.xml',
...inputFileFormItemCommonOptions('.xml', 1048576),
},
{
type: 'input-file',
description: 'hdfs-site.xml',
name: 'hdfsSiteFile',
accept: '.xml',
...inputFileFormItemCommonOptions('.xml', 1048576),
},
]
},
@@ -257,7 +257,7 @@ export function resourceAddDialog() {
label: '资源示例',
description: '可以上传用于作为格式示范的样例数据',
name: 'example',
accept: '*',
...inputFileFormItemCommonOptions(),
},
]
}