@vunk/form 1.1.66 → 1.1.67
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.
|
@@ -23,6 +23,10 @@ const props = {
|
|
|
23
23
|
beforeUpload: {
|
|
24
24
|
type: Function,
|
|
25
25
|
default: void 0
|
|
26
|
+
},
|
|
27
|
+
onDownload: {
|
|
28
|
+
type: Function,
|
|
29
|
+
default: void 0
|
|
26
30
|
}
|
|
27
31
|
};
|
|
28
32
|
const createBindProps = bindPropsFactory(props);
|
|
@@ -220,6 +224,10 @@ var script$1 = defineComponent({
|
|
|
220
224
|
type: Function,
|
|
221
225
|
default: () => NOOP
|
|
222
226
|
},
|
|
227
|
+
onDownload: {
|
|
228
|
+
type: Function,
|
|
229
|
+
default: void 0
|
|
230
|
+
},
|
|
223
231
|
preview: {
|
|
224
232
|
type: Boolean,
|
|
225
233
|
default: false
|
|
@@ -240,6 +248,10 @@ var script$1 = defineComponent({
|
|
|
240
248
|
emit("remove", file);
|
|
241
249
|
};
|
|
242
250
|
const handleDownload = (file = props.file) => {
|
|
251
|
+
if (props.onDownload) {
|
|
252
|
+
props.onDownload(file);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
243
255
|
let url = "";
|
|
244
256
|
if (file.url) {
|
|
245
257
|
url = file.url;
|
|
@@ -442,8 +454,8 @@ var script = defineComponent({
|
|
|
442
454
|
FileVue: script$1,
|
|
443
455
|
ElLink
|
|
444
456
|
},
|
|
445
|
-
emits,
|
|
446
457
|
props,
|
|
458
|
+
emits,
|
|
447
459
|
setup(props2, {
|
|
448
460
|
emit
|
|
449
461
|
}) {
|
|
@@ -506,34 +518,34 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
506
518
|
_component_VkfFormItem,
|
|
507
519
|
normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
|
|
508
520
|
{
|
|
509
|
-
default: withCtx(() => [createVNode(_component_ElUpload, mergeProps({
|
|
521
|
+
default: withCtx(() => [createVNode(_component_ElUpload, mergeProps(_ctx.coreBindProps, {
|
|
522
|
+
ref: "uploadRef",
|
|
510
523
|
class: ["vkf-upload", {
|
|
511
524
|
"is-readonly": _ctx.readonly,
|
|
512
525
|
"is-empty": _ctx.fileList?.length === 0,
|
|
513
526
|
"is-limit": _ctx.limit && _ctx.fileList?.length >= _ctx.limit
|
|
514
|
-
}]
|
|
515
|
-
|
|
516
|
-
fileList: _ctx.fileList ?? [],
|
|
517
|
-
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fileList", $event)),
|
|
518
|
-
ref: "uploadRef",
|
|
527
|
+
}],
|
|
528
|
+
"file-list": _ctx.fileList ?? [],
|
|
519
529
|
"on-success": _ctx.onSuccess,
|
|
520
530
|
"before-upload": _ctx.beforeUpload,
|
|
521
|
-
disabled: _ctx.readonly || _ctx.disabled
|
|
531
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
532
|
+
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fileList", $event))
|
|
522
533
|
}), createSlots({
|
|
523
534
|
file: withCtx(({
|
|
524
535
|
file
|
|
525
536
|
}) => [createVNode(_component_FileVue, {
|
|
526
537
|
file,
|
|
527
|
-
|
|
538
|
+
"list-type": _ctx.listType,
|
|
528
539
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
529
|
-
|
|
540
|
+
"on-preview": _ctx.onPreview,
|
|
530
541
|
preview: _ctx.preview,
|
|
542
|
+
"on-download": _ctx.onDownload,
|
|
531
543
|
onRemove: _ctx.handleRemove
|
|
532
|
-
}, null, 8, ["file", "
|
|
544
|
+
}, null, 8, ["file", "list-type", "disabled", "on-preview", "preview", "on-download", "onRemove"])]),
|
|
533
545
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(_component_ElLink, {
|
|
534
546
|
type: "primary"
|
|
535
547
|
}, {
|
|
536
|
-
default: withCtx(() => [createTextVNode("+ \u9009\u62E9\u6587\u4EF6")]),
|
|
548
|
+
default: withCtx(() => [createTextVNode(" + \u9009\u62E9\u6587\u4EF6 ")]),
|
|
537
549
|
_: 1
|
|
538
550
|
/* STABLE */
|
|
539
551
|
})])]),
|
|
@@ -549,7 +561,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
549
561
|
/* TEXT */
|
|
550
562
|
)]),
|
|
551
563
|
key: "0"
|
|
552
|
-
} : void 0]), 1040, ["class", "
|
|
564
|
+
} : void 0]), 1040, ["class", "file-list", "on-success", "before-upload", "disabled"]), createElementVNode(
|
|
553
565
|
"span",
|
|
554
566
|
{
|
|
555
567
|
class: normalizeClass(["vkf-upload-empty-tip", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UploadFile } from 'element-plus';
|
|
2
|
+
import { PropType } from 'vue';
|
|
2
3
|
export declare const props: {
|
|
3
4
|
tip: {
|
|
4
5
|
type: StringConstructor;
|
|
@@ -12,8 +13,12 @@ export declare const props: {
|
|
|
12
13
|
type: FunctionConstructor;
|
|
13
14
|
default: any;
|
|
14
15
|
};
|
|
16
|
+
onDownload: {
|
|
17
|
+
type: PropType<(arg: UploadFile) => any>;
|
|
18
|
+
default: any;
|
|
19
|
+
};
|
|
15
20
|
beforeRemove: {
|
|
16
|
-
readonly type:
|
|
21
|
+
readonly type: PropType<(uploadFile: UploadFile, uploadFiles: import("element-plus").UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
|
|
17
22
|
readonly required: false;
|
|
18
23
|
readonly validator: (val: unknown) => boolean;
|
|
19
24
|
__epPropKey: true;
|
|
@@ -82,14 +87,14 @@ export declare const props: {
|
|
|
82
87
|
readonly prototype: any;
|
|
83
88
|
})[], unknown, unknown, () => void, boolean>;
|
|
84
89
|
crossorigin: {
|
|
85
|
-
readonly type:
|
|
90
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
|
|
86
91
|
readonly required: false;
|
|
87
92
|
readonly validator: (val: unknown) => boolean;
|
|
88
93
|
__epPropKey: true;
|
|
89
94
|
};
|
|
90
95
|
action: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
|
|
91
96
|
headers: {
|
|
92
|
-
readonly type:
|
|
97
|
+
readonly type: PropType<unknown>;
|
|
93
98
|
readonly required: false;
|
|
94
99
|
readonly validator: (val: unknown) => boolean;
|
|
95
100
|
__epPropKey: true;
|
|
@@ -119,21 +124,21 @@ export declare const props: {
|
|
|
119
124
|
label: StringConstructor;
|
|
120
125
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
121
126
|
prop: {
|
|
122
|
-
readonly type:
|
|
127
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
123
128
|
readonly required: false;
|
|
124
129
|
readonly validator: (val: unknown) => boolean;
|
|
125
130
|
__epPropKey: true;
|
|
126
131
|
};
|
|
127
132
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
128
133
|
rules: {
|
|
129
|
-
readonly type:
|
|
134
|
+
readonly type: PropType<unknown>;
|
|
130
135
|
readonly required: false;
|
|
131
136
|
readonly validator: (val: unknown) => boolean;
|
|
132
137
|
__epPropKey: true;
|
|
133
138
|
};
|
|
134
139
|
error: StringConstructor;
|
|
135
140
|
validateStatus: {
|
|
136
|
-
readonly type:
|
|
141
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
137
142
|
readonly required: false;
|
|
138
143
|
readonly validator: (val: unknown) => boolean;
|
|
139
144
|
__epPropKey: true;
|
|
@@ -142,15 +147,15 @@ export declare const props: {
|
|
|
142
147
|
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
143
148
|
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
144
149
|
formItemSize: {
|
|
145
|
-
type:
|
|
150
|
+
type: PropType<"default" | "small" | "large">;
|
|
146
151
|
default: "default" | "small" | "large";
|
|
147
152
|
};
|
|
148
153
|
formItemSlots: {
|
|
149
|
-
type:
|
|
154
|
+
type: PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
150
155
|
default: any;
|
|
151
156
|
};
|
|
152
157
|
elRef: {
|
|
153
|
-
type:
|
|
158
|
+
type: PropType<any>;
|
|
154
159
|
required: boolean;
|
|
155
160
|
};
|
|
156
161
|
inline: {
|
|
@@ -162,11 +167,11 @@ export declare const props: {
|
|
|
162
167
|
default: any;
|
|
163
168
|
};
|
|
164
169
|
labelPosition: {
|
|
165
|
-
type:
|
|
170
|
+
type: PropType<"right">;
|
|
166
171
|
default: string;
|
|
167
172
|
};
|
|
168
173
|
};
|
|
169
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"name", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"onChange", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"beforeUpload", keyof T2>, KE> | Exclude<Extract<"beforeRemove", keyof T2>, KE> | Exclude<Extract<"onRemove", keyof T2>, KE> | Exclude<Extract<"onPreview", keyof T2>, KE> | Exclude<Extract<"onSuccess", keyof T2>, KE> | Exclude<Extract<"onProgress", keyof T2>, KE> | Exclude<Extract<"onError", keyof T2>, KE> | Exclude<Extract<"onExceed", keyof T2>, KE> | Exclude<Extract<"crossorigin", keyof T2>, KE> | Exclude<Extract<"action", keyof T2>, KE> | Exclude<Extract<"headers", keyof T2>, KE> | Exclude<Extract<"method", keyof T2>, KE> | Exclude<Extract<"drag", keyof T2>, KE> | Exclude<Extract<"withCredentials", keyof T2>, KE> | Exclude<Extract<"showFileList", keyof T2>, KE> | Exclude<Extract<"accept", keyof T2>, KE> | Exclude<Extract<"fileList", keyof T2>, KE> | Exclude<Extract<"autoUpload", keyof T2>, KE> | Exclude<Extract<"listType", keyof T2>, KE> | Exclude<Extract<"httpRequest", keyof T2>, KE> | Exclude<Extract<"limit", keyof T2>, KE> | Exclude<Extract<"preview", keyof T2>, KE> | Exclude<Extract<"tip", keyof T2>, KE> : Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>]: { [k in Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>]: T2[k]; }[P]; }>;
|
|
174
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"onDownload", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"name", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"onChange", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"beforeUpload", keyof T2>, KE> | Exclude<Extract<"beforeRemove", keyof T2>, KE> | Exclude<Extract<"onRemove", keyof T2>, KE> | Exclude<Extract<"onPreview", keyof T2>, KE> | Exclude<Extract<"onSuccess", keyof T2>, KE> | Exclude<Extract<"onProgress", keyof T2>, KE> | Exclude<Extract<"onError", keyof T2>, KE> | Exclude<Extract<"onExceed", keyof T2>, KE> | Exclude<Extract<"crossorigin", keyof T2>, KE> | Exclude<Extract<"action", keyof T2>, KE> | Exclude<Extract<"headers", keyof T2>, KE> | Exclude<Extract<"method", keyof T2>, KE> | Exclude<Extract<"drag", keyof T2>, KE> | Exclude<Extract<"withCredentials", keyof T2>, KE> | Exclude<Extract<"showFileList", keyof T2>, KE> | Exclude<Extract<"accept", keyof T2>, KE> | Exclude<Extract<"fileList", keyof T2>, KE> | Exclude<Extract<"autoUpload", keyof T2>, KE> | Exclude<Extract<"listType", keyof T2>, KE> | Exclude<Extract<"httpRequest", keyof T2>, KE> | Exclude<Extract<"limit", keyof T2>, KE> | Exclude<Extract<"onDownload", keyof T2>, KE> | Exclude<Extract<"preview", keyof T2>, KE> | Exclude<Extract<"tip", keyof T2>, KE> : Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"onDownload", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>]: { [k in Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"required", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"onChange", keyof T2> | Extract<"multiple", keyof T2> | Extract<"data", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"drag", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"onDownload", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>]: T2[k]; }[P]; }>;
|
|
170
175
|
export declare const emits: {
|
|
171
176
|
'update:fileList': any;
|
|
172
177
|
remove: (e: UploadFile) => UploadFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_VkfFormItemCtx as r}from"@vunk/form/components/form-item";import{bindPropsFactory as p,onEmitsFactory as i}from"@vunk/core/shared/utils-vue";import{uploadProps as
|
|
1
|
+
import{_VkfFormItemCtx as r}from"@vunk/form/components/form-item";import{bindPropsFactory as p,onEmitsFactory as i}from"@vunk/core/shared/utils-vue";import{uploadProps as n}from"element-plus";const o={...r.props,...n,tip:{type:String,default:""},preview:{type:Boolean,default:!1},beforeUpload:{type:Function,default:void 0},onDownload:{type:Function,default:void 0}},a=p(o),t={"update:fileList":null,remove:e=>e},s=i(t);export{a as createBindProps,s as createOnEmits,t as emits,o as props};
|
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
type: PropType<(arg: UploadFile) => any>;
|
|
18
18
|
default: () => () => void;
|
|
19
19
|
};
|
|
20
|
+
onDownload: {
|
|
21
|
+
type: PropType<(arg: UploadFile) => any>;
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
20
24
|
preview: {
|
|
21
25
|
type: BooleanConstructor;
|
|
22
26
|
default: boolean;
|
|
@@ -80,6 +84,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
84
|
type: PropType<(arg: UploadFile) => any>;
|
|
81
85
|
default: () => () => void;
|
|
82
86
|
};
|
|
87
|
+
onDownload: {
|
|
88
|
+
type: PropType<(arg: UploadFile) => any>;
|
|
89
|
+
default: any;
|
|
90
|
+
};
|
|
83
91
|
preview: {
|
|
84
92
|
type: BooleanConstructor;
|
|
85
93
|
default: boolean;
|
|
@@ -91,6 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
99
|
onPreview: (arg: UploadFile) => any;
|
|
92
100
|
listType: "text" | "picture" | "picture-card";
|
|
93
101
|
file: UploadFile;
|
|
102
|
+
onDownload: (arg: UploadFile) => any;
|
|
94
103
|
preview: boolean;
|
|
95
104
|
}, {}>;
|
|
96
105
|
export default _default;
|
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
type: FunctionConstructor;
|
|
18
18
|
default: any;
|
|
19
19
|
};
|
|
20
|
+
onDownload: {
|
|
21
|
+
type: import("vue").PropType<(arg: UploadFile) => any>;
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
20
24
|
beforeRemove: {
|
|
21
25
|
readonly type: import("vue").PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
|
|
22
26
|
readonly required: false;
|
|
@@ -224,6 +228,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
224
228
|
type: FunctionConstructor;
|
|
225
229
|
default: any;
|
|
226
230
|
};
|
|
231
|
+
onDownload: {
|
|
232
|
+
type: import("vue").PropType<(arg: UploadFile) => any>;
|
|
233
|
+
default: any;
|
|
234
|
+
};
|
|
227
235
|
beforeRemove: {
|
|
228
236
|
readonly type: import("vue").PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
|
|
229
237
|
readonly required: false;
|
|
@@ -412,6 +420,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
412
420
|
autoUpload: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
413
421
|
listType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "text" | "picture" | "picture-card", unknown>;
|
|
414
422
|
httpRequest: import("element-plus").UploadRequestHandler;
|
|
423
|
+
onDownload: (arg: UploadFile) => any;
|
|
415
424
|
preview: boolean;
|
|
416
425
|
tip: string;
|
|
417
426
|
}, {}>;
|