twcpt 0.0.19 → 0.0.21
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/components/j-tw-confirm-dialog/index.d.ts +30 -3
- package/dist/components/j-tw-confirm-dialog/types.d.ts +34 -4
- package/dist/components/j-tw-file-upload/index.d.ts +3 -0
- package/dist/components/j-tw-file-upload/types.d.ts +68 -0
- package/dist/components/j-tw-search-box/index.d.ts +3 -0
- package/dist/components/j-tw-search-box/types.d.ts +28 -0
- package/dist/components/j-tw-table/index.d.ts +1789 -3
- package/dist/components/j-tw-table/types.d.ts +17 -0
- package/dist/global.d.ts +20 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/twcpt-styles.css +1 -1
- package/dist/twcpt.cjs.js +10 -10
- package/dist/twcpt.es.js +5711 -5114
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
icon: {
|
|
24
|
-
type: PropType<JTWConfirmDialogIconType>;
|
|
24
|
+
type: PropType<JTWConfirmDialogIconType | string>;
|
|
25
25
|
default: "warn";
|
|
26
26
|
};
|
|
27
27
|
confirmText: {
|
|
@@ -32,6 +32,18 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
32
32
|
type: StringConstructor;
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
|
+
showCancel: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
showIcon: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
showConfirm: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
35
47
|
}>, {
|
|
36
48
|
iconSvg: ComputedRef<string>;
|
|
37
49
|
handleConfirm: () => void;
|
|
@@ -54,7 +66,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
54
66
|
default: boolean;
|
|
55
67
|
};
|
|
56
68
|
icon: {
|
|
57
|
-
type: PropType<JTWConfirmDialogIconType>;
|
|
69
|
+
type: PropType<JTWConfirmDialogIconType | string>;
|
|
58
70
|
default: "warn";
|
|
59
71
|
};
|
|
60
72
|
confirmText: {
|
|
@@ -65,15 +77,30 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
65
77
|
type: StringConstructor;
|
|
66
78
|
default: string;
|
|
67
79
|
};
|
|
80
|
+
showCancel: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
showIcon: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
showConfirm: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
68
92
|
}>> & Readonly<{
|
|
69
93
|
onCancel?: (() => any) | undefined;
|
|
70
94
|
onConfirm?: (() => any) | undefined;
|
|
71
95
|
}>, {
|
|
72
|
-
icon:
|
|
96
|
+
icon: string;
|
|
73
97
|
visible: boolean;
|
|
74
98
|
html: boolean;
|
|
99
|
+
showConfirm: boolean;
|
|
75
100
|
confirmText: string;
|
|
76
101
|
cancelText: string;
|
|
102
|
+
showCancel: boolean;
|
|
103
|
+
showIcon: boolean;
|
|
77
104
|
}, {}, {
|
|
78
105
|
JTWBtn: DefineComponent<ExtractPropTypes<{
|
|
79
106
|
size: {
|
|
@@ -22,10 +22,10 @@ export interface JTWConfirmDialogOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
html?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* 图标,支持内置类型或自定义 Vue 组件
|
|
26
26
|
* @default 'warn'
|
|
27
27
|
*/
|
|
28
|
-
icon?: JTWConfirmDialogIconType;
|
|
28
|
+
icon?: JTWConfirmDialogIconType | string;
|
|
29
29
|
/**
|
|
30
30
|
* 确认按钮文字
|
|
31
31
|
* @default '确定'
|
|
@@ -36,6 +36,21 @@ export interface JTWConfirmDialogOptions {
|
|
|
36
36
|
* @default '取消'
|
|
37
37
|
*/
|
|
38
38
|
cancelText?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 是否显示取消按钮
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
showCancel?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 是否显示图标
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showIcon?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 是否显示确认按钮
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
showConfirm?: boolean;
|
|
39
54
|
}
|
|
40
55
|
/**
|
|
41
56
|
* @description JTWConfirmDialog 组件 Props
|
|
@@ -56,10 +71,10 @@ export interface JTWConfirmDialogProps {
|
|
|
56
71
|
*/
|
|
57
72
|
html?: boolean;
|
|
58
73
|
/**
|
|
59
|
-
*
|
|
74
|
+
* 图标,支持内置类型或自定义 Vue 组件
|
|
60
75
|
* @default 'warn'
|
|
61
76
|
*/
|
|
62
|
-
icon?: JTWConfirmDialogIconType;
|
|
77
|
+
icon?: JTWConfirmDialogIconType | string;
|
|
63
78
|
/**
|
|
64
79
|
* 确认按钮文字
|
|
65
80
|
* @default '确定'
|
|
@@ -70,6 +85,21 @@ export interface JTWConfirmDialogProps {
|
|
|
70
85
|
* @default '取消'
|
|
71
86
|
*/
|
|
72
87
|
cancelText?: string;
|
|
88
|
+
/**
|
|
89
|
+
* 是否显示取消按钮
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
showCancel?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 是否显示图标
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
showIcon?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 是否显示确认按钮
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
showConfirm?: boolean;
|
|
73
103
|
}
|
|
74
104
|
/** JTWConfirmDialog Emits 接口 */
|
|
75
105
|
export interface JTWConfirmDialogEmits {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Component, ComponentPublicInstance } from 'vue';
|
|
2
|
+
export interface JTWFileUploadProps {
|
|
3
|
+
/**
|
|
4
|
+
* 文件列表
|
|
5
|
+
*/
|
|
6
|
+
modelValue?: File[];
|
|
7
|
+
/**
|
|
8
|
+
* 接受的文件类型
|
|
9
|
+
* @default 'image/png,image/jpg,image/jpeg'
|
|
10
|
+
*/
|
|
11
|
+
accept?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 最大文件大小(字节)
|
|
14
|
+
* @default 5242880 (5MB)
|
|
15
|
+
*/
|
|
16
|
+
maxSize?: number;
|
|
17
|
+
/**
|
|
18
|
+
* 最大文件数量
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
maxFiles?: number;
|
|
22
|
+
/**
|
|
23
|
+
* 是否支持多选
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
multiple?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 是否禁用
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface JTWFileUploadEmits {
|
|
34
|
+
/**
|
|
35
|
+
* 更新文件列表
|
|
36
|
+
*/
|
|
37
|
+
'update:modelValue': (files: File[]) => void;
|
|
38
|
+
/**
|
|
39
|
+
* 文件数量超出限制
|
|
40
|
+
*/
|
|
41
|
+
'exceed': (files: File[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* 文件验证错误
|
|
44
|
+
*/
|
|
45
|
+
'error': (error: {
|
|
46
|
+
type: string;
|
|
47
|
+
message: string;
|
|
48
|
+
file?: File;
|
|
49
|
+
}) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface JTWFileUploadSlots {
|
|
52
|
+
/**
|
|
53
|
+
* 上传区域文本
|
|
54
|
+
*/
|
|
55
|
+
'upload-text': () => any;
|
|
56
|
+
}
|
|
57
|
+
export interface JTWFileUploadExpose {
|
|
58
|
+
}
|
|
59
|
+
export type JTWFileUploadComponent = Component<JTWFileUploadProps, JTWFileUploadEmits, JTWFileUploadSlots>;
|
|
60
|
+
export type JTWFileUploadInstance = ComponentPublicInstance<JTWFileUploadProps, JTWFileUploadExpose>;
|
|
61
|
+
export type JTWFileUploadTemplateProps = Partial<JTWFileUploadProps> & {
|
|
62
|
+
onExceed?: (files: File[]) => void;
|
|
63
|
+
onError?: (error: {
|
|
64
|
+
type: string;
|
|
65
|
+
message: string;
|
|
66
|
+
file?: File;
|
|
67
|
+
}) => void;
|
|
68
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, ComponentPublicInstance } from 'vue';
|
|
2
|
+
export interface JTWSearchBoxProps {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
wrapWidth?: string;
|
|
7
|
+
gap?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface JTWSearchBoxEmits {
|
|
10
|
+
'update:modelValue': (value: string) => void;
|
|
11
|
+
search: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface JTWSearchBoxSlots {
|
|
14
|
+
before?: () => any;
|
|
15
|
+
after?: () => any;
|
|
16
|
+
}
|
|
17
|
+
export interface JTWSearchBoxExpose {
|
|
18
|
+
focus: () => void;
|
|
19
|
+
blur: () => void;
|
|
20
|
+
expand: () => void;
|
|
21
|
+
collapse: () => void;
|
|
22
|
+
}
|
|
23
|
+
export type JTWSearchBoxComponent = Component<JTWSearchBoxProps, JTWSearchBoxEmits, JTWSearchBoxSlots>;
|
|
24
|
+
export type JTWSearchBoxInstance = ComponentPublicInstance<JTWSearchBoxProps, JTWSearchBoxExpose>;
|
|
25
|
+
export type JTWSearchBoxTemplateProps = Partial<JTWSearchBoxProps> & {
|
|
26
|
+
'onUpdate:modelValue'?: (value: string) => void;
|
|
27
|
+
onSearch?: (value: string) => void;
|
|
28
|
+
};
|