feat(web): 增加文件上传接口
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {resourceAddDialog} from "../../components/resource/dialog-resource.js";
|
||||
import {apiPost, inputFileFormItemCommonOptions} from "../../components/constants.js";
|
||||
|
||||
export function tabData() {
|
||||
return {
|
||||
@@ -10,6 +11,21 @@ export function tabData() {
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...resourceAddDialog()
|
||||
},
|
||||
{
|
||||
type: 'form',
|
||||
body: [
|
||||
{
|
||||
type: 'input-file',
|
||||
name: 'file',
|
||||
label: '测试文件上传',
|
||||
...inputFileFormItemCommonOptions(undefined, 1073741824),
|
||||
useChunk: true,
|
||||
startChunkApi: apiPost('${base}/upload/start'),
|
||||
chunkApi: apiPost('${base}/upload/slice'),
|
||||
finishChunkApi: apiPost('${base}/upload/finish')
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user