@dazhicheng/ui 1.5.154 → 1.5.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/tt-form/index.d.ts +1 -1
- package/dist/components/tt-form/src/group-form/groupFormApi.d.ts +1 -1
- package/dist/components/tt-form/src/group-form/index.d.ts +2 -2
- package/dist/components/tt-form/src/group-form/types.d.ts +23 -6
- package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +9 -2
- package/dist/components/tt-form/src/group-form/utils.d.ts +9 -0
- package/dist/components/tt-form/src/hooks/useFieldArray.d.ts +3 -5
- package/dist/components/tt-form/src/types/forms.d.ts +1 -1
- package/dist/components/tt-form/src/types.d.ts +1 -1
- package/dist/components/tt-upload/index.d.ts +35 -30
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +81 -78
- package/dist/components/tt-upload/src/typing.d.ts +12 -9
- package/dist/index.js +6354 -6317
- package/package.json +1 -1
|
@@ -12,4 +12,4 @@ type TtExtendedFormApi = ExtendedFormApi;
|
|
|
12
12
|
export type { BaseFormComponentMap, BaseFormComponentType, FormSlotSchema, InferredComponentPropsType, TtExtendedFormApi, TtFormProps, TtFormRenderProps, TtFormSchema, };
|
|
13
13
|
export * as z from 'zod';
|
|
14
14
|
export { useGroupForm } from './src/group-form';
|
|
15
|
-
export type { FormGroupSchema, GroupFormNavAnchorProps, GroupFormSchema, UseGroupFormNavAnchorProps, UseGroupFormOptions, } from './src/group-form';
|
|
15
|
+
export type { FormGroupSchema, GroupFormNavAnchorProps, GroupFormSchema, UseGroupFormNavAnchorProps, UseGroupFormOptions, UseGroupFormOptionsWithGroupSchema, UseGroupFormOptionsWithLegacySchema, } from './src/group-form';
|
|
@@ -71,7 +71,7 @@ export declare class GroupFormApi extends FormApi {
|
|
|
71
71
|
*/
|
|
72
72
|
get navAnchorProps(): Required<Pick<UseGroupFormNavAnchorProps, "show">> & UseGroupFormNavAnchorProps;
|
|
73
73
|
/**
|
|
74
|
-
* @description 覆盖基类 setState,扩展支持 GroupFormExtraState 中的字段(navAnchorProps、groupSchema
|
|
74
|
+
* @description 覆盖基类 setState,扩展支持 GroupFormExtraState 中的字段(navAnchorProps、groupSchema 等)。
|
|
75
75
|
* @param {Partial<GroupFormState> | ((prev: GroupFormState) => Partial<GroupFormState>)} stateOrFn - 新状态或更新函数
|
|
76
76
|
*/
|
|
77
77
|
setState(stateOrFn: ((prev: GroupFormState) => Partial<GroupFormState>) | Partial<GroupFormState>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { GroupFormApi } from './groupFormApi';
|
|
2
2
|
export { useGroupForm } from './useGroupForm';
|
|
3
|
-
export type { FormGroupSchema, FormRowSchema, GroupFormApiOptions, GroupFormNavAnchorProps, GroupFormSchema, UseGroupFormNavAnchorProps, UseGroupFormOptions, } from './types';
|
|
4
|
-
export { isGroupSchema, isRowSchema, isSlotSchema,
|
|
3
|
+
export type { FormGroupSchema, FormRowSchema, GroupFormApiOptions, GroupFormNavAnchorProps, GroupFormSchema, UseGroupFormNavAnchorProps, UseGroupFormOptions, UseGroupFormOptionsWithGroupSchema, UseGroupFormOptionsWithLegacySchema, } from './types';
|
|
4
|
+
export { extractFlatSchemas, isGroupSchema, isRowSchema, isSlotSchema, resolveGroupSchema } from './utils';
|
|
@@ -62,9 +62,8 @@ export type UseGroupFormNavAnchorProps = Omit<NavAnchorPropsBase, "badgeCounts">
|
|
|
62
62
|
* VirtualGroupForm 组件接收的导航配置;`badgeCounts` 由组件内合并 `navErrorCounts` 与 `extraBadgeCounts` 注入。
|
|
63
63
|
*/
|
|
64
64
|
export type GroupFormNavAnchorProps = UseGroupFormNavAnchorProps;
|
|
65
|
-
/**
|
|
66
|
-
export
|
|
67
|
-
schema: GroupFormSchema[];
|
|
65
|
+
/** useGroupForm 除分组 schema 外的公共选项 */
|
|
66
|
+
export type UseGroupFormOptionsCommon = Omit<TtFormProps, "schema" | "showDefaultActions"> & {
|
|
68
67
|
/** 是否启用虚拟化,默认 true */
|
|
69
68
|
virtual?: boolean;
|
|
70
69
|
/** 滚动容器高度,默认 '100%' */
|
|
@@ -80,9 +79,27 @@ export interface UseGroupFormOptions extends Omit<TtFormProps, "schema" | "showD
|
|
|
80
79
|
navAnchorProps?: UseGroupFormNavAnchorProps;
|
|
81
80
|
/** 滚动到分组时的顶部偏移量(px),用于补偿页面顶部固定元素(如 header)的遮挡,默认 0 */
|
|
82
81
|
scrollOffset?: number;
|
|
82
|
+
};
|
|
83
|
+
/** 推荐:使用 groupSchema 传入分组树 */
|
|
84
|
+
export interface UseGroupFormOptionsWithGroupSchema extends UseGroupFormOptionsCommon {
|
|
85
|
+
/** 分组 schema 树形结构 */
|
|
86
|
+
groupSchema: GroupFormSchema[];
|
|
83
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* @description 已废弃的分组表单入参(兼容旧代码)
|
|
90
|
+
* @deprecated 请改用 {@link UseGroupFormOptionsWithGroupSchema},通过 `groupSchema` 传入分组树
|
|
91
|
+
*/
|
|
92
|
+
export interface UseGroupFormOptionsWithLegacySchema extends UseGroupFormOptionsCommon {
|
|
93
|
+
/**
|
|
94
|
+
* 分组 schema 树形结构
|
|
95
|
+
* @deprecated 请使用 `groupSchema` 替代
|
|
96
|
+
*/
|
|
97
|
+
schema: GroupFormSchema[];
|
|
98
|
+
}
|
|
99
|
+
/** groupSchema 与 schema 二选一(至少传一个) */
|
|
100
|
+
export type UseGroupFormOptions = UseGroupFormOptionsWithGroupSchema | UseGroupFormOptionsWithLegacySchema;
|
|
84
101
|
export type GroupFormExtraState = Partial<Pick<UseGroupFormOptions, "virtual" | "navAnchorProps" | "containerHeight" | "rootMargin" | "estimateFieldHeight" | "scrollOffset">> & {
|
|
85
|
-
/** 分组 schema
|
|
102
|
+
/** 分组 schema 树形结构(store 状态,由 GroupFormApi.setState 维护) */
|
|
86
103
|
groupSchema?: GroupFormSchema[];
|
|
87
104
|
};
|
|
88
105
|
/** 分组表单完整 store 状态类型 */
|
|
@@ -144,10 +161,10 @@ export interface GroupSectionProps {
|
|
|
144
161
|
}
|
|
145
162
|
/**
|
|
146
163
|
* @description GroupFormApi 构造函数的分组配置选项,复用 UseGroupFormOptions 中同名字段的类型定义,
|
|
147
|
-
* 额外增加 `groupSchema`(由 useGroupForm
|
|
164
|
+
* 额外增加 `groupSchema`(由 useGroupForm 传入)。
|
|
148
165
|
*/
|
|
149
166
|
export type GroupFormApiOptions = Pick<UseGroupFormOptions, "virtual" | "navAnchorProps" | "scrollToFirstError" | "containerHeight" | "rootMargin" | "estimateFieldHeight" | "scrollOffset"> & {
|
|
150
|
-
/** 分组 schema 树形结构(由 useGroupForm
|
|
167
|
+
/** 分组 schema 树形结构(由 useGroupForm 传入) */
|
|
151
168
|
groupSchema: GroupFormSchema[];
|
|
152
169
|
};
|
|
153
170
|
export {};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { DefineComponent } from 'vue';
|
|
2
2
|
import { GroupFormApi } from './groupFormApi';
|
|
3
|
-
import { UseGroupFormOptions } from './types';
|
|
3
|
+
import { UseGroupFormOptions, UseGroupFormOptionsCommon, UseGroupFormOptionsWithLegacySchema } from './types';
|
|
4
|
+
type GroupFormOverrideProps = Partial<UseGroupFormOptionsCommon>;
|
|
5
|
+
type UseGroupFormReturn = readonly [DefineComponent<GroupFormOverrideProps>, GroupFormApi];
|
|
4
6
|
/**
|
|
5
7
|
* @description 返回可渲染的包装组件、扩展后的表单 API,以及分组折叠状态对象。
|
|
6
8
|
*/
|
|
7
|
-
export declare function useGroupForm(options: UseGroupFormOptions):
|
|
9
|
+
export declare function useGroupForm(options: UseGroupFormOptions): UseGroupFormReturn;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated 请改用 `groupSchema` 传入分组树
|
|
12
|
+
*/
|
|
13
|
+
export declare function useGroupForm(options: UseGroupFormOptionsWithLegacySchema): UseGroupFormReturn;
|
|
14
|
+
export {};
|
|
@@ -42,6 +42,15 @@ export declare function getSchemaKey(schema: GroupFormSchema, idx: number): stri
|
|
|
42
42
|
* ]);
|
|
43
43
|
* // 返回: [{ fieldName: 'name' }, { fieldName: 'age' }]
|
|
44
44
|
*/
|
|
45
|
+
export type GroupSchemaSourceOptions = {
|
|
46
|
+
groupSchema?: GroupFormSchema[];
|
|
47
|
+
/** @deprecated 请使用 groupSchema */
|
|
48
|
+
schema?: GroupFormSchema[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @description 解析分组 schema:优先 `groupSchema`,兼容已废弃的 `schema`
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveGroupSchema(options: GroupSchemaSourceOptions): GroupFormSchema[];
|
|
45
54
|
export declare function extractFlatSchemas(schemas: GroupFormSchema[]): FormSchema[];
|
|
46
55
|
/**
|
|
47
56
|
* 递归收集分组 schema 中 defaultCollapsed 为 true 的分组 key,写入 states
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { MaybeRefOrGetter
|
|
2
|
-
import { FieldArrayContext
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { FieldArrayContext } from '../types/forms';
|
|
3
3
|
/**
|
|
4
4
|
* 与 vee-validate `useFieldArray` API 对齐:稳定 `key`、`entry.value` 可写(支持 v-model),
|
|
5
5
|
* 外部 `resetForm` / `setValues` 时同步行列表;不使用官方 `computedDeep` 与易递归的深拷贝双向 watch。
|
|
6
6
|
*/
|
|
7
|
-
export declare function useFieldArray<TValue extends Record<string, unknown> = Record<string, unknown>>(arrayPath: MaybeRefOrGetter<string>):
|
|
8
|
-
fields: Ref<FieldEntry<TValue>[]>;
|
|
9
|
-
};
|
|
7
|
+
export declare function useFieldArray<TValue extends Record<string, unknown> = Record<string, unknown>>(arrayPath: MaybeRefOrGetter<string>): FieldArrayContext<TValue>;
|
|
@@ -94,7 +94,7 @@ export type FieldEntry<TValue = Recordable> = {
|
|
|
94
94
|
isLast: boolean;
|
|
95
95
|
};
|
|
96
96
|
export type FieldArrayContext<TValue = Recordable> = {
|
|
97
|
-
fields: FieldEntry<TValue>[]
|
|
97
|
+
fields: Ref<FieldEntry<TValue>[]>;
|
|
98
98
|
remove: (idx: number) => void;
|
|
99
99
|
replace: (newArray: TValue[]) => void;
|
|
100
100
|
update: (idx: number, value: TValue) => void;
|
|
@@ -10,6 +10,15 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
10
10
|
readonly type: import('vue').PropType<string>;
|
|
11
11
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
12
12
|
};
|
|
13
|
+
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
14
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
15
|
+
new (): any;
|
|
16
|
+
readonly prototype: any;
|
|
17
|
+
} | ((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
18
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
19
|
+
new (): any;
|
|
20
|
+
readonly prototype: any;
|
|
21
|
+
} | null)[], unknown, unknown, () => void, boolean>;
|
|
13
22
|
multiple: {
|
|
14
23
|
readonly type: import('vue').PropType<boolean>;
|
|
15
24
|
readonly default: true;
|
|
@@ -82,15 +91,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
82
91
|
readonly type: import('vue').PropType<boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
83
92
|
readonly default: false;
|
|
84
93
|
};
|
|
85
|
-
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
86
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
87
|
-
new (): any;
|
|
88
|
-
readonly prototype: any;
|
|
89
|
-
} | (((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
90
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
91
|
-
new (): any;
|
|
92
|
-
readonly prototype: any;
|
|
93
|
-
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
94
94
|
beforeRemove: {
|
|
95
95
|
readonly type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
96
96
|
readonly required: false;
|
|
@@ -197,6 +197,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
197
197
|
}>> & Readonly<{
|
|
198
198
|
onDelete?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
199
199
|
onClose?: (() => any) | undefined;
|
|
200
|
+
onError?: ((err: unknown, file: import('element-plus').UploadRawFile) => any) | undefined;
|
|
200
201
|
"onUpdate:modelValue"?: ((value: import('.').TtUploadFileItem[]) => any) | undefined;
|
|
201
202
|
onAfterUpload?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
202
203
|
onPreview?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
@@ -211,6 +212,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
211
212
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
212
213
|
delete: (file: import('.').TtUploadFileItem) => any;
|
|
213
214
|
close: () => any;
|
|
215
|
+
error: (err: unknown, file: import('element-plus').UploadRawFile) => any;
|
|
214
216
|
"update:modelValue": (value: import('.').TtUploadFileItem[]) => any;
|
|
215
217
|
afterUpload: (file: import('.').TtUploadFileItem) => any;
|
|
216
218
|
preview: (file: import('.').TtUploadFileItem) => any;
|
|
@@ -231,6 +233,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
231
233
|
multiple: boolean;
|
|
232
234
|
action: string;
|
|
233
235
|
accept: string;
|
|
236
|
+
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
234
237
|
modal: boolean;
|
|
235
238
|
uploadOssApi: (file: File) => Promise<any>;
|
|
236
239
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -246,7 +249,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
246
249
|
showCount: boolean;
|
|
247
250
|
ossDir: string;
|
|
248
251
|
beforeDownload: boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>);
|
|
249
|
-
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
250
252
|
onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
251
253
|
onPreview: (uploadFile: import('element-plus').UploadFile) => void;
|
|
252
254
|
onSuccess: (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
@@ -272,6 +274,15 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
272
274
|
readonly type: import('vue').PropType<string>;
|
|
273
275
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
274
276
|
};
|
|
277
|
+
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
278
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
279
|
+
new (): any;
|
|
280
|
+
readonly prototype: any;
|
|
281
|
+
} | ((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
282
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
283
|
+
new (): any;
|
|
284
|
+
readonly prototype: any;
|
|
285
|
+
} | null)[], unknown, unknown, () => void, boolean>;
|
|
275
286
|
multiple: {
|
|
276
287
|
readonly type: import('vue').PropType<boolean>;
|
|
277
288
|
readonly default: true;
|
|
@@ -344,15 +355,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
344
355
|
readonly type: import('vue').PropType<boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
345
356
|
readonly default: false;
|
|
346
357
|
};
|
|
347
|
-
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
348
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
349
|
-
new (): any;
|
|
350
|
-
readonly prototype: any;
|
|
351
|
-
} | (((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
352
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
353
|
-
new (): any;
|
|
354
|
-
readonly prototype: any;
|
|
355
|
-
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
356
358
|
beforeRemove: {
|
|
357
359
|
readonly type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
358
360
|
readonly required: false;
|
|
@@ -459,6 +461,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
459
461
|
}>> & Readonly<{
|
|
460
462
|
onDelete?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
461
463
|
onClose?: (() => any) | undefined;
|
|
464
|
+
onError?: ((err: unknown, file: import('element-plus').UploadRawFile) => any) | undefined;
|
|
462
465
|
"onUpdate:modelValue"?: ((value: import('.').TtUploadFileItem[]) => any) | undefined;
|
|
463
466
|
onAfterUpload?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
464
467
|
onPreview?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
@@ -484,6 +487,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
484
487
|
multiple: boolean;
|
|
485
488
|
action: string;
|
|
486
489
|
accept: string;
|
|
490
|
+
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
487
491
|
modal: boolean;
|
|
488
492
|
uploadOssApi: (file: File) => Promise<any>;
|
|
489
493
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -499,7 +503,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
499
503
|
showCount: boolean;
|
|
500
504
|
ossDir: string;
|
|
501
505
|
beforeDownload: boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>);
|
|
502
|
-
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
503
506
|
onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
504
507
|
onPreview: (uploadFile: import('element-plus').UploadFile) => void;
|
|
505
508
|
onSuccess: (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
@@ -522,6 +525,15 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
522
525
|
readonly type: import('vue').PropType<string>;
|
|
523
526
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
524
527
|
};
|
|
528
|
+
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
529
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
530
|
+
new (): any;
|
|
531
|
+
readonly prototype: any;
|
|
532
|
+
} | ((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
533
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
534
|
+
new (): any;
|
|
535
|
+
readonly prototype: any;
|
|
536
|
+
} | null)[], unknown, unknown, () => void, boolean>;
|
|
525
537
|
multiple: {
|
|
526
538
|
readonly type: import('vue').PropType<boolean>;
|
|
527
539
|
readonly default: true;
|
|
@@ -594,15 +606,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
594
606
|
readonly type: import('vue').PropType<boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
595
607
|
readonly default: false;
|
|
596
608
|
};
|
|
597
|
-
beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
598
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
599
|
-
new (): any;
|
|
600
|
-
readonly prototype: any;
|
|
601
|
-
} | (((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
602
|
-
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
603
|
-
new (): any;
|
|
604
|
-
readonly prototype: any;
|
|
605
|
-
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
606
609
|
beforeRemove: {
|
|
607
610
|
readonly type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
608
611
|
readonly required: false;
|
|
@@ -709,6 +712,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
709
712
|
}>> & Readonly<{
|
|
710
713
|
onDelete?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
711
714
|
onClose?: (() => any) | undefined;
|
|
715
|
+
onError?: ((err: unknown, file: import('element-plus').UploadRawFile) => any) | undefined;
|
|
712
716
|
"onUpdate:modelValue"?: ((value: import('.').TtUploadFileItem[]) => any) | undefined;
|
|
713
717
|
onAfterUpload?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
714
718
|
onPreview?: ((file: import('.').TtUploadFileItem) => any) | undefined;
|
|
@@ -723,6 +727,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
723
727
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
724
728
|
delete: (file: import('.').TtUploadFileItem) => any;
|
|
725
729
|
close: () => any;
|
|
730
|
+
error: (err: unknown, file: import('element-plus').UploadRawFile) => any;
|
|
726
731
|
"update:modelValue": (value: import('.').TtUploadFileItem[]) => any;
|
|
727
732
|
afterUpload: (file: import('.').TtUploadFileItem) => any;
|
|
728
733
|
preview: (file: import('.').TtUploadFileItem) => any;
|
|
@@ -743,6 +748,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
743
748
|
multiple: boolean;
|
|
744
749
|
action: string;
|
|
745
750
|
accept: string;
|
|
751
|
+
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
746
752
|
modal: boolean;
|
|
747
753
|
uploadOssApi: (file: File) => Promise<any>;
|
|
748
754
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -758,7 +764,6 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
758
764
|
showCount: boolean;
|
|
759
765
|
ossDir: string;
|
|
760
766
|
beforeDownload: boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>);
|
|
761
|
-
beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
762
767
|
onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
763
768
|
onPreview: (uploadFile: import('element-plus').UploadFile) => void;
|
|
764
769
|
onSuccess: (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|