@xto/data 1.4.1 → 1.4.3
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 +1641 -1636
- package/es/style.css +1 -1
- package/lib/index.cjs +1 -1
- package/lib/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeTable 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* TreeTable 列配置
|
|
6
|
+
*/
|
|
7
|
+
export interface TreeTableColumnConfig {
|
|
8
|
+
/**
|
|
9
|
+
* 列字段名
|
|
10
|
+
*/
|
|
11
|
+
prop: string;
|
|
12
|
+
/**
|
|
13
|
+
* 列标题
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* 列宽度
|
|
18
|
+
*/
|
|
19
|
+
width?: string | number;
|
|
20
|
+
/**
|
|
21
|
+
* 最小列宽
|
|
22
|
+
*/
|
|
23
|
+
minWidth?: string | number;
|
|
24
|
+
/**
|
|
25
|
+
* 对齐方式
|
|
26
|
+
*/
|
|
27
|
+
align?: 'left' | 'center' | 'right';
|
|
28
|
+
/**
|
|
29
|
+
* 是否可排序
|
|
30
|
+
*/
|
|
31
|
+
sortable?: boolean | 'custom';
|
|
32
|
+
/**
|
|
33
|
+
* 固定列
|
|
34
|
+
*/
|
|
35
|
+
fixed?: 'left' | 'right' | true;
|
|
36
|
+
/**
|
|
37
|
+
* 格式化函数
|
|
38
|
+
*/
|
|
39
|
+
formatter?: (row: any, column: TreeTableColumnConfig, cellValue: any, index: number) => string;
|
|
40
|
+
/**
|
|
41
|
+
* 自定义插槽
|
|
42
|
+
*/
|
|
43
|
+
slot?: Function;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* TreeTable 树形属性配置
|
|
47
|
+
*/
|
|
48
|
+
export interface TreeTableTreeProps {
|
|
49
|
+
/**
|
|
50
|
+
* 子节点字段名
|
|
51
|
+
* @default 'children'
|
|
52
|
+
*/
|
|
53
|
+
children?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 是否有子节点字段名
|
|
56
|
+
* @default 'hasChildren'
|
|
57
|
+
*/
|
|
58
|
+
hasChildren?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* TreeTable Props
|
|
62
|
+
*/
|
|
63
|
+
export interface TreeTableProps {
|
|
64
|
+
/**
|
|
65
|
+
* 表格数据
|
|
66
|
+
*/
|
|
67
|
+
data: any[];
|
|
68
|
+
/**
|
|
69
|
+
* 行数据的 Key
|
|
70
|
+
*/
|
|
71
|
+
rowKey?: string | ((row: any) => string);
|
|
72
|
+
/**
|
|
73
|
+
* 是否加载中
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
loading?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 是否显示边框
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
border?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 是否斑马纹
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
stripe?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 是否显示表头
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
showHeader?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 空数据文案
|
|
94
|
+
* @default '暂无数据'
|
|
95
|
+
*/
|
|
96
|
+
emptyText?: string;
|
|
97
|
+
/**
|
|
98
|
+
* 是否默认展开所有节点
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
defaultExpandAll?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 默认展开的节点 key 数组
|
|
104
|
+
*/
|
|
105
|
+
defaultExpandedKeys?: (string | number)[];
|
|
106
|
+
/**
|
|
107
|
+
* 缩进
|
|
108
|
+
* @default 20
|
|
109
|
+
*/
|
|
110
|
+
indent?: number;
|
|
111
|
+
/**
|
|
112
|
+
* 树形属性配置
|
|
113
|
+
*/
|
|
114
|
+
treeProps?: TreeTableTreeProps;
|
|
115
|
+
/**
|
|
116
|
+
* 展开图标
|
|
117
|
+
*/
|
|
118
|
+
expandIcon?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 收起图标
|
|
121
|
+
*/
|
|
122
|
+
collapseIcon?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* TreeTable Emits
|
|
126
|
+
*/
|
|
127
|
+
export interface TreeTableEmits {
|
|
128
|
+
(e: 'row-click', row: any, column: TreeTableColumnConfig, event: MouseEvent): void;
|
|
129
|
+
(e: 'cell-click', row: any, column: TreeTableColumnConfig, cell: HTMLTableCellElement, event: MouseEvent): void;
|
|
130
|
+
(e: 'expand-change', row: any, expanded: boolean): void;
|
|
131
|
+
(e: 'sort-change', sort: {
|
|
132
|
+
prop: string;
|
|
133
|
+
order: 'ascending' | 'descending' | null;
|
|
134
|
+
}): void;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* TreeTable Expose
|
|
138
|
+
*/
|
|
139
|
+
export interface TreeTableExpose {
|
|
140
|
+
/**
|
|
141
|
+
* 展开所有节点
|
|
142
|
+
*/
|
|
143
|
+
expandAll: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* 收起所有节点
|
|
146
|
+
*/
|
|
147
|
+
collapseAll: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* 切换节点展开状态
|
|
150
|
+
*/
|
|
151
|
+
toggleExpand: (row: any) => void;
|
|
152
|
+
/**
|
|
153
|
+
* 展开的节点 key 集合
|
|
154
|
+
*/
|
|
155
|
+
expandedKeys: Set<string | number>;
|
|
156
|
+
/**
|
|
157
|
+
* 列配置
|
|
158
|
+
*/
|
|
159
|
+
columns: TreeTableColumnConfig[];
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* TreeTable 组件实例类型
|
|
163
|
+
*/
|
|
164
|
+
export type TreeTableInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as VirtualScroll } from './index.vue';
|
|
2
|
+
export { VirtualScroll };
|
|
3
|
+
export default VirtualScroll;
|
|
4
|
+
export type VirtualScrollItem = {
|
|
5
|
+
id?: string | number;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
export type VirtualScrollProps = {
|
|
9
|
+
/** 列表数据 */
|
|
10
|
+
items: VirtualScrollItem[];
|
|
11
|
+
/** 每项高度 */
|
|
12
|
+
itemSize: number;
|
|
13
|
+
/** 容器高度 */
|
|
14
|
+
height: number | string;
|
|
15
|
+
/** 缓冲区大小(项数) */
|
|
16
|
+
buffer?: number;
|
|
17
|
+
/** 是否启用虚拟滚动 */
|
|
18
|
+
virtual?: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
interface VirtualScrollItem {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** 列表数据 */
|
|
7
|
+
items: VirtualScrollItem[];
|
|
8
|
+
/** 每项高度 */
|
|
9
|
+
itemSize: number;
|
|
10
|
+
/** 容器高度 */
|
|
11
|
+
height: number | string;
|
|
12
|
+
/** 缓冲区大小(项数) */
|
|
13
|
+
buffer?: number;
|
|
14
|
+
/** 是否启用虚拟滚动 */
|
|
15
|
+
virtual?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
default?(_: {
|
|
21
|
+
item: VirtualScrollItem | {
|
|
22
|
+
index: number;
|
|
23
|
+
id?: string | number;
|
|
24
|
+
};
|
|
25
|
+
index: any;
|
|
26
|
+
}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
containerRef: HTMLDivElement;
|
|
30
|
+
};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
35
|
+
scrollToIndex: (index: number) => void;
|
|
36
|
+
scrollToBottom: () => void;
|
|
37
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
38
|
+
scroll: (scrollTop: number) => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
onScroll?: ((scrollTop: number) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
height: number | string;
|
|
43
|
+
items: VirtualScrollItem[];
|
|
44
|
+
itemSize: number;
|
|
45
|
+
buffer: number;
|
|
46
|
+
virtual: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
48
|
+
containerRef: HTMLDivElement;
|
|
49
|
+
}, HTMLDivElement>;
|
|
50
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
51
|
+
export default _default;
|
|
52
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export { default as Tag } from './Tag/index.vue';
|
|
2
|
+
export { default as Card } from './Card/index.vue';
|
|
3
|
+
export { default as Progress } from './Progress/index.vue';
|
|
4
|
+
export { default as Pagination } from './Pagination/index.vue';
|
|
5
|
+
export { default as DynamicTable } from './DynamicTable/index.vue';
|
|
6
|
+
export { default as Tree } from './Tree/index.vue';
|
|
7
|
+
export { default as Empty } from './Empty/index.vue';
|
|
8
|
+
export { default as Timeline } from './Timeline/index.vue';
|
|
9
|
+
export { default as TimelineItem } from './Timeline/TimelineItem.vue';
|
|
10
|
+
export { default as Carousel } from './Carousel/index.vue';
|
|
11
|
+
export { default as CarouselItem } from './Carousel/CarouselItem.vue';
|
|
12
|
+
export { default as Table } from './Table/index.vue';
|
|
13
|
+
export { default as TableColumn } from './Table/TableColumn.vue';
|
|
14
|
+
export { default as TreeTable } from './TreeTable/index.vue';
|
|
15
|
+
export { default as TreeTableColumn } from './TreeTable/TreeTableColumn.vue';
|
|
16
|
+
export { default as Avatar } from './Avatar/index.vue';
|
|
17
|
+
export { default as Descriptions } from './Descriptions/index.vue';
|
|
18
|
+
export { default as DescriptionsItem } from './Descriptions/DescriptionsItem.vue';
|
|
19
|
+
export { default as Scrollbar } from './Scrollbar/index.vue';
|
|
20
|
+
export { Collapse, CollapseItem } from './Collapse';
|
|
21
|
+
export { default as Image } from './Image/index.vue';
|
|
22
|
+
export { default as Calendar } from './Calendar/index.vue';
|
|
23
|
+
export { default as QRCode } from './QRCode/index.vue';
|
|
24
|
+
export { default as VirtualScroll } from './VirtualScroll/index.vue';
|
|
25
|
+
export { default as InfiniteScroll } from './InfiniteScroll/index.vue';
|
|
26
|
+
export type { TagProps } from './Tag';
|
|
27
|
+
export type { CardProps } from './Card';
|
|
28
|
+
export type { ProgressProps } from './Progress';
|
|
29
|
+
export type { DynamicTableProps, TableColumn } from './DynamicTable';
|
|
30
|
+
export type { TreeProps, TreeNodeData, TreePropsConfig, TreeEmits, TreeStore } from './Tree';
|
|
31
|
+
export type { EmptyProps } from './Empty';
|
|
32
|
+
export type { PaginationProps, PaginationEmits } from './Pagination';
|
|
33
|
+
export type { TimelineProps, TimelineItemProps } from './Timeline';
|
|
34
|
+
export type { CarouselProps, CarouselItemProps, CarouselEmits, CarouselInstance } from './Carousel';
|
|
35
|
+
export type { TreeTableColumnConfig, TreeTableProps } from './TreeTable';
|
|
36
|
+
export type { CollapseProps, CollapseItemProps } from './Collapse';
|
|
37
|
+
export type { ImageProps } from './Image';
|
|
38
|
+
export type { CalendarProps } from './Calendar';
|
|
39
|
+
export type { QRCodeProps } from './QRCode';
|
|
40
|
+
export type { VirtualScrollItem, VirtualScrollProps } from './VirtualScroll';
|
|
41
|
+
export type { InfiniteScrollProps } from './InfiniteScroll';
|
|
42
|
+
export { TreeNode } from './Tree';
|