@vunk/form 0.0.1-alpha.15 → 0.0.1-alpha.16

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.
@@ -0,0 +1,160 @@
1
+ import { UploadFile } from 'element-plus';
2
+ export declare const props: {
3
+ tip: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ preview: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ beforeUpload: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>) | {
12
+ (): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>;
13
+ new (): any;
14
+ readonly prototype: any;
15
+ } | ((new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>) | {
16
+ (): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | File | Blob | null | undefined>;
17
+ new (): any;
18
+ readonly prototype: any;
19
+ })[], unknown, unknown, () => void, boolean>;
20
+ beforeRemove: {
21
+ readonly type: import("vue").PropType<(uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
22
+ readonly required: false;
23
+ readonly validator: ((val: unknown) => boolean) | undefined;
24
+ __epPropKey: true;
25
+ };
26
+ onRemove: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
27
+ (): (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
28
+ new (): any;
29
+ readonly prototype: any;
30
+ } | ((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
31
+ (): (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
32
+ new (): any;
33
+ readonly prototype: any;
34
+ })[], unknown, unknown, () => void, boolean>;
35
+ onChange: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
36
+ (): (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
37
+ new (): any;
38
+ readonly prototype: any;
39
+ } | ((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
40
+ (): (uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
41
+ new (): any;
42
+ readonly prototype: any;
43
+ })[], unknown, unknown, () => void, boolean>;
44
+ onPreview: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
45
+ (): (uploadFile: UploadFile) => void;
46
+ new (): any;
47
+ readonly prototype: any;
48
+ } | ((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
49
+ (): (uploadFile: UploadFile) => void;
50
+ new (): any;
51
+ readonly prototype: any;
52
+ })[], unknown, unknown, () => void, boolean>;
53
+ onSuccess: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
54
+ (): (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
55
+ new (): any;
56
+ readonly prototype: any;
57
+ } | ((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
58
+ (): (response: any, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
59
+ new (): any;
60
+ readonly prototype: any;
61
+ })[], unknown, unknown, () => void, boolean>;
62
+ onProgress: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
63
+ (): (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
64
+ new (): any;
65
+ readonly prototype: any;
66
+ } | ((new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
67
+ (): (evt: import("element-plus").UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
68
+ new (): any;
69
+ readonly prototype: any;
70
+ })[], unknown, unknown, () => void, boolean>;
71
+ onError: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
72
+ (): (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
73
+ new (): any;
74
+ readonly prototype: any;
75
+ } | ((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
76
+ (): (error: Error, uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
77
+ new (): any;
78
+ readonly prototype: any;
79
+ })[], unknown, unknown, () => void, boolean>;
80
+ onExceed: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void) | {
81
+ (): (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void;
82
+ new (): any;
83
+ readonly prototype: any;
84
+ } | ((new (...args: any[]) => (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void) | {
85
+ (): (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void;
86
+ new (): any;
87
+ readonly prototype: any;
88
+ })[], unknown, unknown, () => void, boolean>;
89
+ action: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
90
+ headers: {
91
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | ((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers))[], unknown, unknown>>;
92
+ readonly required: false;
93
+ readonly validator: ((val: unknown) => boolean) | undefined;
94
+ __epPropKey: true;
95
+ };
96
+ method: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
97
+ data: import("element-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
98
+ multiple: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
99
+ name: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
100
+ drag: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
101
+ withCredentials: BooleanConstructor;
102
+ showFileList: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
103
+ accept: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
104
+ type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "select", boolean>;
105
+ fileList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadUserFile[]) | (() => import("element-plus").UploadUserFile[]) | ((new (...args: any[]) => import("element-plus").UploadUserFile[]) | (() => import("element-plus").UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
106
+ autoUpload: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
107
+ listType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
108
+ httpRequest: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
109
+ (): import("element-plus").UploadRequestHandler;
110
+ new (): any;
111
+ readonly prototype: any;
112
+ } | ((new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
113
+ (): import("element-plus").UploadRequestHandler;
114
+ new (): any;
115
+ readonly prototype: any;
116
+ })[], unknown, unknown, import("element-plus").UploadRequestHandler, boolean>;
117
+ disabled: BooleanConstructor;
118
+ limit: NumberConstructor;
119
+ required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
120
+ label: StringConstructor;
121
+ labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
122
+ prop: {
123
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
124
+ readonly required: false;
125
+ readonly validator: ((val: unknown) => boolean) | undefined;
126
+ __epPropKey: true;
127
+ };
128
+ rules: {
129
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
130
+ readonly required: false;
131
+ readonly validator: ((val: unknown) => boolean) | undefined;
132
+ __epPropKey: true;
133
+ };
134
+ error: StringConstructor;
135
+ validateStatus: {
136
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
137
+ readonly required: false;
138
+ readonly validator: ((val: unknown) => boolean) | undefined;
139
+ __epPropKey: true;
140
+ };
141
+ for: StringConstructor;
142
+ inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
143
+ showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
144
+ formItemSize: {
145
+ type: import("vue").PropType<"default" | "small" | "large">;
146
+ default: string;
147
+ };
148
+ formItemSlots: {
149
+ type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
150
+ default: undefined;
151
+ };
152
+ elRef: {
153
+ type: import("vue").PropType<any>;
154
+ required: boolean;
155
+ };
156
+ };
157
+ export declare const emits: {
158
+ 'update:fileList': null;
159
+ remove: (e: UploadFile) => UploadFile;
160
+ };
@@ -0,0 +1,38 @@
1
+ import { _VkfFormItemCtx } from '@vunk/form/components/form-item';
2
+ import { uploadProps } from 'element-plus';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), uploadProps), {
24
+ tip: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ preview: {
29
+ type: String,
30
+ default: ""
31
+ }
32
+ });
33
+ const emits = {
34
+ "update:fileList": null,
35
+ "remove": (e) => e
36
+ };
37
+
38
+ export { emits, props };
@@ -0,0 +1,96 @@
1
+ import { UploadFile } from 'element-plus';
2
+ import { PropType } from 'vue';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ listType: {
5
+ type: PropType<"text" | "picture" | "picture-card">;
6
+ default: string;
7
+ };
8
+ file: {
9
+ type: PropType<UploadFile>;
10
+ default: () => {};
11
+ };
12
+ disabled: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ onPreview: {
17
+ type: PropType<(arg: UploadFile) => any>;
18
+ default: () => () => void;
19
+ };
20
+ preview: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ }, {
25
+ handleRemove: (file?: UploadFile) => void;
26
+ t: import("element-plus").Translator;
27
+ nsIcon: {
28
+ namespace: import("vue").ComputedRef<string>;
29
+ b: (blockSuffix?: string | undefined) => string;
30
+ e: (element?: string | undefined) => string;
31
+ m: (modifier?: string | undefined) => string;
32
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
33
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
34
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
35
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
36
+ is: {
37
+ (name: string, state: boolean | undefined): string;
38
+ (name: string): string;
39
+ };
40
+ cssVar: (object: Record<string, string>) => Record<string, string>;
41
+ cssVarName: (name: string) => string;
42
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
43
+ cssVarBlockName: (name: string) => string;
44
+ };
45
+ nsUpload: {
46
+ namespace: import("vue").ComputedRef<string>;
47
+ b: (blockSuffix?: string | undefined) => string;
48
+ e: (element?: string | undefined) => string;
49
+ m: (modifier?: string | undefined) => string;
50
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
51
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
52
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
53
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
54
+ is: {
55
+ (name: string, state: boolean | undefined): string;
56
+ (name: string): string;
57
+ };
58
+ cssVar: (object: Record<string, string>) => Record<string, string>;
59
+ cssVarName: (name: string) => string;
60
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
61
+ cssVarBlockName: (name: string) => string;
62
+ };
63
+ handleDownload: (file?: UploadFile) => void;
64
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
65
+ remove: (e: UploadFile) => UploadFile;
66
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
67
+ listType: {
68
+ type: PropType<"text" | "picture" | "picture-card">;
69
+ default: string;
70
+ };
71
+ file: {
72
+ type: PropType<UploadFile>;
73
+ default: () => {};
74
+ };
75
+ disabled: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ onPreview: {
80
+ type: PropType<(arg: UploadFile) => any>;
81
+ default: () => () => void;
82
+ };
83
+ preview: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ }>> & {
88
+ onRemove?: ((e: UploadFile) => any) | undefined;
89
+ }, {
90
+ disabled: boolean;
91
+ file: UploadFile;
92
+ listType: "text" | "picture" | "picture-card";
93
+ onPreview: (arg: UploadFile) => any;
94
+ preview: boolean;
95
+ }>;
96
+ export default _default;