@vunk/form 1.1.11 → 1.1.13
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/form/index.js +112 -21
- package/components/form/src/ctx.d.ts +27 -1
- package/components/form/src/ctx.js +12 -0
- package/components/form/src/index.vue.d.ts +30 -0
- package/components/form/src/types.d.ts +12 -2
- package/components/form/src/utils.d.ts +15 -0
- package/components/form/src/utils.js +55 -0
- package/components/geoinput/src/ctx.d.ts +1 -1
- package/components/geoinput/src/index.vue.d.ts +3 -3
- package/components/geoinput-read/index.js +10 -4
- package/components/geoinput-read/src/core.vue.d.ts +15 -15
- package/components/geoinput-read/src/ctx.d.ts +3 -3
- package/components/geoinput-read/src/ctx.js +6 -2
- package/components/geoinput-read/src/index.vue.d.ts +17 -17
- package/components/upload-plus/index.css +85 -0
- package/components/upload-plus/index.d.ts +6 -0
- package/components/upload-plus/index.js +485 -0
- package/components/upload-plus/src/api.d.ts +31 -0
- package/components/upload-plus/src/api.js +65 -0
- package/components/upload-plus/src/const.d.ts +7 -0
- package/components/upload-plus/src/const.js +10 -0
- package/components/upload-plus/src/ctx.d.ts +59 -0
- package/components/upload-plus/src/ctx.js +34 -0
- package/components/upload-plus/src/index.vue.d.ts +163 -0
- package/components/upload-plus/src/types.d.ts +24 -0
- package/components/upload-plus/src/types.js +1 -0
- package/index.css +86 -0
- package/package.json +1 -1
- package/shared/types/form/checkbox.d.ts +1 -1
- package/shared/types/source/index.d.ts +6 -0
- package/shared/upload/index.d.ts +7 -0
- package/shared/upload/index.js +767 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RestFetch } from '@vunk/core/shared/utils-fetch';
|
|
2
|
+
import { Chunk } from './types';
|
|
3
|
+
export declare const restFetch: RestFetch;
|
|
4
|
+
/**
|
|
5
|
+
* https://app.apifox.com/link/project/2335162/apis/api-92811427
|
|
6
|
+
* @param data
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const verify: (params: {
|
|
10
|
+
identifier: string;
|
|
11
|
+
}) => Promise<string[]>;
|
|
12
|
+
/**
|
|
13
|
+
* https://app.apifox.com/link/project/2335162/apis/api-92025462
|
|
14
|
+
* @param data
|
|
15
|
+
* @param init
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare const upload: (data: Chunk, init?: {
|
|
19
|
+
onprogress?: XMLHttpRequestEventTarget['onprogress'];
|
|
20
|
+
xhrs?: XMLHttpRequest[];
|
|
21
|
+
}) => Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* https://app.apifox.com/link/project/2335162/apis/api-92729706
|
|
24
|
+
* @param data
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare const merge: (data: {
|
|
28
|
+
identifier: string;
|
|
29
|
+
filename: string;
|
|
30
|
+
dictId?: string;
|
|
31
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { RestFetch } from '@vunk/core/shared/utils-fetch';
|
|
2
|
+
|
|
3
|
+
const restFetch = new RestFetch({
|
|
4
|
+
baseURL: "http://192.168.110.209:36800"
|
|
5
|
+
});
|
|
6
|
+
const verify = async (params) => {
|
|
7
|
+
return restFetch.request({
|
|
8
|
+
method: "GET",
|
|
9
|
+
url: "/dict/hdfs/getChunkList",
|
|
10
|
+
params
|
|
11
|
+
}).then((res) => {
|
|
12
|
+
return res.data.map((item) => item.identifier);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const upload = async (data, init) => {
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const xhr = new XMLHttpRequest();
|
|
19
|
+
xhr.upload.onprogress = (init == null ? void 0 : init.onprogress) || null;
|
|
20
|
+
xhr.open("post", restFetch.baseURL + "/dict/hdfs/chunk/upload");
|
|
21
|
+
const form = new FormData();
|
|
22
|
+
form.append("file", data.chunk);
|
|
23
|
+
form.append("identifier", data.fileHash);
|
|
24
|
+
form.append("filename", data.fileName);
|
|
25
|
+
form.append("chunkNumber", data.index + 1 + "");
|
|
26
|
+
form.append("chunkIdentifier", data.hash + "");
|
|
27
|
+
form.append("totalChunk", data.chunksLength + "");
|
|
28
|
+
form.append("chunkSize", data.sliceSize + "");
|
|
29
|
+
form.append("currentChunkSize", data.chunk.size + "");
|
|
30
|
+
form.append("totalSize", data.fileSize + "");
|
|
31
|
+
xhr.send(form);
|
|
32
|
+
xhr.onreadystatechange = (e) => {
|
|
33
|
+
const target = e.target;
|
|
34
|
+
if (xhr.readyState === 4) {
|
|
35
|
+
if (xhr.status === 200) {
|
|
36
|
+
if (init == null ? void 0 : init.xhrs) {
|
|
37
|
+
const i = init.xhrs.findIndex((req) => req === xhr);
|
|
38
|
+
init.xhrs.splice(i, 1);
|
|
39
|
+
}
|
|
40
|
+
resolve({
|
|
41
|
+
data: target.response
|
|
42
|
+
});
|
|
43
|
+
} else if (xhr.status === 500) {
|
|
44
|
+
reject(target.response);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
xhr.timeout = 5 * 1e3;
|
|
49
|
+
xhr.ontimeout = (e) => {
|
|
50
|
+
reject(e);
|
|
51
|
+
};
|
|
52
|
+
(_a = init == null ? void 0 : init.xhrs) == null ? void 0 : _a.push(xhr);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const merge = async (data) => {
|
|
56
|
+
return restFetch.request({
|
|
57
|
+
method: "POST",
|
|
58
|
+
url: "/dict/hdfs/chunk/merge",
|
|
59
|
+
data
|
|
60
|
+
}).then((res) => {
|
|
61
|
+
return res.datas;
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { merge, restFetch, upload, verify };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const props: {
|
|
2
|
+
size: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* 上传目录
|
|
8
|
+
*/
|
|
9
|
+
dictId: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
14
|
+
label: StringConstructor;
|
|
15
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
16
|
+
prop: {
|
|
17
|
+
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>>;
|
|
18
|
+
readonly required: false;
|
|
19
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
20
|
+
__epPropKey: true;
|
|
21
|
+
};
|
|
22
|
+
rules: {
|
|
23
|
+
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>>;
|
|
24
|
+
readonly required: false;
|
|
25
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
26
|
+
__epPropKey: true;
|
|
27
|
+
};
|
|
28
|
+
error: StringConstructor;
|
|
29
|
+
validateStatus: {
|
|
30
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
31
|
+
readonly required: false;
|
|
32
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
33
|
+
__epPropKey: true;
|
|
34
|
+
};
|
|
35
|
+
for: StringConstructor;
|
|
36
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
37
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
38
|
+
formItemSize: {
|
|
39
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
formItemSlots: {
|
|
43
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
elRef: {
|
|
47
|
+
type: import("vue").PropType<any>;
|
|
48
|
+
required: boolean;
|
|
49
|
+
};
|
|
50
|
+
inline: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
readonly: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const emits: {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { _VkfFormItemCtx } from '@vunk/form/components/form-item';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
const props = __spreadProps(__spreadValues({}, _VkfFormItemCtx.props), {
|
|
23
|
+
size: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 1024 / (16 * 16) * 1024 * 1024
|
|
26
|
+
},
|
|
27
|
+
dictId: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const emits = {};
|
|
33
|
+
|
|
34
|
+
export { emits, props };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Status } from './const';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
size: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
dictId: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
12
|
+
label: StringConstructor;
|
|
13
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
14
|
+
prop: {
|
|
15
|
+
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>>;
|
|
16
|
+
readonly required: false;
|
|
17
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
18
|
+
__epPropKey: true;
|
|
19
|
+
};
|
|
20
|
+
rules: {
|
|
21
|
+
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>>;
|
|
22
|
+
readonly required: false;
|
|
23
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
24
|
+
__epPropKey: true;
|
|
25
|
+
};
|
|
26
|
+
error: StringConstructor;
|
|
27
|
+
validateStatus: {
|
|
28
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
29
|
+
readonly required: false;
|
|
30
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
31
|
+
__epPropKey: true;
|
|
32
|
+
};
|
|
33
|
+
for: StringConstructor;
|
|
34
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
35
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
36
|
+
formItemSize: {
|
|
37
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
formItemSlots: {
|
|
41
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
42
|
+
default: undefined;
|
|
43
|
+
};
|
|
44
|
+
elRef: {
|
|
45
|
+
type: import("vue").PropType<any>;
|
|
46
|
+
required: boolean;
|
|
47
|
+
};
|
|
48
|
+
inline: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
readonly: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
56
|
+
}, {
|
|
57
|
+
formItemBindProps: import("vue").ComputedRef<{
|
|
58
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
59
|
+
label: string | undefined;
|
|
60
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
61
|
+
prop: 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> | undefined;
|
|
62
|
+
rules: 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> | undefined;
|
|
63
|
+
error: string | undefined;
|
|
64
|
+
validateStatus: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown> | undefined;
|
|
65
|
+
for: string | undefined;
|
|
66
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
67
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
68
|
+
formItemSize: "default" | "small" | "large";
|
|
69
|
+
formItemSlots: import("../../form-item/src/types").FormItemSlots | undefined;
|
|
70
|
+
elRef: any;
|
|
71
|
+
inline: boolean;
|
|
72
|
+
readonly: boolean | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
handleFileChange: (e: Event) => void;
|
|
75
|
+
uuid: string;
|
|
76
|
+
container: {
|
|
77
|
+
file?: File | undefined;
|
|
78
|
+
hash?: string | undefined;
|
|
79
|
+
};
|
|
80
|
+
handleUpload: () => Promise<void>;
|
|
81
|
+
fileStatus: import("vue").Ref<Status>;
|
|
82
|
+
chunks: import("vue").Ref<{
|
|
83
|
+
fileName: string;
|
|
84
|
+
fileHash: string;
|
|
85
|
+
fileSize: number;
|
|
86
|
+
chunk: Blob;
|
|
87
|
+
hash: string;
|
|
88
|
+
chunksLength: number;
|
|
89
|
+
index: number;
|
|
90
|
+
progress: number;
|
|
91
|
+
sliceSize: number;
|
|
92
|
+
status: Status;
|
|
93
|
+
}[]>;
|
|
94
|
+
Status: typeof Status;
|
|
95
|
+
filePrefixIcon: import("vue").ComputedRef<import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
96
|
+
handlePause: () => void;
|
|
97
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
98
|
+
size: {
|
|
99
|
+
type: NumberConstructor;
|
|
100
|
+
default: number;
|
|
101
|
+
};
|
|
102
|
+
dictId: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
107
|
+
label: StringConstructor;
|
|
108
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
109
|
+
prop: {
|
|
110
|
+
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>>;
|
|
111
|
+
readonly required: false;
|
|
112
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
113
|
+
__epPropKey: true;
|
|
114
|
+
};
|
|
115
|
+
rules: {
|
|
116
|
+
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>>;
|
|
117
|
+
readonly required: false;
|
|
118
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
119
|
+
__epPropKey: true;
|
|
120
|
+
};
|
|
121
|
+
error: StringConstructor;
|
|
122
|
+
validateStatus: {
|
|
123
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
124
|
+
readonly required: false;
|
|
125
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
126
|
+
__epPropKey: true;
|
|
127
|
+
};
|
|
128
|
+
for: StringConstructor;
|
|
129
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
130
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
131
|
+
formItemSize: {
|
|
132
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
133
|
+
default: string;
|
|
134
|
+
};
|
|
135
|
+
formItemSlots: {
|
|
136
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
137
|
+
default: undefined;
|
|
138
|
+
};
|
|
139
|
+
elRef: {
|
|
140
|
+
type: import("vue").PropType<any>;
|
|
141
|
+
required: boolean;
|
|
142
|
+
};
|
|
143
|
+
inline: {
|
|
144
|
+
type: BooleanConstructor;
|
|
145
|
+
default: boolean;
|
|
146
|
+
};
|
|
147
|
+
readonly: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
151
|
+
}>>, {
|
|
152
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
153
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
154
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
155
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
156
|
+
size: number;
|
|
157
|
+
formItemSize: "default" | "small" | "large";
|
|
158
|
+
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
159
|
+
inline: boolean;
|
|
160
|
+
readonly: boolean;
|
|
161
|
+
dictId: string;
|
|
162
|
+
}>;
|
|
163
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Status } from './const';
|
|
2
|
+
export interface FileContainer {
|
|
3
|
+
file?: File;
|
|
4
|
+
hash?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Chunk {
|
|
7
|
+
fileName: string;
|
|
8
|
+
fileHash: string;
|
|
9
|
+
fileSize: number;
|
|
10
|
+
/**
|
|
11
|
+
* 当前块的文件
|
|
12
|
+
*/
|
|
13
|
+
chunk: Blob;
|
|
14
|
+
hash: string;
|
|
15
|
+
chunksLength: number;
|
|
16
|
+
index: number;
|
|
17
|
+
progress: number;
|
|
18
|
+
/**
|
|
19
|
+
* 分割大小
|
|
20
|
+
*/
|
|
21
|
+
sliceSize: number;
|
|
22
|
+
status: Status;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/index.css
CHANGED
|
@@ -216,6 +216,92 @@
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
|
|
219
|
+
@keyframes hide {
|
|
220
|
+
0% {
|
|
221
|
+
opacity: 1; /* 初始状态为完全显示 */
|
|
222
|
+
}
|
|
223
|
+
100% {
|
|
224
|
+
opacity: 0; /* 最终状态为完全隐藏 */
|
|
225
|
+
display: none; /* 同时隐藏元素 */
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.vkf-upload-plus{
|
|
230
|
+
--vkf-upload-plus-height: 34px;
|
|
231
|
+
}
|
|
232
|
+
.vkf-upload-plus-label{
|
|
233
|
+
position: relative;
|
|
234
|
+
}
|
|
235
|
+
.vkf-upload-plus-cube-x,
|
|
236
|
+
.vkf-upload-plus-msg-x
|
|
237
|
+
{
|
|
238
|
+
position: absolute;
|
|
239
|
+
top: 0;
|
|
240
|
+
left: 0;
|
|
241
|
+
bottom: 0;
|
|
242
|
+
right: 0;
|
|
243
|
+
}
|
|
244
|
+
.vkf-upload-plus-msg-x{
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
color: var(--el-color-success);
|
|
249
|
+
background: var(--el-bg-color);
|
|
250
|
+
animation-name: hide; /* 指定使用hide关键帧动画 */
|
|
251
|
+
animation-duration: 1s; /* 动画持续时间为2秒 */
|
|
252
|
+
animation-delay: 1s; /* 延迟2秒后开始动画 */
|
|
253
|
+
animation-fill-mode: forwards; /* 动画结束后保持最后一帧的状态 */
|
|
254
|
+
}
|
|
255
|
+
.vkf-upload-plus-msg{
|
|
256
|
+
margin-left: 2px;
|
|
257
|
+
}
|
|
258
|
+
.vkf-upload-plus-cube {
|
|
259
|
+
float: left;
|
|
260
|
+
height: 100%;
|
|
261
|
+
}
|
|
262
|
+
.vkf-upload-plus-cube.error {
|
|
263
|
+
background: var(--el-color-danger);
|
|
264
|
+
}
|
|
265
|
+
.vkf-upload-plus-cube .success{
|
|
266
|
+
background: var(--el-color-success);
|
|
267
|
+
}
|
|
268
|
+
.vkf-upload-plus-cube .uploading{
|
|
269
|
+
background: var(--el-color-primary);
|
|
270
|
+
}
|
|
271
|
+
.vkf-upload-plus-cube .error{
|
|
272
|
+
background: var(--el-color-danger);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.vkf-upload-plus-btng >.el-button:first-child{
|
|
276
|
+
border-radius: 0;
|
|
277
|
+
}
|
|
278
|
+
.vkf-upload-plus-btng >.el-button{
|
|
279
|
+
height: var(--vkf-upload-plus-height);
|
|
280
|
+
}
|
|
281
|
+
.vkf-upload-plus-main{
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
border: var(--el-border);
|
|
285
|
+
border-radius: var(--el-border-radius-base);
|
|
286
|
+
}
|
|
287
|
+
.vkf-upload-plus-label{
|
|
288
|
+
cursor: pointer;
|
|
289
|
+
}
|
|
290
|
+
.vkf-upload-plus-label .el-input{
|
|
291
|
+
pointer-events: none;
|
|
292
|
+
--el-input-border-color: transparent;
|
|
293
|
+
}
|
|
294
|
+
.vkf-upload-plus-label .el-input.is-success .el-icon{
|
|
295
|
+
color: var(--el-color-success);
|
|
296
|
+
}
|
|
297
|
+
.vkf-upload-plus-label .el-input.is-error .el-icon{
|
|
298
|
+
color: var(--el-color-danger);
|
|
299
|
+
}
|
|
300
|
+
.vkf-upload-plus-input{
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
|
|
219
305
|
.vkf-van-cascader .el-select{
|
|
220
306
|
--el-readonly-cursor: pointer;
|
|
221
307
|
}
|
package/package.json
CHANGED
|
@@ -9,5 +9,11 @@ export interface BasicSource {
|
|
|
9
9
|
class?: any;
|
|
10
10
|
prop?: any;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated use __VkfTemplatesDefault.Source<P>
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { __VkfTemplatesDefault } from '@vunk/form/components/templates-default'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
12
18
|
export declare type FormItemRendererSource<P extends string = string> = __VkfTemplatesDefault.Source<P>;
|
|
13
19
|
export declare type AllTemplatesSource<P extends string = string> = __VkfTemplatesDefault.Source<P> | __VkfTemplatesMapbox.Source<P> | __VkfTemplatesLayout.ElRowSource<AllTemplatesSource<P>> | __VkfTemplatesLayout.ElColSource<AllTemplatesSource<P>> | __VkfTemplatesLayout.VkfFlexSource<AllTemplatesSource<P>> | __VkfTemplatesElementPlus.Source;
|