feat: 上传组件增加自定义上传

This commit is contained in:
Hooray Hu 2024-07-09 18:02:02 +08:00
parent 7457fcc23e
commit 66c0e4f8c7
3 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@ const props = withDefaults(
files?: UploadUserFile[]
notip?: boolean
ext?: string[]
httpRequest?: UploadProps['httpRequest']
}>(),
{
name: 'file',
@ -68,6 +69,7 @@ const onSuccess: UploadProps['onSuccess'] = (res, file, fileList) => {
:before-upload="beforeUpload"
:on-exceed="onExceed"
:on-success="onSuccess"
:http-request="httpRequest"
:file-list="files"
:limit="max"
drag

View File

@ -18,6 +18,7 @@ const props = withDefaults(
placeholder?: string
notip?: boolean
ext?: string[]
httpRequest?: UploadProps['httpRequest']
}>(),
{
name: 'file',
@ -97,6 +98,7 @@ const onSuccess: UploadProps['onSuccess'] = (res) => {
:before-upload="beforeUpload"
:on-progress="onProgress"
:on-success="onSuccess"
:http-request="httpRequest"
drag
class="image-upload"
>

View File

@ -19,6 +19,7 @@ const props = withDefaults(
placeholder?: string
notip?: boolean
ext?: string[]
httpRequest?: UploadProps['httpRequest']
}>(),
{
name: 'file',
@ -131,6 +132,7 @@ const onSuccess: UploadProps['onSuccess'] = (res) => {
:before-upload="beforeUpload"
:on-progress="onProgress"
:on-success="onSuccess"
:http-request="httpRequest"
drag
class="images-upload"
>