vft 0.0.280 → 0.0.282
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/es/components/super-form/super-form.vue2.js +63 -61
- package/es/components/upload/index.d.ts +129 -0
- package/es/components/upload/upload.vue.d.ts +43 -0
- package/es/components/upload/upload.vue2.js +25 -24
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +129 -0
- package/lib/components/upload/upload.vue.d.ts +43 -0
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -96,6 +96,49 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
96
96
|
clearFiles: (states?: import("./types").UploadStatus[]) => void;
|
|
97
97
|
handleStart: (rawFile: import("./types").UploadRawFile) => void;
|
|
98
98
|
handleRemove: (file: import("./types").UploadFile | import("./types").UploadRawFile, rawFile?: import("./types").UploadRawFile) => void;
|
|
99
|
+
fileList: import("vue").Ref<{
|
|
100
|
+
name: string;
|
|
101
|
+
percentage?: number | undefined;
|
|
102
|
+
status: import("./types").UploadStatus;
|
|
103
|
+
size?: number | undefined;
|
|
104
|
+
response?: unknown;
|
|
105
|
+
uid: number;
|
|
106
|
+
url?: string | undefined;
|
|
107
|
+
raw?: {
|
|
108
|
+
uid: number;
|
|
109
|
+
readonly lastModified: number;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly webkitRelativePath: string;
|
|
112
|
+
readonly size: number;
|
|
113
|
+
readonly type: string;
|
|
114
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
115
|
+
bytes: () => Promise<Uint8Array>;
|
|
116
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
117
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
118
|
+
text: () => Promise<string>;
|
|
119
|
+
} | undefined;
|
|
120
|
+
}[], {
|
|
121
|
+
name: string;
|
|
122
|
+
percentage?: number | undefined;
|
|
123
|
+
status: import("./types").UploadStatus;
|
|
124
|
+
size?: number | undefined;
|
|
125
|
+
response?: unknown;
|
|
126
|
+
uid: number;
|
|
127
|
+
url?: string | undefined;
|
|
128
|
+
raw?: {
|
|
129
|
+
uid: number;
|
|
130
|
+
readonly lastModified: number;
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly webkitRelativePath: string;
|
|
133
|
+
readonly size: number;
|
|
134
|
+
readonly type: string;
|
|
135
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
136
|
+
bytes: () => Promise<Uint8Array>;
|
|
137
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
138
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
139
|
+
text: () => Promise<string>;
|
|
140
|
+
} | undefined;
|
|
141
|
+
}[]>;
|
|
99
142
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
100
143
|
drag: boolean;
|
|
101
144
|
name: string;
|
|
@@ -213,6 +256,49 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
213
256
|
clearFiles: (states?: import("./types").UploadStatus[]) => void;
|
|
214
257
|
handleStart: (rawFile: import("./types").UploadRawFile) => void;
|
|
215
258
|
handleRemove: (file: import("./types").UploadFile | import("./types").UploadRawFile, rawFile?: import("./types").UploadRawFile) => void;
|
|
259
|
+
fileList: import("vue").Ref<{
|
|
260
|
+
name: string;
|
|
261
|
+
percentage?: number | undefined;
|
|
262
|
+
status: import("./types").UploadStatus;
|
|
263
|
+
size?: number | undefined;
|
|
264
|
+
response?: unknown;
|
|
265
|
+
uid: number;
|
|
266
|
+
url?: string | undefined;
|
|
267
|
+
raw?: {
|
|
268
|
+
uid: number;
|
|
269
|
+
readonly lastModified: number;
|
|
270
|
+
readonly name: string;
|
|
271
|
+
readonly webkitRelativePath: string;
|
|
272
|
+
readonly size: number;
|
|
273
|
+
readonly type: string;
|
|
274
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
275
|
+
bytes: () => Promise<Uint8Array>;
|
|
276
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
277
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
278
|
+
text: () => Promise<string>;
|
|
279
|
+
} | undefined;
|
|
280
|
+
}[], {
|
|
281
|
+
name: string;
|
|
282
|
+
percentage?: number | undefined;
|
|
283
|
+
status: import("./types").UploadStatus;
|
|
284
|
+
size?: number | undefined;
|
|
285
|
+
response?: unknown;
|
|
286
|
+
uid: number;
|
|
287
|
+
url?: string | undefined;
|
|
288
|
+
raw?: {
|
|
289
|
+
uid: number;
|
|
290
|
+
readonly lastModified: number;
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly webkitRelativePath: string;
|
|
293
|
+
readonly size: number;
|
|
294
|
+
readonly type: string;
|
|
295
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
296
|
+
bytes: () => Promise<Uint8Array>;
|
|
297
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
298
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
299
|
+
text: () => Promise<string>;
|
|
300
|
+
} | undefined;
|
|
301
|
+
}[]>;
|
|
216
302
|
}, {}, {}, {}, {
|
|
217
303
|
drag: boolean;
|
|
218
304
|
name: string;
|
|
@@ -327,6 +413,49 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
327
413
|
clearFiles: (states?: import("./types").UploadStatus[]) => void;
|
|
328
414
|
handleStart: (rawFile: import("./types").UploadRawFile) => void;
|
|
329
415
|
handleRemove: (file: import("./types").UploadFile | import("./types").UploadRawFile, rawFile?: import("./types").UploadRawFile) => void;
|
|
416
|
+
fileList: import("vue").Ref<{
|
|
417
|
+
name: string;
|
|
418
|
+
percentage?: number | undefined;
|
|
419
|
+
status: import("./types").UploadStatus;
|
|
420
|
+
size?: number | undefined;
|
|
421
|
+
response?: unknown;
|
|
422
|
+
uid: number;
|
|
423
|
+
url?: string | undefined;
|
|
424
|
+
raw?: {
|
|
425
|
+
uid: number;
|
|
426
|
+
readonly lastModified: number;
|
|
427
|
+
readonly name: string;
|
|
428
|
+
readonly webkitRelativePath: string;
|
|
429
|
+
readonly size: number;
|
|
430
|
+
readonly type: string;
|
|
431
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
432
|
+
bytes: () => Promise<Uint8Array>;
|
|
433
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
434
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
435
|
+
text: () => Promise<string>;
|
|
436
|
+
} | undefined;
|
|
437
|
+
}[], {
|
|
438
|
+
name: string;
|
|
439
|
+
percentage?: number | undefined;
|
|
440
|
+
status: import("./types").UploadStatus;
|
|
441
|
+
size?: number | undefined;
|
|
442
|
+
response?: unknown;
|
|
443
|
+
uid: number;
|
|
444
|
+
url?: string | undefined;
|
|
445
|
+
raw?: {
|
|
446
|
+
uid: number;
|
|
447
|
+
readonly lastModified: number;
|
|
448
|
+
readonly name: string;
|
|
449
|
+
readonly webkitRelativePath: string;
|
|
450
|
+
readonly size: number;
|
|
451
|
+
readonly type: string;
|
|
452
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
453
|
+
bytes: () => Promise<Uint8Array>;
|
|
454
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
455
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
456
|
+
text: () => Promise<string>;
|
|
457
|
+
} | undefined;
|
|
458
|
+
}[]>;
|
|
330
459
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
331
460
|
drag: boolean;
|
|
332
461
|
name: string;
|
|
@@ -26,6 +26,49 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
26
26
|
clearFiles: (states?: import("./types").UploadStatus[]) => void;
|
|
27
27
|
handleStart: (rawFile: import("./types").UploadRawFile) => void;
|
|
28
28
|
handleRemove: (file: import("./types").UploadFile | import("./types").UploadRawFile, rawFile?: import("./types").UploadRawFile) => void;
|
|
29
|
+
fileList: import("vue").Ref<{
|
|
30
|
+
name: string;
|
|
31
|
+
percentage?: number | undefined;
|
|
32
|
+
status: import("./types").UploadStatus;
|
|
33
|
+
size?: number | undefined;
|
|
34
|
+
response?: unknown;
|
|
35
|
+
uid: number;
|
|
36
|
+
url?: string | undefined;
|
|
37
|
+
raw?: {
|
|
38
|
+
uid: number;
|
|
39
|
+
readonly lastModified: number;
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly webkitRelativePath: string;
|
|
42
|
+
readonly size: number;
|
|
43
|
+
readonly type: string;
|
|
44
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
45
|
+
bytes: () => Promise<Uint8Array>;
|
|
46
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
47
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
48
|
+
text: () => Promise<string>;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}[], {
|
|
51
|
+
name: string;
|
|
52
|
+
percentage?: number | undefined;
|
|
53
|
+
status: import("./types").UploadStatus;
|
|
54
|
+
size?: number | undefined;
|
|
55
|
+
response?: unknown;
|
|
56
|
+
uid: number;
|
|
57
|
+
url?: string | undefined;
|
|
58
|
+
raw?: {
|
|
59
|
+
uid: number;
|
|
60
|
+
readonly lastModified: number;
|
|
61
|
+
readonly name: string;
|
|
62
|
+
readonly webkitRelativePath: string;
|
|
63
|
+
readonly size: number;
|
|
64
|
+
readonly type: string;
|
|
65
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
66
|
+
bytes: () => Promise<Uint8Array>;
|
|
67
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
68
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
69
|
+
text: () => Promise<string>;
|
|
70
|
+
} | undefined;
|
|
71
|
+
}[]>;
|
|
29
72
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<UploadProps>, {
|
|
30
73
|
action: string;
|
|
31
74
|
method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const S=require("./ajax.cjs"),b=require("./constants.cjs"),p=require("./upload-content.vue2.cjs"),c=require("./upload-list.vue2.cjs"),R=require("./use-handlers.cjs"),B=require("../form/hooks/use-form-common-props.cjs"),P=e.defineComponent({name:"vft-upload"}),_=e.defineComponent({...P,props:{action:{default:"#"},headers:{},method:{default:"post"},data:{},multiple:{type:Boolean,default:!1},name:{default:"file"},drag:{type:Boolean,default:!1},withCredentials:{type:Boolean},showFileList:{type:Boolean,default:!0},accept:{default:""},type:{default:"select"},fileList:{default:[]},autoUpload:{type:Boolean,default:!1},listType:{default:"text"},httpRequest:{type:Function,default:S.ajaxUpload},disabled:{type:Boolean},limit:{},beforeUpload:{},beforeRemove:{},onRemove:{},onChange:{},onPreview:{},onSuccess:{},onProgress:{},onError:{},onExceed:{}},setup(m,{expose:v}){const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const S=require("./ajax.cjs"),b=require("./constants.cjs"),p=require("./upload-content.vue2.cjs"),c=require("./upload-list.vue2.cjs"),R=require("./use-handlers.cjs"),B=require("../form/hooks/use-form-common-props.cjs"),P=e.defineComponent({name:"vft-upload"}),_=e.defineComponent({...P,props:{action:{default:"#"},headers:{},method:{default:"post"},data:{},multiple:{type:Boolean,default:!1},name:{default:"file"},drag:{type:Boolean,default:!1},withCredentials:{type:Boolean},showFileList:{type:Boolean,default:!0},accept:{default:""},type:{default:"select"},fileList:{default:[]},autoUpload:{type:Boolean,default:!1},listType:{default:"text"},httpRequest:{type:Function,default:S.ajaxUpload},disabled:{type:Boolean},limit:{},beforeUpload:{},beforeRemove:{},onRemove:{},onChange:{},onPreview:{},onSuccess:{},onProgress:{},onError:{},onExceed:{}},setup(m,{expose:v}){const l=m,o=e.useSlots(),d=B.useFormDisabled(),n=e.shallowRef(),{abort:y,submit:h,clearFiles:g,uploadFiles:r,handleStart:i,handleError:C,handleRemove:s,handleSuccess:k,handleProgress:w}=R.useHandlers(l,n),a=e.computed(()=>l.listType==="picture-card"),f=e.computed(()=>({...l,fileList:r.value,onStart:i,onProgress:w,onSuccess:k,onError:C,onRemove:s}));return e.onBeforeUnmount(()=>{r.value.forEach(({url:t})=>{t?.startsWith("blob:")&&URL.revokeObjectURL(t)})}),e.provide(b.uploadContextKey,{accept:e.toRef(l,"accept")}),v({abort:y,submit:h,clearFiles:g,handleStart:i,handleRemove:s,fileList:r}),(t,$)=>(e.openBlock(),e.createElementBlock("div",null,[a.value&&t.showFileList?(e.openBlock(),e.createBlock(c.default,{key:0,disabled:e.unref(d),"list-type":t.listType,files:e.unref(r),"handle-preview":t.onPreview,onRemove:e.unref(s)},e.createSlots({append:e.withCtx(()=>[e.createVNode(p.default,e.mergeProps({ref_key:"uploadRef",ref:n},f.value),{default:e.withCtx(()=>[e.unref(o).trigger?e.renderSlot(t.$slots,"trigger",{key:0}):e.createCommentVNode("",!0),!e.unref(o).trigger&&e.unref(o).default?e.renderSlot(t.$slots,"default",{key:1}):e.createCommentVNode("",!0)]),_:3},16)]),_:2},[t.$slots.file?{name:"default",fn:e.withCtx(({file:u})=>[e.renderSlot(t.$slots,"file",{file:u})]),key:"0"}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):e.createCommentVNode("",!0),!a.value||a.value&&!t.showFileList?(e.openBlock(),e.createBlock(p.default,e.mergeProps({key:1,ref_key:"uploadRef",ref:n},f.value),{default:e.withCtx(()=>[e.unref(o).trigger?e.renderSlot(t.$slots,"trigger",{key:0}):e.createCommentVNode("",!0),!e.unref(o).trigger&&e.unref(o).default?e.renderSlot(t.$slots,"default",{key:1}):e.createCommentVNode("",!0)]),_:3},16)):e.createCommentVNode("",!0),t.$slots.trigger?e.renderSlot(t.$slots,"default",{key:2}):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"tip"),!a.value&&t.showFileList?(e.openBlock(),e.createBlock(c.default,{key:3,disabled:e.unref(d),"list-type":t.listType,files:e.unref(r),"handle-preview":t.onPreview,onRemove:e.unref(s)},e.createSlots({_:2},[t.$slots.file?{name:"default",fn:e.withCtx(({file:u})=>[e.renderSlot(t.$slots,"file",{file:u})]),key:"0"}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):e.createCommentVNode("",!0)]))}});exports.default=_;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.282";exports.version=e;
|
package/lib/package.json.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.282",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"sortablejs": "1.15.0",
|
|
57
57
|
"@vft/constants": "0.0.71",
|
|
58
58
|
"@vft/router": "0.0.57",
|
|
59
|
-
"@vft/use": "0.0.54",
|
|
60
59
|
"@vft/store": "0.0.44",
|
|
60
|
+
"@vft/use": "0.0.54",
|
|
61
61
|
"@vft/utils": "0.0.114",
|
|
62
62
|
"@vft/directives": "0.0.30"
|
|
63
63
|
},
|