twcpt 0.0.19 → 0.0.20
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-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 +997 -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 +5532 -5027
- package/package.json +1 -1
|
@@ -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
|
+
};
|