chore: update image upload
This commit is contained in:
parent
297c0ecbea
commit
b696456350
@ -1,5 +1,4 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Recordable } from '@vben/types';
|
|
||||||
import type { UploadFile, UploadProps } from 'ant-design-vue';
|
import type { UploadFile, UploadProps } from 'ant-design-vue';
|
||||||
import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ const props = withDefaults(
|
|||||||
accept?: string[];
|
accept?: string[];
|
||||||
api?: (...args: any[]) => Promise<any>;
|
api?: (...args: any[]) => Promise<any>;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
filename?: null | string;
|
|
||||||
helpText?: string;
|
helpText?: string;
|
||||||
// eslint-disable-next-line no-use-before-define
|
// eslint-disable-next-line no-use-before-define
|
||||||
listType?: ListType;
|
listType?: ListType;
|
||||||
@ -37,11 +35,11 @@ const props = withDefaults(
|
|||||||
maxNumber?: number;
|
maxNumber?: number;
|
||||||
// 文件最大多少MB
|
// 文件最大多少MB
|
||||||
maxSize?: number;
|
maxSize?: number;
|
||||||
|
// 是否支持多选
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
name?: string;
|
|
||||||
// support xxx.xxx.xx
|
// support xxx.xxx.xx
|
||||||
resultField?: string;
|
// 返回的字段 默认url
|
||||||
uploadParams?: Recordable<any>;
|
resultField?: 'fileName' | 'ossId' | 'url' | string;
|
||||||
value?: string[];
|
value?: string[];
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
@ -53,10 +51,7 @@ const props = withDefaults(
|
|||||||
maxNumber: 1,
|
maxNumber: 1,
|
||||||
accept: () => [],
|
accept: () => [],
|
||||||
multiple: false,
|
multiple: false,
|
||||||
uploadParams: () => ({}),
|
|
||||||
api: uploadApi,
|
api: uploadApi,
|
||||||
name: 'file',
|
|
||||||
filename: null,
|
|
||||||
resultField: '',
|
resultField: '',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user