@vtj/ui 0.8.83 → 0.8.86
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/dist/index.mjs +5610 -5649
- package/dist/index.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/types/components/attachment/Attachment.d.ts +16 -0
- package/types/components/attachment/props.d.ts +13 -0
- package/types/components/index.d.ts +1 -1
- package/types/components/qr-code/QrCode.d.ts +46 -0
- package/types/components/qr-code/index.d.ts +4 -0
- package/types/components/qr-code/types.d.ts +31 -0
- package/types/version.d.ts +2 -2
- package/types/components/qrcode/Qrcode.d.ts +0 -102
- package/types/components/qrcode/index.d.ts +0 -4
- package/types/components/qrcode/types.d.ts +0 -68
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.86",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=16.0.0"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"sortablejs": "~1.15.2",
|
|
13
13
|
"vxe-table": "~4.6.17",
|
|
14
14
|
"vxe-table-plugin-menus": "~4.0.3",
|
|
15
|
-
"@vtj/icons": "~0.8.
|
|
16
|
-
"@vtj/utils": "~0.8.
|
|
15
|
+
"@vtj/icons": "~0.8.86",
|
|
16
|
+
"@vtj/utils": "~0.8.86"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/qrcode": "^1.5.5",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"qrcode": "~1.5.3",
|
|
22
22
|
"vue": "~3.4.15",
|
|
23
23
|
"vue-router": "~4.4.0",
|
|
24
|
-
"@vtj/cli": "~0.8.
|
|
24
|
+
"@vtj/cli": "~0.8.21"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
@@ -62,6 +62,13 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
62
62
|
type: PropType<"card" | "list">;
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
|
+
beforeUpload: {
|
|
66
|
+
type: FunctionConstructor;
|
|
67
|
+
};
|
|
68
|
+
limitSize: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
65
72
|
}, {
|
|
66
73
|
elUploadRef: Ref<any>;
|
|
67
74
|
remove: (file: AttachmentFile) => Promise<void>;
|
|
@@ -141,6 +148,13 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
141
148
|
type: PropType<"card" | "list">;
|
|
142
149
|
default: string;
|
|
143
150
|
};
|
|
151
|
+
beforeUpload: {
|
|
152
|
+
type: FunctionConstructor;
|
|
153
|
+
};
|
|
154
|
+
limitSize: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
144
158
|
}>> & {
|
|
145
159
|
onClick?: ((file: AttachmentFile) => any) | undefined;
|
|
146
160
|
onChange?: ((files: AttachmentFile[]) => any) | undefined;
|
|
@@ -163,7 +177,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
163
177
|
selectable: boolean;
|
|
164
178
|
clickable: boolean;
|
|
165
179
|
listType: "card" | "list";
|
|
180
|
+
limitSize: string;
|
|
166
181
|
}, {}>, {
|
|
182
|
+
upload?(_: {}): any;
|
|
167
183
|
tip?(_: {}): any;
|
|
168
184
|
}>;
|
|
169
185
|
export default _default;
|
|
@@ -107,4 +107,17 @@ export declare const attachmentProps: {
|
|
|
107
107
|
type: PropType<"card" | "list">;
|
|
108
108
|
default: string;
|
|
109
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* 上传前守卫
|
|
112
|
+
*/
|
|
113
|
+
beforeUpload: {
|
|
114
|
+
type: FunctionConstructor;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* 允许上传的文件大写最大值, 支持 K / M
|
|
118
|
+
*/
|
|
119
|
+
limitSize: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
110
123
|
};
|
|
@@ -18,7 +18,7 @@ export * from './startup';
|
|
|
18
18
|
export * from './test';
|
|
19
19
|
export * from './input-unit';
|
|
20
20
|
export * from './image-code-input';
|
|
21
|
-
export * from './
|
|
21
|
+
export * from './qr-code';
|
|
22
22
|
export * from './sms-code-input';
|
|
23
23
|
export * from './attachment';
|
|
24
24
|
export * from './query-form';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { QrCodeProps } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QrCodeProps>, {
|
|
5
|
+
size: number;
|
|
6
|
+
tip: string;
|
|
7
|
+
}>, {
|
|
8
|
+
refresh: () => void;
|
|
9
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
10
|
+
expired: () => void;
|
|
11
|
+
draw: (value: string) => void;
|
|
12
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QrCodeProps>, {
|
|
13
|
+
size: number;
|
|
14
|
+
tip: string;
|
|
15
|
+
}>>> & {
|
|
16
|
+
onExpired?: (() => any) | undefined;
|
|
17
|
+
onDraw?: ((value: string) => any) | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
size: number;
|
|
20
|
+
tip: string;
|
|
21
|
+
}, {}>, {
|
|
22
|
+
tip?(_: {}): any;
|
|
23
|
+
}>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
+
} : {
|
|
30
|
+
type: PropType<T[K]>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
type __VLS_WithDefaults<P, D> = {
|
|
35
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
36
|
+
default: D[K];
|
|
37
|
+
}> : P[K];
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Prettify<T> = {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} & {};
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { QRCodeOptions } from 'qrcode';
|
|
2
|
+
import { MaybePromise } from '../shared';
|
|
3
|
+
|
|
4
|
+
export type QrCodeContentLoader = () => MaybePromise<string>;
|
|
5
|
+
export interface QrCodeProps {
|
|
6
|
+
/**
|
|
7
|
+
* 二维码尺寸
|
|
8
|
+
*/
|
|
9
|
+
size?: number;
|
|
10
|
+
/**
|
|
11
|
+
* 二维码内容
|
|
12
|
+
*/
|
|
13
|
+
content?: string | QrCodeContentLoader;
|
|
14
|
+
/**
|
|
15
|
+
* 过期时间
|
|
16
|
+
*/
|
|
17
|
+
expired?: number;
|
|
18
|
+
/**
|
|
19
|
+
* 提示文本
|
|
20
|
+
*/
|
|
21
|
+
tip?: string;
|
|
22
|
+
/**
|
|
23
|
+
* qrcode 配置参数
|
|
24
|
+
*/
|
|
25
|
+
options?: QRCodeOptions;
|
|
26
|
+
}
|
|
27
|
+
export type QrCodeEmits = {
|
|
28
|
+
draw: [value: string];
|
|
29
|
+
expired: [];
|
|
30
|
+
};
|
|
31
|
+
export {};
|
package/types/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/ui
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.8.
|
|
5
|
+
* @version 0.8.85
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
7
|
*/
|
|
8
|
-
export declare const version = "0.8.
|
|
8
|
+
export declare const version = "0.8.85";
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, PropType, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { QRCodeValue } from './types';
|
|
3
|
-
declare const _default: __VLS_WithTemplateSlots< DefineComponent<{
|
|
4
|
-
margin: {
|
|
5
|
-
type: NumberConstructor;
|
|
6
|
-
};
|
|
7
|
-
scale: {
|
|
8
|
-
type: NumberConstructor;
|
|
9
|
-
};
|
|
10
|
-
width: {
|
|
11
|
-
type: NumberConstructor;
|
|
12
|
-
default: number;
|
|
13
|
-
};
|
|
14
|
-
color: {
|
|
15
|
-
type: ObjectConstructor;
|
|
16
|
-
};
|
|
17
|
-
darkColor: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
lightColor: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
quality: {
|
|
26
|
-
type: NumberConstructor;
|
|
27
|
-
default: number;
|
|
28
|
-
};
|
|
29
|
-
value: {
|
|
30
|
-
type: PropType<QRCodeValue>;
|
|
31
|
-
default: string;
|
|
32
|
-
};
|
|
33
|
-
timeout: {
|
|
34
|
-
type: NumberConstructor;
|
|
35
|
-
default: number;
|
|
36
|
-
};
|
|
37
|
-
tip: {
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
}, {
|
|
42
|
-
qrcodeRef: Ref<any>;
|
|
43
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
44
|
-
refresh: () => void;
|
|
45
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
|
-
margin: {
|
|
47
|
-
type: NumberConstructor;
|
|
48
|
-
};
|
|
49
|
-
scale: {
|
|
50
|
-
type: NumberConstructor;
|
|
51
|
-
};
|
|
52
|
-
width: {
|
|
53
|
-
type: NumberConstructor;
|
|
54
|
-
default: number;
|
|
55
|
-
};
|
|
56
|
-
color: {
|
|
57
|
-
type: ObjectConstructor;
|
|
58
|
-
};
|
|
59
|
-
darkColor: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default: string;
|
|
62
|
-
};
|
|
63
|
-
lightColor: {
|
|
64
|
-
type: StringConstructor;
|
|
65
|
-
default: string;
|
|
66
|
-
};
|
|
67
|
-
quality: {
|
|
68
|
-
type: NumberConstructor;
|
|
69
|
-
default: number;
|
|
70
|
-
};
|
|
71
|
-
value: {
|
|
72
|
-
type: PropType<QRCodeValue>;
|
|
73
|
-
default: string;
|
|
74
|
-
};
|
|
75
|
-
timeout: {
|
|
76
|
-
type: NumberConstructor;
|
|
77
|
-
default: number;
|
|
78
|
-
};
|
|
79
|
-
tip: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
}>> & {
|
|
84
|
-
onRefresh?: (() => any) | undefined;
|
|
85
|
-
}, {
|
|
86
|
-
value: QRCodeValue;
|
|
87
|
-
width: number;
|
|
88
|
-
tip: string;
|
|
89
|
-
darkColor: string;
|
|
90
|
-
lightColor: string;
|
|
91
|
-
quality: number;
|
|
92
|
-
timeout: number;
|
|
93
|
-
}, {}>, {
|
|
94
|
-
logo?(_: {}): any;
|
|
95
|
-
tip?(_: {}): any;
|
|
96
|
-
}>;
|
|
97
|
-
export default _default;
|
|
98
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
99
|
-
new (): {
|
|
100
|
-
$slots: S;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { ComponentPropsType } from '../shared';
|
|
3
|
-
import { QRCodeToDataURLOptions, QRCodeToDataURLOptionsJpegWebp } from 'qrcode';
|
|
4
|
-
|
|
5
|
-
export type { QRCodeSegment } from 'qrcode';
|
|
6
|
-
export type QRCodeValue = string | (() => Promise<string>);
|
|
7
|
-
export declare const TYPES: readonly ["image/png", "image/jpeg", "image/webp"];
|
|
8
|
-
export type QRCodeProps = Omit<QRCodeToDataURLOptions, 'renderOptions'> & QRCodeToDataURLOptionsJpegWebp['rendererOpts'] & {
|
|
9
|
-
value: QRCodeValue;
|
|
10
|
-
};
|
|
11
|
-
export declare const qrcodeProps: {
|
|
12
|
-
/**
|
|
13
|
-
* 外边距 margin
|
|
14
|
-
*/
|
|
15
|
-
margin: {
|
|
16
|
-
type: NumberConstructor;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 规模 scale
|
|
20
|
-
*/
|
|
21
|
-
scale: {
|
|
22
|
-
type: NumberConstructor;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* 宽度 width
|
|
26
|
-
*/
|
|
27
|
-
width: {
|
|
28
|
-
type: NumberConstructor;
|
|
29
|
-
default: number;
|
|
30
|
-
};
|
|
31
|
-
color: {
|
|
32
|
-
type: ObjectConstructor;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* dark color
|
|
36
|
-
*/
|
|
37
|
-
darkColor: {
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* dark color
|
|
43
|
-
*/
|
|
44
|
-
lightColor: {
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
default: string;
|
|
47
|
-
};
|
|
48
|
-
quality: {
|
|
49
|
-
type: NumberConstructor;
|
|
50
|
-
default: number;
|
|
51
|
-
};
|
|
52
|
-
value: {
|
|
53
|
-
type: PropType<QRCodeValue>;
|
|
54
|
-
default: string;
|
|
55
|
-
};
|
|
56
|
-
timeout: {
|
|
57
|
-
type: NumberConstructor;
|
|
58
|
-
default: number;
|
|
59
|
-
};
|
|
60
|
-
tip: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
default: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export type QrcodeProps = ComponentPropsType<typeof qrcodeProps>;
|
|
66
|
-
export type qrcodeEmits = {
|
|
67
|
-
refresh: [];
|
|
68
|
-
};
|