@vunk/form 2.16.3 → 2.16.5
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/components/input-file/index.cjs +15 -17
- package/components/input-file/index.mjs +16 -18
- package/components/input-file/src/ctx.d.ts +1 -0
- package/components/input-file/src/index.vue.d.ts +6 -84
- package/components/input-file/src/template.vue.d.ts +6 -83
- package/components/select/index.cjs +1 -1
- package/components/select/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,8 @@ const props = {
|
|
|
27
27
|
},
|
|
28
28
|
// 复用 upload 的其他展示相关属性
|
|
29
29
|
showFileList: elementPlus.uploadProps.showFileList,
|
|
30
|
-
drag: elementPlus.uploadProps.drag
|
|
30
|
+
drag: elementPlus.uploadProps.drag,
|
|
31
|
+
slots: null
|
|
31
32
|
};
|
|
32
33
|
const emits = {
|
|
33
34
|
"update:modelValue": null
|
|
@@ -42,6 +43,7 @@ var _sfc_main$1 = vue.defineComponent({
|
|
|
42
43
|
emits,
|
|
43
44
|
setup(props2, { emit }) {
|
|
44
45
|
const fileList = vue.ref([]);
|
|
46
|
+
const slots = vue.useSlots();
|
|
45
47
|
const fileToUploadFile = (file) => {
|
|
46
48
|
const uid = elementPlus.genFileId();
|
|
47
49
|
const rawFile = file;
|
|
@@ -87,25 +89,21 @@ var _sfc_main$1 = vue.defineComponent({
|
|
|
87
89
|
action: "#"
|
|
88
90
|
// 占位符,不会实际触发
|
|
89
91
|
}));
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
return () => vue.h(
|
|
93
|
+
upload.VkfUpload,
|
|
94
|
+
{
|
|
95
|
+
...uploadProps.value,
|
|
96
|
+
"onUpdate:file-list": handleFileListChange
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
...slots,
|
|
100
|
+
...props2.slots
|
|
101
|
+
}
|
|
102
|
+
);
|
|
95
103
|
}
|
|
96
104
|
});
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
const _component_VkfUpload = vue.resolveComponent("VkfUpload");
|
|
100
|
-
return vue.openBlock(), vue.createBlock(_component_VkfUpload, vue.mergeProps(_ctx.uploadProps, { "onUpdate:fileList": _ctx.handleFileListChange }), {
|
|
101
|
-
default: vue.withCtx(() => [
|
|
102
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
103
|
-
]),
|
|
104
|
-
_: 3
|
|
105
|
-
/* FORWARDED */
|
|
106
|
-
}, 16, ["onUpdate:fileList"]);
|
|
107
|
-
}
|
|
108
|
-
var VkfInputFile = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-file/src/index.vue"]]);
|
|
106
|
+
var VkfInputFile = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-file/src/index.vue"]]);
|
|
109
107
|
|
|
110
108
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
111
109
|
__name: "template",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uploadProps, genFileId } from 'element-plus';
|
|
2
|
-
import { defineComponent, ref, watch, computed,
|
|
2
|
+
import { defineComponent, ref, useSlots, watch, computed, h, openBlock, createBlock, withCtx, createVNode, mergeProps } from 'vue';
|
|
3
3
|
import { VkfUpload } from '@vunk/form/components/upload';
|
|
4
4
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
5
5
|
import { VkfFormItemRendererTemplate } from '@vunk/form/components/form-item-renderer-template';
|
|
@@ -23,7 +23,8 @@ const props = {
|
|
|
23
23
|
},
|
|
24
24
|
// 复用 upload 的其他展示相关属性
|
|
25
25
|
showFileList: uploadProps.showFileList,
|
|
26
|
-
drag: uploadProps.drag
|
|
26
|
+
drag: uploadProps.drag,
|
|
27
|
+
slots: null
|
|
27
28
|
};
|
|
28
29
|
const emits = {
|
|
29
30
|
"update:modelValue": null
|
|
@@ -38,6 +39,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
38
39
|
emits,
|
|
39
40
|
setup(props2, { emit }) {
|
|
40
41
|
const fileList = ref([]);
|
|
42
|
+
const slots = useSlots();
|
|
41
43
|
const fileToUploadFile = (file) => {
|
|
42
44
|
const uid = genFileId();
|
|
43
45
|
const rawFile = file;
|
|
@@ -83,25 +85,21 @@ var _sfc_main$1 = defineComponent({
|
|
|
83
85
|
action: "#"
|
|
84
86
|
// 占位符,不会实际触发
|
|
85
87
|
}));
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
return () => h(
|
|
89
|
+
VkfUpload,
|
|
90
|
+
{
|
|
91
|
+
...uploadProps.value,
|
|
92
|
+
"onUpdate:file-list": handleFileListChange
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
...slots,
|
|
96
|
+
...props2.slots
|
|
97
|
+
}
|
|
98
|
+
);
|
|
91
99
|
}
|
|
92
100
|
});
|
|
93
101
|
|
|
94
|
-
|
|
95
|
-
const _component_VkfUpload = resolveComponent("VkfUpload");
|
|
96
|
-
return openBlock(), createBlock(_component_VkfUpload, mergeProps(_ctx.uploadProps, { "onUpdate:fileList": _ctx.handleFileListChange }), {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
renderSlot(_ctx.$slots, "default")
|
|
99
|
-
]),
|
|
100
|
-
_: 3
|
|
101
|
-
/* FORWARDED */
|
|
102
|
-
}, 16, ["onUpdate:fileList"]);
|
|
103
|
-
}
|
|
104
|
-
var VkfInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-file/src/index.vue"]]);
|
|
102
|
+
var VkfInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-file/src/index.vue"]]);
|
|
105
103
|
|
|
106
104
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
107
105
|
__name: "template",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UploadFile } from 'element-plus';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
2
|
modelValue: {
|
|
4
3
|
type: import("vue").PropType<File | File[] | undefined>;
|
|
@@ -39,89 +38,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
38
|
readonly default: true;
|
|
40
39
|
};
|
|
41
40
|
drag: BooleanConstructor;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
status: import("element-plus").UploadStatus;
|
|
47
|
-
size?: number;
|
|
48
|
-
response?: unknown;
|
|
49
|
-
uid: number;
|
|
50
|
-
url?: string;
|
|
51
|
-
raw?: {
|
|
52
|
-
uid: number;
|
|
53
|
-
isDirectory?: boolean;
|
|
54
|
-
readonly lastModified: number;
|
|
55
|
-
readonly name: string;
|
|
56
|
-
readonly webkitRelativePath: string;
|
|
57
|
-
readonly size: number;
|
|
58
|
-
readonly type: string;
|
|
59
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
60
|
-
bytes: () => Promise<Uint8Array>;
|
|
61
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
62
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
63
|
-
text: () => Promise<string>;
|
|
64
|
-
};
|
|
65
|
-
}[], UploadFile[] | {
|
|
66
|
-
name: string;
|
|
67
|
-
percentage?: number;
|
|
68
|
-
status: import("element-plus").UploadStatus;
|
|
69
|
-
size?: number;
|
|
70
|
-
response?: unknown;
|
|
71
|
-
uid: number;
|
|
72
|
-
url?: string;
|
|
73
|
-
raw?: {
|
|
74
|
-
uid: number;
|
|
75
|
-
isDirectory?: boolean;
|
|
76
|
-
readonly lastModified: number;
|
|
77
|
-
readonly name: string;
|
|
78
|
-
readonly webkitRelativePath: string;
|
|
79
|
-
readonly size: number;
|
|
80
|
-
readonly type: string;
|
|
81
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
82
|
-
bytes: () => Promise<Uint8Array>;
|
|
83
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
84
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
85
|
-
text: () => Promise<string>;
|
|
86
|
-
};
|
|
87
|
-
}[]>;
|
|
88
|
-
uploadProps: import("vue").ComputedRef<{
|
|
89
|
-
fileList: {
|
|
90
|
-
name: string;
|
|
91
|
-
percentage?: number;
|
|
92
|
-
status: import("element-plus").UploadStatus;
|
|
93
|
-
size?: number;
|
|
94
|
-
response?: unknown;
|
|
95
|
-
uid: number;
|
|
96
|
-
url?: string;
|
|
97
|
-
raw?: {
|
|
98
|
-
uid: number;
|
|
99
|
-
isDirectory?: boolean;
|
|
100
|
-
readonly lastModified: number;
|
|
101
|
-
readonly name: string;
|
|
102
|
-
readonly webkitRelativePath: string;
|
|
103
|
-
readonly size: number;
|
|
104
|
-
readonly type: string;
|
|
105
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
106
|
-
bytes: () => Promise<Uint8Array>;
|
|
107
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
108
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
109
|
-
text: () => Promise<string>;
|
|
110
|
-
};
|
|
111
|
-
}[];
|
|
112
|
-
multiple: boolean;
|
|
113
|
-
accept: string;
|
|
114
|
-
disabled: boolean;
|
|
115
|
-
limit: number;
|
|
116
|
-
listType: "text" | "picture" | "picture-card";
|
|
117
|
-
tip: string;
|
|
118
|
-
showFileList: boolean;
|
|
119
|
-
drag: boolean;
|
|
120
|
-
autoUpload: boolean;
|
|
121
|
-
action: string;
|
|
122
|
-
}>;
|
|
123
|
-
handleFileListChange: (newFileList: UploadFile[]) => void;
|
|
124
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
|
+
slots: any;
|
|
42
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
125
45
|
'update:modelValue': any;
|
|
126
46
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
127
47
|
modelValue: {
|
|
@@ -163,10 +83,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
163
83
|
readonly default: true;
|
|
164
84
|
};
|
|
165
85
|
drag: BooleanConstructor;
|
|
86
|
+
slots: any;
|
|
166
87
|
}>> & Readonly<{
|
|
167
88
|
"onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
|
|
168
89
|
}>, {
|
|
169
90
|
disabled: boolean;
|
|
91
|
+
slots: any;
|
|
170
92
|
modelValue: File | File[];
|
|
171
93
|
multiple: boolean;
|
|
172
94
|
drag: boolean;
|
|
@@ -50,89 +50,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
50
50
|
readonly default: true;
|
|
51
51
|
};
|
|
52
52
|
drag: BooleanConstructor;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
status: import("element-plus").UploadStatus;
|
|
58
|
-
size?: number;
|
|
59
|
-
response?: unknown;
|
|
60
|
-
uid: number;
|
|
61
|
-
url?: string;
|
|
62
|
-
raw?: {
|
|
63
|
-
uid: number;
|
|
64
|
-
isDirectory?: boolean;
|
|
65
|
-
readonly lastModified: number;
|
|
66
|
-
readonly name: string;
|
|
67
|
-
readonly webkitRelativePath: string;
|
|
68
|
-
readonly size: number;
|
|
69
|
-
readonly type: string;
|
|
70
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
71
|
-
bytes: () => Promise<Uint8Array>;
|
|
72
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
73
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
74
|
-
text: () => Promise<string>;
|
|
75
|
-
};
|
|
76
|
-
}[], import("element-plus").UploadFile[] | {
|
|
77
|
-
name: string;
|
|
78
|
-
percentage?: number;
|
|
79
|
-
status: import("element-plus").UploadStatus;
|
|
80
|
-
size?: number;
|
|
81
|
-
response?: unknown;
|
|
82
|
-
uid: number;
|
|
83
|
-
url?: string;
|
|
84
|
-
raw?: {
|
|
85
|
-
uid: number;
|
|
86
|
-
isDirectory?: boolean;
|
|
87
|
-
readonly lastModified: number;
|
|
88
|
-
readonly name: string;
|
|
89
|
-
readonly webkitRelativePath: string;
|
|
90
|
-
readonly size: number;
|
|
91
|
-
readonly type: string;
|
|
92
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
93
|
-
bytes: () => Promise<Uint8Array>;
|
|
94
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
95
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
96
|
-
text: () => Promise<string>;
|
|
97
|
-
};
|
|
98
|
-
}[]>;
|
|
99
|
-
uploadProps: import("vue").ComputedRef<{
|
|
100
|
-
fileList: {
|
|
101
|
-
name: string;
|
|
102
|
-
percentage?: number;
|
|
103
|
-
status: import("element-plus").UploadStatus;
|
|
104
|
-
size?: number;
|
|
105
|
-
response?: unknown;
|
|
106
|
-
uid: number;
|
|
107
|
-
url?: string;
|
|
108
|
-
raw?: {
|
|
109
|
-
uid: number;
|
|
110
|
-
isDirectory?: boolean;
|
|
111
|
-
readonly lastModified: number;
|
|
112
|
-
readonly name: string;
|
|
113
|
-
readonly webkitRelativePath: string;
|
|
114
|
-
readonly size: number;
|
|
115
|
-
readonly type: string;
|
|
116
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
117
|
-
bytes: () => Promise<Uint8Array>;
|
|
118
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
119
|
-
stream: () => ReadableStream<Uint8Array>;
|
|
120
|
-
text: () => Promise<string>;
|
|
121
|
-
};
|
|
122
|
-
}[];
|
|
123
|
-
multiple: boolean;
|
|
124
|
-
accept: string;
|
|
125
|
-
disabled: boolean;
|
|
126
|
-
limit: number;
|
|
127
|
-
listType: "text" | "picture" | "picture-card";
|
|
128
|
-
tip: string;
|
|
129
|
-
showFileList: boolean;
|
|
130
|
-
drag: boolean;
|
|
131
|
-
autoUpload: boolean;
|
|
132
|
-
action: string;
|
|
133
|
-
}>;
|
|
134
|
-
handleFileListChange: (newFileList: import("element-plus").UploadFile[]) => void;
|
|
135
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
slots: any;
|
|
54
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
136
57
|
'update:modelValue': any;
|
|
137
58
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
138
59
|
modelValue: {
|
|
@@ -174,10 +95,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
174
95
|
readonly default: true;
|
|
175
96
|
};
|
|
176
97
|
drag: BooleanConstructor;
|
|
98
|
+
slots: any;
|
|
177
99
|
}>> & Readonly<{
|
|
178
100
|
"onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
|
|
179
101
|
}>, {
|
|
180
102
|
disabled: boolean;
|
|
103
|
+
slots: any;
|
|
181
104
|
modelValue: File | File[];
|
|
182
105
|
multiple: boolean;
|
|
183
106
|
drag: boolean;
|
|
@@ -116,7 +116,6 @@ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
116
116
|
var Options = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$2, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/select/src/options.vue"]]);
|
|
117
117
|
|
|
118
118
|
var _sfc_main$1 = vue.defineComponent({
|
|
119
|
-
name: "VkfSelect",
|
|
120
119
|
components: {
|
|
121
120
|
VkfFormItem: formItem.VkfFormItem,
|
|
122
121
|
ElSelect: elementPlus$1.ElSelect,
|
|
@@ -258,6 +257,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
258
257
|
var Core = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/select/src/core.vue"]]);
|
|
259
258
|
|
|
260
259
|
var _sfc_main = vue.defineComponent({
|
|
260
|
+
name: "VkfSelect",
|
|
261
261
|
props,
|
|
262
262
|
emits,
|
|
263
263
|
setup(props2, { emit, slots }) {
|
|
@@ -112,7 +112,6 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
112
112
|
var Options = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/select/src/options.vue"]]);
|
|
113
113
|
|
|
114
114
|
var _sfc_main$1 = defineComponent({
|
|
115
|
-
name: "VkfSelect",
|
|
116
115
|
components: {
|
|
117
116
|
VkfFormItem,
|
|
118
117
|
ElSelect,
|
|
@@ -254,6 +253,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254
253
|
var Core = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/select/src/core.vue"]]);
|
|
255
254
|
|
|
256
255
|
var _sfc_main = defineComponent({
|
|
256
|
+
name: "VkfSelect",
|
|
257
257
|
props,
|
|
258
258
|
emits,
|
|
259
259
|
setup(props2, { emit, slots }) {
|