@xto/data 1.4.2 → 1.4.4
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/Avatar/index.vue.d.ts +33 -0
- package/es/Avatar/types.d.ts +57 -0
- package/es/Calendar/index.d.ts +9 -0
- package/es/Calendar/index.vue.d.ts +36 -0
- package/es/Card/index.d.ts +8 -0
- package/es/Card/index.vue.d.ts +26 -0
- package/es/Card/types.d.ts +30 -0
- package/es/Carousel/CarouselItem.vue.d.ts +17 -0
- package/es/Carousel/index.d.ts +31 -0
- package/es/Carousel/index.vue.d.ts +54 -0
- package/es/Carousel/types.d.ts +105 -0
- package/es/Collapse/CollapseItem.vue.d.ts +26 -0
- package/es/Collapse/index.d.ts +18 -0
- package/es/Collapse/index.vue.d.ts +32 -0
- package/es/Descriptions/DescriptionsItem.vue.d.ts +26 -0
- package/es/Descriptions/index.vue.d.ts +34 -0
- package/es/Descriptions/types.d.ts +89 -0
- package/es/DynamicTable/index.d.ts +84 -0
- package/es/DynamicTable/index.vue.d.ts +115 -0
- package/es/DynamicTable/types.d.ts +183 -0
- package/es/Empty/index.d.ts +11 -0
- package/es/Empty/index.vue.d.ts +35 -0
- package/es/Image/index.d.ts +25 -0
- package/es/Image/index.vue.d.ts +53 -0
- package/es/InfiniteScroll/index.d.ts +17 -0
- package/es/InfiniteScroll/index.vue.d.ts +48 -0
- package/es/Pagination/index.d.ts +18 -0
- package/es/Pagination/index.vue.d.ts +25 -0
- package/es/Pagination/types.d.ts +46 -0
- package/es/Progress/index.d.ts +16 -0
- package/es/Progress/index.vue.d.ts +19 -0
- package/es/Progress/types.d.ts +54 -0
- package/es/QRCode/index.d.ts +17 -0
- package/es/QRCode/index.vue.d.ts +31 -0
- package/es/Scrollbar/index.vue.d.ts +50 -0
- package/es/Scrollbar/types.d.ts +88 -0
- package/es/Table/TableColumn.vue.d.ts +14 -0
- package/es/Table/index.vue.d.ts +106 -0
- package/es/Table/types.d.ts +176 -0
- package/es/Tag/index.d.ts +15 -0
- package/es/Tag/index.vue.d.ts +36 -0
- package/es/Timeline/TimelineItem.vue.d.ts +38 -0
- package/es/Timeline/index.d.ts +20 -0
- package/es/Timeline/index.vue.d.ts +23 -0
- package/es/Timeline/types.d.ts +70 -0
- package/es/Tree/index.d.ts +217 -0
- package/es/Tree/index.vue.d.ts +105 -0
- package/es/Tree/src/tree-node.vue.d.ts +32 -0
- package/es/Tree/src/useTree.d.ts +91 -0
- package/es/TreeTable/TreeTableColumn.vue.d.ts +14 -0
- package/es/TreeTable/index.d.ts +2 -0
- package/es/TreeTable/index.vue.d.ts +102 -0
- package/es/TreeTable/types.d.ts +164 -0
- package/es/VirtualScroll/index.d.ts +19 -0
- package/es/VirtualScroll/index.vue.d.ts +56 -0
- package/es/index.d.ts +42 -0
- package/es/index.mjs +1686 -1625
- package/es/style.css +1 -1
- package/lib/index.cjs +1 -1
- package/lib/style.css +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
percentage?: number;
|
|
3
|
+
type?: 'line' | 'circle' | 'dashboard';
|
|
4
|
+
status?: '' | 'success' | 'warning' | 'exception';
|
|
5
|
+
strokeWidth?: number;
|
|
6
|
+
color?: string | string[] | ((percentage: number) => string);
|
|
7
|
+
width?: number;
|
|
8
|
+
showText?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
type: "line" | "circle" | "dashboard";
|
|
12
|
+
color: string | string[] | ((percentage: number) => string);
|
|
13
|
+
strokeWidth: number;
|
|
14
|
+
percentage: number;
|
|
15
|
+
status: "" | "success" | "warning" | "exception";
|
|
16
|
+
width: number;
|
|
17
|
+
showText: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Progress 类型
|
|
6
|
+
*/
|
|
7
|
+
export type ProgressType = 'line' | 'circle' | 'dashboard';
|
|
8
|
+
/**
|
|
9
|
+
* Progress 状态
|
|
10
|
+
*/
|
|
11
|
+
export type ProgressStatus = '' | 'success' | 'warning' | 'exception';
|
|
12
|
+
/**
|
|
13
|
+
* Progress Props
|
|
14
|
+
*/
|
|
15
|
+
export interface ProgressProps {
|
|
16
|
+
/**
|
|
17
|
+
* 百分比
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
20
|
+
percentage?: number;
|
|
21
|
+
/**
|
|
22
|
+
* 进度条类型
|
|
23
|
+
* @default 'line'
|
|
24
|
+
*/
|
|
25
|
+
type?: ProgressType;
|
|
26
|
+
/**
|
|
27
|
+
* 进度条状态
|
|
28
|
+
*/
|
|
29
|
+
status?: ProgressStatus;
|
|
30
|
+
/**
|
|
31
|
+
* 进度条宽度
|
|
32
|
+
* @default 6
|
|
33
|
+
*/
|
|
34
|
+
strokeWidth?: number;
|
|
35
|
+
/**
|
|
36
|
+
* 进度条颜色
|
|
37
|
+
* @default '#1D4ED8'
|
|
38
|
+
*/
|
|
39
|
+
color?: string | string[] | ((percentage: number) => string);
|
|
40
|
+
/**
|
|
41
|
+
* 环形进度条画布宽度
|
|
42
|
+
* @default 126
|
|
43
|
+
*/
|
|
44
|
+
width?: number;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示文字
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showText?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Progress 组件实例类型
|
|
53
|
+
*/
|
|
54
|
+
export type ProgressInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as QRCode } from './index.vue';
|
|
2
|
+
export { QRCode };
|
|
3
|
+
export default QRCode;
|
|
4
|
+
export type QRCodeProps = {
|
|
5
|
+
/** 二维码内容 */
|
|
6
|
+
value: string;
|
|
7
|
+
/** 尺寸 */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** 背景色 */
|
|
10
|
+
bgColor?: string;
|
|
11
|
+
/** 前景色 */
|
|
12
|
+
fgColor?: string;
|
|
13
|
+
/** 纠错级别 */
|
|
14
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
15
|
+
/** 是否显示下载按钮 */
|
|
16
|
+
showDownload?: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 二维码内容 */
|
|
3
|
+
value: string;
|
|
4
|
+
/** 尺寸 */
|
|
5
|
+
size?: number;
|
|
6
|
+
/** 背景色 */
|
|
7
|
+
bgColor?: string;
|
|
8
|
+
/** 前景色 */
|
|
9
|
+
fgColor?: string;
|
|
10
|
+
/** 纠错级别 */
|
|
11
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
12
|
+
/** 是否显示下载按钮 */
|
|
13
|
+
showDownload?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
error: (error: Error) => any;
|
|
17
|
+
ready: (canvas: HTMLCanvasElement) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onReady?: ((canvas: HTMLCanvasElement) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
size: number;
|
|
23
|
+
value: string;
|
|
24
|
+
level: "L" | "M" | "Q" | "H";
|
|
25
|
+
bgColor: string;
|
|
26
|
+
fgColor: string;
|
|
27
|
+
showDownload: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
29
|
+
canvasRef: HTMLCanvasElement;
|
|
30
|
+
}, HTMLDivElement>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
height?: string | number;
|
|
3
|
+
maxHeight?: string | number;
|
|
4
|
+
native?: boolean;
|
|
5
|
+
wrapStyle?: string;
|
|
6
|
+
wrapClass?: string;
|
|
7
|
+
viewStyle?: string;
|
|
8
|
+
viewClass?: string;
|
|
9
|
+
noresize?: boolean;
|
|
10
|
+
tag?: string;
|
|
11
|
+
always?: boolean;
|
|
12
|
+
minSize?: number;
|
|
13
|
+
};
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {
|
|
20
|
+
wrapRef: HTMLDivElement;
|
|
21
|
+
resizeRef: unknown;
|
|
22
|
+
};
|
|
23
|
+
rootEl: HTMLDivElement;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
27
|
+
scrollTo: (options: ScrollToOptions) => void;
|
|
28
|
+
setScrollTop: (value: number) => void;
|
|
29
|
+
setScrollLeft: (value: number) => void;
|
|
30
|
+
update: () => void;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
scroll: (event: Event) => any;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onScroll?: ((event: Event) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
tag: string;
|
|
37
|
+
always: boolean;
|
|
38
|
+
native: boolean;
|
|
39
|
+
minSize: number;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
41
|
+
wrapRef: HTMLDivElement;
|
|
42
|
+
resizeRef: unknown;
|
|
43
|
+
}, HTMLDivElement>;
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scrollbar 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Scrollbar Props
|
|
6
|
+
*/
|
|
7
|
+
export interface ScrollbarProps {
|
|
8
|
+
/**
|
|
9
|
+
* 滚动区域高度
|
|
10
|
+
*/
|
|
11
|
+
height?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* 滚动区域最大高度
|
|
14
|
+
*/
|
|
15
|
+
maxHeight?: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* 是否使用原生滚动条
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
native?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 包裹容器样式
|
|
23
|
+
*/
|
|
24
|
+
wrapStyle?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 包裹容器类名
|
|
27
|
+
*/
|
|
28
|
+
wrapClass?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 视图容器样式
|
|
31
|
+
*/
|
|
32
|
+
viewStyle?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 视图容器类名
|
|
35
|
+
*/
|
|
36
|
+
viewClass?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 是否响应容器尺寸变化
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
noresize?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 视图容器标签名
|
|
44
|
+
* @default 'div'
|
|
45
|
+
*/
|
|
46
|
+
tag?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 滚动条是否始终显示
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
always?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 滚动条最小尺寸
|
|
54
|
+
* @default 20
|
|
55
|
+
*/
|
|
56
|
+
minSize?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Scrollbar Emits
|
|
60
|
+
*/
|
|
61
|
+
export interface ScrollbarEmits {
|
|
62
|
+
(e: 'scroll', event: Event): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Scrollbar Expose
|
|
66
|
+
*/
|
|
67
|
+
export interface ScrollbarExpose {
|
|
68
|
+
/**
|
|
69
|
+
* 滚动到指定位置
|
|
70
|
+
*/
|
|
71
|
+
scrollTo: (options: ScrollToOptions) => void;
|
|
72
|
+
/**
|
|
73
|
+
* 设置垂直滚动位置
|
|
74
|
+
*/
|
|
75
|
+
setScrollTop: (value: number) => void;
|
|
76
|
+
/**
|
|
77
|
+
* 设置水平滚动位置
|
|
78
|
+
*/
|
|
79
|
+
setScrollLeft: (value: number) => void;
|
|
80
|
+
/**
|
|
81
|
+
* 更新滚动条状态
|
|
82
|
+
*/
|
|
83
|
+
update: () => void;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Scrollbar 组件实例类型
|
|
87
|
+
*/
|
|
88
|
+
export type ScrollbarInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TableColumnProps {
|
|
2
|
+
prop?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
width?: string | number;
|
|
5
|
+
minWidth?: string | number;
|
|
6
|
+
align?: 'left' | 'center' | 'right';
|
|
7
|
+
sortable?: boolean | 'custom';
|
|
8
|
+
fixed?: 'left' | 'right' | true;
|
|
9
|
+
formatter?: (row: any, column: any, cellValue: any, index: number) => string;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<TableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableColumnProps> & Readonly<{}>, {
|
|
12
|
+
align: "left" | "center" | "right";
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Slot } from 'vue';
|
|
2
|
+
export interface TableColumnConfig {
|
|
3
|
+
prop: string;
|
|
4
|
+
label: string;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
minWidth?: string | number;
|
|
7
|
+
align?: 'left' | 'center' | 'right';
|
|
8
|
+
sortable?: boolean | 'custom';
|
|
9
|
+
fixed?: 'left' | 'right' | true;
|
|
10
|
+
formatter?: (row: any, column: TableColumnConfig, cellValue: any, index: number) => string;
|
|
11
|
+
slot?: Slot;
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
data: any[];
|
|
15
|
+
height?: string | number;
|
|
16
|
+
maxHeight?: string | number;
|
|
17
|
+
rowKey?: string | ((row: any) => string);
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
border?: boolean;
|
|
20
|
+
stripe?: boolean;
|
|
21
|
+
showHeader?: boolean;
|
|
22
|
+
emptyText?: string;
|
|
23
|
+
defaultSort?: {
|
|
24
|
+
prop: string;
|
|
25
|
+
order: 'ascending' | 'descending';
|
|
26
|
+
};
|
|
27
|
+
pagination?: {
|
|
28
|
+
current: number;
|
|
29
|
+
pageSize: number;
|
|
30
|
+
total: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
declare function __VLS_template(): {
|
|
34
|
+
attrs: Partial<{}>;
|
|
35
|
+
slots: {
|
|
36
|
+
empty?(_: {}): any;
|
|
37
|
+
default?(_: {}): any;
|
|
38
|
+
};
|
|
39
|
+
refs: {};
|
|
40
|
+
rootEl: HTMLDivElement;
|
|
41
|
+
};
|
|
42
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
43
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
44
|
+
clearSelection: () => void;
|
|
45
|
+
getSelection: () => any[];
|
|
46
|
+
toggleRowSelection: (row: any, selected?: boolean) => void;
|
|
47
|
+
sortState: import('vue').Ref<{
|
|
48
|
+
prop: string;
|
|
49
|
+
order: "ascending" | "descending" | null;
|
|
50
|
+
}, {
|
|
51
|
+
prop: string;
|
|
52
|
+
order: "ascending" | "descending" | null;
|
|
53
|
+
} | {
|
|
54
|
+
prop: string;
|
|
55
|
+
order: "ascending" | "descending" | null;
|
|
56
|
+
}>;
|
|
57
|
+
columns: import('vue').ComputedRef<{
|
|
58
|
+
prop: string;
|
|
59
|
+
label: string;
|
|
60
|
+
width?: string | number | undefined;
|
|
61
|
+
minWidth?: string | number | undefined;
|
|
62
|
+
align?: "left" | "center" | "right" | undefined;
|
|
63
|
+
sortable?: boolean | "custom" | undefined;
|
|
64
|
+
fixed?: "left" | "right" | true | undefined;
|
|
65
|
+
formatter?: ((row: any, column: TableColumnConfig, cellValue: any, index: number) => string) | undefined;
|
|
66
|
+
slot?: Slot | undefined;
|
|
67
|
+
}[]>;
|
|
68
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
69
|
+
"size-change": (size: number) => any;
|
|
70
|
+
"sort-change": (sort: {
|
|
71
|
+
prop: string;
|
|
72
|
+
order: "ascending" | "descending" | null;
|
|
73
|
+
}) => any;
|
|
74
|
+
"row-click": (row: any, column: TableColumnConfig, event: MouseEvent) => any;
|
|
75
|
+
"row-dblclick": (row: any, column: TableColumnConfig, event: MouseEvent) => any;
|
|
76
|
+
"selection-change": (selection: any[]) => any;
|
|
77
|
+
"select-all": (selection: any[]) => any;
|
|
78
|
+
"cell-click": (row: any, column: TableColumnConfig, cell: HTMLTableCellElement, event: MouseEvent) => any;
|
|
79
|
+
"page-change": (page: number) => any;
|
|
80
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
81
|
+
"onSize-change"?: ((size: number) => any) | undefined;
|
|
82
|
+
"onSort-change"?: ((sort: {
|
|
83
|
+
prop: string;
|
|
84
|
+
order: "ascending" | "descending" | null;
|
|
85
|
+
}) => any) | undefined;
|
|
86
|
+
"onRow-click"?: ((row: any, column: TableColumnConfig, event: MouseEvent) => any) | undefined;
|
|
87
|
+
"onRow-dblclick"?: ((row: any, column: TableColumnConfig, event: MouseEvent) => any) | undefined;
|
|
88
|
+
"onSelection-change"?: ((selection: any[]) => any) | undefined;
|
|
89
|
+
"onSelect-all"?: ((selection: any[]) => any) | undefined;
|
|
90
|
+
"onCell-click"?: ((row: any, column: TableColumnConfig, cell: HTMLTableCellElement, event: MouseEvent) => any) | undefined;
|
|
91
|
+
"onPage-change"?: ((page: number) => any) | undefined;
|
|
92
|
+
}>, {
|
|
93
|
+
data: any[];
|
|
94
|
+
border: boolean;
|
|
95
|
+
loading: boolean;
|
|
96
|
+
stripe: boolean;
|
|
97
|
+
showHeader: boolean;
|
|
98
|
+
emptyText: string;
|
|
99
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
100
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
101
|
+
export default _default;
|
|
102
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
103
|
+
new (): {
|
|
104
|
+
$slots: S;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Slot } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Table 列对齐方式
|
|
4
|
+
*/
|
|
5
|
+
export type TableColumnAlign = 'left' | 'center' | 'right';
|
|
6
|
+
/**
|
|
7
|
+
* Table 列固定方式
|
|
8
|
+
*/
|
|
9
|
+
export type TableColumnFixed = 'left' | 'right' | true;
|
|
10
|
+
/**
|
|
11
|
+
* Table 排序方式
|
|
12
|
+
*/
|
|
13
|
+
export type TableSortOrder = 'ascending' | 'descending';
|
|
14
|
+
/**
|
|
15
|
+
* Table 列配置
|
|
16
|
+
*/
|
|
17
|
+
export interface TableColumnConfig {
|
|
18
|
+
/**
|
|
19
|
+
* 列字段名
|
|
20
|
+
*/
|
|
21
|
+
prop: string;
|
|
22
|
+
/**
|
|
23
|
+
* 列标题
|
|
24
|
+
*/
|
|
25
|
+
label: string;
|
|
26
|
+
/**
|
|
27
|
+
* 列宽度
|
|
28
|
+
*/
|
|
29
|
+
width?: string | number;
|
|
30
|
+
/**
|
|
31
|
+
* 最小列宽
|
|
32
|
+
*/
|
|
33
|
+
minWidth?: string | number;
|
|
34
|
+
/**
|
|
35
|
+
* 对齐方式
|
|
36
|
+
*/
|
|
37
|
+
align?: TableColumnAlign;
|
|
38
|
+
/**
|
|
39
|
+
* 是否可排序
|
|
40
|
+
*/
|
|
41
|
+
sortable?: boolean | 'custom';
|
|
42
|
+
/**
|
|
43
|
+
* 固定列
|
|
44
|
+
*/
|
|
45
|
+
fixed?: TableColumnFixed;
|
|
46
|
+
/**
|
|
47
|
+
* 格式化函数
|
|
48
|
+
*/
|
|
49
|
+
formatter?: (row: any, column: TableColumnConfig, cellValue: any, index: number) => string;
|
|
50
|
+
/**
|
|
51
|
+
* 自定义插槽
|
|
52
|
+
*/
|
|
53
|
+
slot?: Slot;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Table 排序配置
|
|
57
|
+
*/
|
|
58
|
+
export interface TableSortConfig {
|
|
59
|
+
/**
|
|
60
|
+
* 排序字段
|
|
61
|
+
*/
|
|
62
|
+
prop: string;
|
|
63
|
+
/**
|
|
64
|
+
* 排序方式
|
|
65
|
+
*/
|
|
66
|
+
order: TableSortOrder | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Table 分页配置
|
|
70
|
+
*/
|
|
71
|
+
export interface TablePaginationConfig {
|
|
72
|
+
/**
|
|
73
|
+
* 当前页码
|
|
74
|
+
*/
|
|
75
|
+
current: number;
|
|
76
|
+
/**
|
|
77
|
+
* 每页条数
|
|
78
|
+
*/
|
|
79
|
+
pageSize: number;
|
|
80
|
+
/**
|
|
81
|
+
* 总条数
|
|
82
|
+
*/
|
|
83
|
+
total: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Table Props
|
|
87
|
+
*/
|
|
88
|
+
export interface TableProps {
|
|
89
|
+
/**
|
|
90
|
+
* 表格数据
|
|
91
|
+
*/
|
|
92
|
+
data: any[];
|
|
93
|
+
/**
|
|
94
|
+
* 表格高度
|
|
95
|
+
*/
|
|
96
|
+
height?: string | number;
|
|
97
|
+
/**
|
|
98
|
+
* 表格最大高度
|
|
99
|
+
*/
|
|
100
|
+
maxHeight?: string | number;
|
|
101
|
+
/**
|
|
102
|
+
* 行数据的 Key
|
|
103
|
+
*/
|
|
104
|
+
rowKey?: string | ((row: any) => string);
|
|
105
|
+
/**
|
|
106
|
+
* 是否加载中
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
loading?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* 是否显示边框
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
border?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* 是否斑马纹
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
stripe?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* 是否显示表头
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
showHeader?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* 空数据文案
|
|
127
|
+
* @default '暂无数据'
|
|
128
|
+
*/
|
|
129
|
+
emptyText?: string;
|
|
130
|
+
/**
|
|
131
|
+
* 默认排序
|
|
132
|
+
*/
|
|
133
|
+
defaultSort?: TableSortConfig;
|
|
134
|
+
/**
|
|
135
|
+
* 分页配置
|
|
136
|
+
*/
|
|
137
|
+
pagination?: TablePaginationConfig;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Table Emits
|
|
141
|
+
*/
|
|
142
|
+
export interface TableEmits {
|
|
143
|
+
(e: 'sort-change', sort: TableSortConfig): void;
|
|
144
|
+
(e: 'row-click', row: any, column: TableColumnConfig, event: MouseEvent): void;
|
|
145
|
+
(e: 'row-dblclick', row: any, column: TableColumnConfig, event: MouseEvent): void;
|
|
146
|
+
(e: 'cell-click', row: any, column: TableColumnConfig, cell: HTMLTableCellElement, event: MouseEvent): void;
|
|
147
|
+
(e: 'selection-change', selection: any[]): void;
|
|
148
|
+
(e: 'select-all', selection: any[]): void;
|
|
149
|
+
(e: 'page-change', page: number): void;
|
|
150
|
+
(e: 'size-change', size: number): void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Table Expose
|
|
154
|
+
*/
|
|
155
|
+
export interface TableExpose {
|
|
156
|
+
/**
|
|
157
|
+
* 清空选择
|
|
158
|
+
*/
|
|
159
|
+
clearSelection: () => void;
|
|
160
|
+
/**
|
|
161
|
+
* 获取选中行
|
|
162
|
+
*/
|
|
163
|
+
getSelection: () => any[];
|
|
164
|
+
/**
|
|
165
|
+
* 排序状态
|
|
166
|
+
*/
|
|
167
|
+
sortState: TableSortConfig;
|
|
168
|
+
/**
|
|
169
|
+
* 列配置
|
|
170
|
+
*/
|
|
171
|
+
columns: TableColumnConfig[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Table 组件实例类型
|
|
175
|
+
*/
|
|
176
|
+
export type TableInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
export interface TagProps {
|
|
3
|
+
/** Tag type */
|
|
4
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
|
|
5
|
+
/** Tag size */
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
/** Tag effect */
|
|
8
|
+
effect?: 'light' | 'dark' | 'plain';
|
|
9
|
+
/** Whether Tag is closable */
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
/** Whether Tag has border highlight */
|
|
12
|
+
hit?: boolean;
|
|
13
|
+
/** Custom color */
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
|
|
4
|
+
size?: ComponentSize;
|
|
5
|
+
effect?: 'light' | 'dark' | 'plain';
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
hit?: boolean;
|
|
8
|
+
color?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLSpanElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
close: (event: Event) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onClose?: ((event: Event) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
type: "primary" | "success" | "warning" | "danger" | "info" | "";
|
|
25
|
+
size: ComponentSize;
|
|
26
|
+
effect: "light" | "dark" | "plain";
|
|
27
|
+
closable: boolean;
|
|
28
|
+
hit: boolean;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 时间戳 */
|
|
3
|
+
timestamp?: string;
|
|
4
|
+
/** 节点类型 */
|
|
5
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
6
|
+
/** 节点颜色 */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** 节点大小 */
|
|
9
|
+
size?: 'normal' | 'large';
|
|
10
|
+
/** 是否显示时间戳 */
|
|
11
|
+
hideTimestamp?: boolean;
|
|
12
|
+
/** 时间戳位置 */
|
|
13
|
+
placement?: 'top' | 'bottom';
|
|
14
|
+
};
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
dot?(_: {}): any;
|
|
19
|
+
default?(_: {}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLLIElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
type: "primary" | "success" | "warning" | "danger" | "info";
|
|
27
|
+
size: "normal" | "large";
|
|
28
|
+
timestamp: string;
|
|
29
|
+
hideTimestamp: boolean;
|
|
30
|
+
placement: "top" | "bottom";
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface TimelineProps {
|
|
2
|
+
/** 时间线方向 */
|
|
3
|
+
direction?: 'vertical' | 'horizontal';
|
|
4
|
+
}
|
|
5
|
+
export interface TimelineItemProps {
|
|
6
|
+
/** 时间戳 */
|
|
7
|
+
timestamp?: string;
|
|
8
|
+
/** 节点类型 */
|
|
9
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
10
|
+
/** 节点颜色 */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** 节点大小 */
|
|
13
|
+
size?: 'normal' | 'large';
|
|
14
|
+
/** 是否隐藏时间戳 */
|
|
15
|
+
hideTimestamp?: boolean;
|
|
16
|
+
/** 时间戳位置 */
|
|
17
|
+
placement?: 'top' | 'bottom';
|
|
18
|
+
}
|
|
19
|
+
export { default as Timeline } from './index.vue';
|
|
20
|
+
export { default as TimelineItem } from './TimelineItem.vue';
|