@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,84 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface TableColumn {
|
|
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: TableColumn, cellValue: any, index: number) => string;
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
children?: TableColumn[];
|
|
13
|
+
}
|
|
14
|
+
export declare const dynamicTableProps: {
|
|
15
|
+
readonly data: {
|
|
16
|
+
readonly type: PropType<any[]>;
|
|
17
|
+
readonly default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
readonly columns: {
|
|
20
|
+
readonly type: PropType<TableColumn[]>;
|
|
21
|
+
readonly default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
readonly height: {
|
|
24
|
+
readonly type: PropType<string | number>;
|
|
25
|
+
readonly default: undefined;
|
|
26
|
+
};
|
|
27
|
+
readonly maxHeight: {
|
|
28
|
+
readonly type: PropType<string | number>;
|
|
29
|
+
readonly default: undefined;
|
|
30
|
+
};
|
|
31
|
+
readonly rowKey: {
|
|
32
|
+
readonly type: PropType<string | ((row: any) => string)>;
|
|
33
|
+
readonly default: undefined;
|
|
34
|
+
};
|
|
35
|
+
readonly loading: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: false;
|
|
38
|
+
};
|
|
39
|
+
readonly border: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
43
|
+
readonly stripe: {
|
|
44
|
+
readonly type: BooleanConstructor;
|
|
45
|
+
readonly default: false;
|
|
46
|
+
};
|
|
47
|
+
readonly showHeader: {
|
|
48
|
+
readonly type: BooleanConstructor;
|
|
49
|
+
readonly default: true;
|
|
50
|
+
};
|
|
51
|
+
readonly showIndex: {
|
|
52
|
+
readonly type: BooleanConstructor;
|
|
53
|
+
readonly default: false;
|
|
54
|
+
};
|
|
55
|
+
readonly showOperation: {
|
|
56
|
+
readonly type: BooleanConstructor;
|
|
57
|
+
readonly default: false;
|
|
58
|
+
};
|
|
59
|
+
readonly showAddButton: {
|
|
60
|
+
readonly type: BooleanConstructor;
|
|
61
|
+
readonly default: false;
|
|
62
|
+
};
|
|
63
|
+
readonly operationWidth: {
|
|
64
|
+
readonly type: PropType<string | number>;
|
|
65
|
+
readonly default: 120;
|
|
66
|
+
};
|
|
67
|
+
readonly operationLabel: {
|
|
68
|
+
readonly type: StringConstructor;
|
|
69
|
+
readonly default: "操作";
|
|
70
|
+
};
|
|
71
|
+
readonly emptyText: {
|
|
72
|
+
readonly type: StringConstructor;
|
|
73
|
+
readonly default: "暂无数据";
|
|
74
|
+
};
|
|
75
|
+
readonly defaultSort: {
|
|
76
|
+
readonly type: PropType<{
|
|
77
|
+
prop: string;
|
|
78
|
+
order: "ascending" | "descending";
|
|
79
|
+
}>;
|
|
80
|
+
readonly default: undefined;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type DynamicTableProps = ExtractPropTypes<typeof dynamicTableProps>;
|
|
84
|
+
export { default as DynamicTable } from './index.vue';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export interface TableColumn {
|
|
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: TableColumn, cellValue: any, index: number) => string;
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
children?: TableColumn[];
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
data: any[];
|
|
15
|
+
columns: TableColumn[];
|
|
16
|
+
height?: string | number;
|
|
17
|
+
maxHeight?: string | number;
|
|
18
|
+
rowKey?: string | ((row: any) => string);
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
border?: boolean;
|
|
21
|
+
stripe?: boolean;
|
|
22
|
+
showHeader?: boolean;
|
|
23
|
+
showIndex?: boolean;
|
|
24
|
+
showOperation?: boolean;
|
|
25
|
+
showAddButton?: boolean;
|
|
26
|
+
operationWidth?: string | number;
|
|
27
|
+
operationLabel?: string;
|
|
28
|
+
emptyText?: string;
|
|
29
|
+
defaultSort?: {
|
|
30
|
+
prop: string;
|
|
31
|
+
order: 'ascending' | 'descending';
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
declare function __VLS_template(): {
|
|
35
|
+
attrs: Partial<{}>;
|
|
36
|
+
slots: Partial<Record<`column-${string}`, (_: {
|
|
37
|
+
row: any;
|
|
38
|
+
column: TableColumn;
|
|
39
|
+
$index: number;
|
|
40
|
+
}) => any>> & {
|
|
41
|
+
toolbar?(_: {}): any;
|
|
42
|
+
operation?(_: {
|
|
43
|
+
row: any;
|
|
44
|
+
$index: number;
|
|
45
|
+
deleteRow: () => void;
|
|
46
|
+
}): any;
|
|
47
|
+
empty?(_: {}): any;
|
|
48
|
+
};
|
|
49
|
+
refs: {};
|
|
50
|
+
rootEl: HTMLDivElement;
|
|
51
|
+
};
|
|
52
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
53
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
54
|
+
clearSelection: () => void;
|
|
55
|
+
getSelection: () => any[];
|
|
56
|
+
sortState: import('vue').Ref<{
|
|
57
|
+
prop: string;
|
|
58
|
+
order: "ascending" | "descending" | null;
|
|
59
|
+
}, {
|
|
60
|
+
prop: string;
|
|
61
|
+
order: "ascending" | "descending" | null;
|
|
62
|
+
} | {
|
|
63
|
+
prop: string;
|
|
64
|
+
order: "ascending" | "descending" | null;
|
|
65
|
+
}>;
|
|
66
|
+
addRow: (rowData?: any) => void;
|
|
67
|
+
deleteRow: (index: number) => void;
|
|
68
|
+
getData: () => any[];
|
|
69
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
70
|
+
"sort-change": (sort: {
|
|
71
|
+
prop: string;
|
|
72
|
+
order: "ascending" | "descending" | null;
|
|
73
|
+
}) => any;
|
|
74
|
+
"row-click": (row: any, column: TableColumn, event: MouseEvent) => any;
|
|
75
|
+
"row-dblclick": (row: any, column: TableColumn, event: MouseEvent) => any;
|
|
76
|
+
"selection-change": (selection: any[]) => any;
|
|
77
|
+
"select-all": (selection: any[]) => any;
|
|
78
|
+
"cell-click": (row: any, column: TableColumn, cell: HTMLTableCellElement, event: MouseEvent) => any;
|
|
79
|
+
"add-row": (newRow: any) => any;
|
|
80
|
+
"delete-row": (row: any, index: number) => any;
|
|
81
|
+
"update:data": (data: any[]) => any;
|
|
82
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
83
|
+
"onSort-change"?: ((sort: {
|
|
84
|
+
prop: string;
|
|
85
|
+
order: "ascending" | "descending" | null;
|
|
86
|
+
}) => any) | undefined;
|
|
87
|
+
"onRow-click"?: ((row: any, column: TableColumn, event: MouseEvent) => any) | undefined;
|
|
88
|
+
"onRow-dblclick"?: ((row: any, column: TableColumn, event: MouseEvent) => any) | undefined;
|
|
89
|
+
"onSelection-change"?: ((selection: any[]) => any) | undefined;
|
|
90
|
+
"onSelect-all"?: ((selection: any[]) => any) | undefined;
|
|
91
|
+
"onCell-click"?: ((row: any, column: TableColumn, cell: HTMLTableCellElement, event: MouseEvent) => any) | undefined;
|
|
92
|
+
"onAdd-row"?: ((newRow: any) => any) | undefined;
|
|
93
|
+
"onDelete-row"?: ((row: any, index: number) => any) | undefined;
|
|
94
|
+
"onUpdate:data"?: ((data: any[]) => any) | undefined;
|
|
95
|
+
}>, {
|
|
96
|
+
data: any[];
|
|
97
|
+
border: boolean;
|
|
98
|
+
columns: TableColumn[];
|
|
99
|
+
loading: boolean;
|
|
100
|
+
stripe: boolean;
|
|
101
|
+
showHeader: boolean;
|
|
102
|
+
showIndex: boolean;
|
|
103
|
+
showOperation: boolean;
|
|
104
|
+
showAddButton: boolean;
|
|
105
|
+
operationWidth: string | number;
|
|
106
|
+
operationLabel: string;
|
|
107
|
+
emptyText: string;
|
|
108
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
109
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
110
|
+
export default _default;
|
|
111
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
112
|
+
new (): {
|
|
113
|
+
$slots: S;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DynamicTable 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* DynamicTable 列配置
|
|
6
|
+
*/
|
|
7
|
+
export interface DynamicTableColumn {
|
|
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: DynamicTableColumn, cellValue: any, index: number) => string;
|
|
40
|
+
/**
|
|
41
|
+
* 是否可编辑
|
|
42
|
+
*/
|
|
43
|
+
editable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 子列(多级表头)
|
|
46
|
+
*/
|
|
47
|
+
children?: DynamicTableColumn[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* DynamicTable Props
|
|
51
|
+
*/
|
|
52
|
+
export interface DynamicTableProps {
|
|
53
|
+
/**
|
|
54
|
+
* 表格数据
|
|
55
|
+
*/
|
|
56
|
+
data: any[];
|
|
57
|
+
/**
|
|
58
|
+
* 列配置
|
|
59
|
+
*/
|
|
60
|
+
columns: DynamicTableColumn[];
|
|
61
|
+
/**
|
|
62
|
+
* 表格高度
|
|
63
|
+
*/
|
|
64
|
+
height?: string | number;
|
|
65
|
+
/**
|
|
66
|
+
* 表格最大高度
|
|
67
|
+
*/
|
|
68
|
+
maxHeight?: string | number;
|
|
69
|
+
/**
|
|
70
|
+
* 行数据的 Key
|
|
71
|
+
*/
|
|
72
|
+
rowKey?: string | ((row: any) => string);
|
|
73
|
+
/**
|
|
74
|
+
* 是否加载中
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
loading?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 是否显示边框
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
border?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* 是否斑马纹
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
stripe?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 是否显示表头
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
showHeader?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 是否显示序号列
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
showIndex?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 是否显示操作列
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
showOperation?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* 是否显示新增按钮
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
showAddButton?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 操作列宽度
|
|
110
|
+
* @default 120
|
|
111
|
+
*/
|
|
112
|
+
operationWidth?: string | number;
|
|
113
|
+
/**
|
|
114
|
+
* 操作列标题
|
|
115
|
+
* @default '操作'
|
|
116
|
+
*/
|
|
117
|
+
operationLabel?: string;
|
|
118
|
+
/**
|
|
119
|
+
* 空数据文案
|
|
120
|
+
* @default '暂无数据'
|
|
121
|
+
*/
|
|
122
|
+
emptyText?: string;
|
|
123
|
+
/**
|
|
124
|
+
* 默认排序
|
|
125
|
+
*/
|
|
126
|
+
defaultSort?: {
|
|
127
|
+
prop: string;
|
|
128
|
+
order: 'ascending' | 'descending';
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* DynamicTable Emits
|
|
133
|
+
*/
|
|
134
|
+
export interface DynamicTableEmits {
|
|
135
|
+
(e: 'sort-change', sort: {
|
|
136
|
+
prop: string;
|
|
137
|
+
order: 'ascending' | 'descending' | null;
|
|
138
|
+
}): void;
|
|
139
|
+
(e: 'row-click', row: any, column: DynamicTableColumn, event: MouseEvent): void;
|
|
140
|
+
(e: 'row-dblclick', row: any, column: DynamicTableColumn, event: MouseEvent): void;
|
|
141
|
+
(e: 'selection-change', selection: any[]): void;
|
|
142
|
+
(e: 'select-all', selection: any[]): void;
|
|
143
|
+
(e: 'cell-click', row: any, column: DynamicTableColumn, cell: HTMLTableCellElement, event: MouseEvent): void;
|
|
144
|
+
(e: 'add-row', newRow: any): void;
|
|
145
|
+
(e: 'delete-row', row: any, index: number): void;
|
|
146
|
+
(e: 'update:data', data: any[]): void;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* DynamicTable Expose
|
|
150
|
+
*/
|
|
151
|
+
export interface DynamicTableExpose {
|
|
152
|
+
/**
|
|
153
|
+
* 清空选择
|
|
154
|
+
*/
|
|
155
|
+
clearSelection: () => void;
|
|
156
|
+
/**
|
|
157
|
+
* 获取选中行
|
|
158
|
+
*/
|
|
159
|
+
getSelection: () => any[];
|
|
160
|
+
/**
|
|
161
|
+
* 排序状态
|
|
162
|
+
*/
|
|
163
|
+
sortState: {
|
|
164
|
+
prop: string;
|
|
165
|
+
order: 'ascending' | 'descending' | null;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* 新增一行
|
|
169
|
+
*/
|
|
170
|
+
addRow: (rowData?: any) => void;
|
|
171
|
+
/**
|
|
172
|
+
* 删除行
|
|
173
|
+
*/
|
|
174
|
+
deleteRow: (index: number) => void;
|
|
175
|
+
/**
|
|
176
|
+
* 获取当前数据
|
|
177
|
+
*/
|
|
178
|
+
getData: () => any[];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* DynamicTable 组件实例类型
|
|
182
|
+
*/
|
|
183
|
+
export type DynamicTableInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 图片地址 */
|
|
4
|
+
image?: string;
|
|
5
|
+
/** 图片尺寸 */
|
|
6
|
+
imageSize?: number;
|
|
7
|
+
/** 描述文字 */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** 尺寸 */
|
|
10
|
+
size?: ComponentSize;
|
|
11
|
+
};
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: {
|
|
15
|
+
image?(_: {}): any;
|
|
16
|
+
description?(_: {}): any;
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
size: ComponentSize;
|
|
25
|
+
image: string;
|
|
26
|
+
imageSize: number;
|
|
27
|
+
description: string;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as Image } from './index.vue';
|
|
2
|
+
export { Image };
|
|
3
|
+
export default Image;
|
|
4
|
+
export type ImageProps = {
|
|
5
|
+
/** 图片地址 */
|
|
6
|
+
src: string;
|
|
7
|
+
/** 预览图片列表 */
|
|
8
|
+
previewList?: string[];
|
|
9
|
+
/** 初始预览索引 */
|
|
10
|
+
initialIndex?: number;
|
|
11
|
+
/** 是否可预览 */
|
|
12
|
+
preview?: boolean;
|
|
13
|
+
/** 图片宽度 */
|
|
14
|
+
width?: number | string;
|
|
15
|
+
/** 图片高度 */
|
|
16
|
+
height?: number | string;
|
|
17
|
+
/** 适应方式 */
|
|
18
|
+
fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
19
|
+
/** 加载失败时显示的图片 */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** 加载时显示的占位图 */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** 懒加载 */
|
|
24
|
+
lazy?: boolean;
|
|
25
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 图片地址 */
|
|
3
|
+
src: string;
|
|
4
|
+
/** 预览图片列表 */
|
|
5
|
+
previewList?: string[];
|
|
6
|
+
/** 初始预览索引 */
|
|
7
|
+
initialIndex?: number;
|
|
8
|
+
/** 是否可预览 */
|
|
9
|
+
preview?: boolean;
|
|
10
|
+
/** 图片宽度 */
|
|
11
|
+
width?: number | string;
|
|
12
|
+
/** 图片高度 */
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/** 适应方式 */
|
|
15
|
+
fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
16
|
+
/** 加载失败时显示的图片 */
|
|
17
|
+
error?: string;
|
|
18
|
+
/** 加载时显示的占位图 */
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/** 懒加载 */
|
|
21
|
+
lazy?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
attrs: Partial<{}>;
|
|
25
|
+
slots: {
|
|
26
|
+
placeholder?(_: {}): any;
|
|
27
|
+
error?(_: {}): any;
|
|
28
|
+
};
|
|
29
|
+
refs: {};
|
|
30
|
+
rootEl: HTMLDivElement;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
load: (e: Event) => any;
|
|
35
|
+
error: (e: Event) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
|
+
onLoad?: ((e: Event) => any) | undefined;
|
|
38
|
+
onError?: ((e: Event) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
lazy: boolean;
|
|
41
|
+
src: string;
|
|
42
|
+
fit: "fill" | "contain" | "cover" | "none" | "scale-down";
|
|
43
|
+
previewList: string[];
|
|
44
|
+
initialIndex: number;
|
|
45
|
+
preview: boolean;
|
|
46
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as InfiniteScroll } from './index.vue';
|
|
2
|
+
export { InfiniteScroll };
|
|
3
|
+
export default InfiniteScroll;
|
|
4
|
+
export type InfiniteScrollProps = {
|
|
5
|
+
/** 是否正在加载 */
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
/** 是否没有更多数据 */
|
|
8
|
+
finished?: boolean;
|
|
9
|
+
/** 是否立即加载 */
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
/** 距离底部触发距离 */
|
|
12
|
+
distance?: number;
|
|
13
|
+
/** 加载提示文字 */
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
/** 完成提示文字 */
|
|
16
|
+
finishedText?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 是否正在加载 */
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
/** 是否没有更多数据 */
|
|
5
|
+
finished?: boolean;
|
|
6
|
+
/** 是否立即加载 */
|
|
7
|
+
immediate?: boolean;
|
|
8
|
+
/** 距离底部触发距离 */
|
|
9
|
+
distance?: number;
|
|
10
|
+
/** 加载提示文字 */
|
|
11
|
+
loadingText?: string;
|
|
12
|
+
/** 完成提示文字 */
|
|
13
|
+
finishedText?: string;
|
|
14
|
+
};
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {
|
|
21
|
+
containerRef: HTMLDivElement;
|
|
22
|
+
observerRef: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
rootEl: HTMLDivElement;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
load: () => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onLoad?: (() => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
loading: boolean;
|
|
33
|
+
immediate: boolean;
|
|
34
|
+
finished: boolean;
|
|
35
|
+
distance: number;
|
|
36
|
+
loadingText: string;
|
|
37
|
+
finishedText: string;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
containerRef: HTMLDivElement;
|
|
40
|
+
observerRef: HTMLDivElement;
|
|
41
|
+
}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
/** Total number of items */
|
|
3
|
+
total?: number;
|
|
4
|
+
/** Number of items per page */
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
/** Current page number */
|
|
7
|
+
currentPage?: number;
|
|
8
|
+
/** Page size options */
|
|
9
|
+
pageSizes?: number[];
|
|
10
|
+
/** Layout of pagination elements */
|
|
11
|
+
layout?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PaginationEmits {
|
|
14
|
+
'update:currentPage': (page: number) => void;
|
|
15
|
+
'update:pageSize': (size: number) => void;
|
|
16
|
+
'current-change': (page: number) => void;
|
|
17
|
+
'size-change': (size: number) => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
total?: number;
|
|
3
|
+
pageSize?: number;
|
|
4
|
+
currentPage?: number;
|
|
5
|
+
pageSizes?: number[];
|
|
6
|
+
layout?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:currentPage": (page: number) => any;
|
|
10
|
+
"update:pageSize": (size: number) => any;
|
|
11
|
+
"current-change": (page: number) => any;
|
|
12
|
+
"size-change": (size: number) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:currentPage"?: ((page: number) => any) | undefined;
|
|
15
|
+
"onUpdate:pageSize"?: ((size: number) => any) | undefined;
|
|
16
|
+
"onCurrent-change"?: ((page: number) => any) | undefined;
|
|
17
|
+
"onSize-change"?: ((size: number) => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
total: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
currentPage: number;
|
|
22
|
+
pageSizes: number[];
|
|
23
|
+
layout: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Pagination Props
|
|
6
|
+
*/
|
|
7
|
+
export interface PaginationProps {
|
|
8
|
+
/**
|
|
9
|
+
* 总条数
|
|
10
|
+
* @default 0
|
|
11
|
+
*/
|
|
12
|
+
total?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 每页条数
|
|
15
|
+
* @default 10
|
|
16
|
+
*/
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* 当前页码
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
currentPage?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 每页条数选项
|
|
25
|
+
* @default [10, 20, 50, 100]
|
|
26
|
+
*/
|
|
27
|
+
pageSizes?: number[];
|
|
28
|
+
/**
|
|
29
|
+
* 布局配置
|
|
30
|
+
* @default 'total, sizes, prev, pager, next, jumper'
|
|
31
|
+
*/
|
|
32
|
+
layout?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Pagination Emits
|
|
36
|
+
*/
|
|
37
|
+
export interface PaginationEmits {
|
|
38
|
+
(e: 'update:currentPage', page: number): void;
|
|
39
|
+
(e: 'update:pageSize', size: number): void;
|
|
40
|
+
(e: 'current-change', page: number): void;
|
|
41
|
+
(e: 'size-change', size: number): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Pagination 组件实例类型
|
|
45
|
+
*/
|
|
46
|
+
export type PaginationInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ProgressProps {
|
|
2
|
+
/** Progress percentage */
|
|
3
|
+
percentage?: number;
|
|
4
|
+
/** Progress type */
|
|
5
|
+
type?: 'line' | 'circle' | 'dashboard';
|
|
6
|
+
/** Progress status */
|
|
7
|
+
status?: '' | 'success' | 'warning' | 'exception';
|
|
8
|
+
/** Stroke width */
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
/** Progress color */
|
|
11
|
+
color?: string | string[] | ((percentage: number) => string);
|
|
12
|
+
/** Circle progress width */
|
|
13
|
+
width?: number;
|
|
14
|
+
/** Whether to show text */
|
|
15
|
+
showText?: boolean;
|
|
16
|
+
}
|