@xn-lib/component 0.1.36 → 0.1.41
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/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/cascader/index.vue.d.ts +2 -2
- package/dist/types/editable-textarea/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/list-card/index.d.ts +4 -0
- package/dist/types/list-card/index.vue.d.ts +245 -0
- package/dist/types/list-card/props.d.ts +88 -0
- package/dist/types/select-input/index.vue.d.ts +1 -1
- package/dist/types/table/composables/index.d.ts +10 -0
- package/dist/types/table/composables/store.d.ts +181 -182
- package/dist/types/table/composables/useAutoHeight.d.ts +6 -0
- package/dist/types/table/composables/useColumns.d.ts +11 -0
- package/dist/types/table/composables/useFilter.d.ts +7 -0
- package/dist/types/table/composables/useModal.d.ts +25 -0
- package/dist/types/table/composables/useModalHandlers.d.ts +5 -0
- package/dist/types/table/composables/usePagination.d.ts +11 -0
- package/dist/types/table/composables/useRequest.d.ts +14 -0
- package/dist/types/table/composables/useSearch.d.ts +9 -0
- package/dist/types/table/composables/useSelection.d.ts +22 -0
- package/dist/types/table/composables/useSelectionSync.d.ts +4 -0
- package/package.json +1 -1
|
@@ -287,11 +287,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
287
287
|
}>, {
|
|
288
288
|
readonly disabled: boolean;
|
|
289
289
|
readonly filter: import("../types/cascader").Filter;
|
|
290
|
+
readonly showCheckbox: boolean;
|
|
290
291
|
readonly modelValue: CascaderValue | null;
|
|
291
292
|
readonly size: "small" | "default" | "large";
|
|
292
|
-
readonly showCheckbox: boolean;
|
|
293
293
|
readonly onLoad: import("../types/cascader").OnLoad;
|
|
294
|
-
readonly placeholder: string;
|
|
295
294
|
readonly getColumnStyle: (detail: {
|
|
296
295
|
level: number;
|
|
297
296
|
}) => string | Record<string, any>;
|
|
@@ -301,6 +300,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
301
300
|
readonly labelField: string;
|
|
302
301
|
readonly separator: string;
|
|
303
302
|
readonly options: CascaderOption[];
|
|
303
|
+
readonly placeholder: string;
|
|
304
304
|
readonly clearable: boolean;
|
|
305
305
|
readonly filterable: boolean;
|
|
306
306
|
readonly expandTrigger: import("../types/cascader").ExpandTrigger;
|
|
@@ -177,9 +177,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
177
177
|
}>, {
|
|
178
178
|
readonly disabled: boolean;
|
|
179
179
|
readonly modelValue: import("../types").EditableTextareaModelValue;
|
|
180
|
-
readonly placeholder: string;
|
|
181
180
|
readonly maxHeight: number;
|
|
182
181
|
readonly onEnter: import("../types").KeyboardEventHandler;
|
|
182
|
+
readonly placeholder: string;
|
|
183
183
|
readonly maxlength: number;
|
|
184
184
|
readonly readonly: boolean;
|
|
185
185
|
readonly autoHeight: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ import XnFormList from './form-list/index';
|
|
|
13
13
|
import XnTable from './table/index';
|
|
14
14
|
import XnModal from './modal/index';
|
|
15
15
|
import XnSelectInput from './select-input/index';
|
|
16
|
-
|
|
16
|
+
import XnListCard from './list-card/index';
|
|
17
|
+
export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea, XnTimeRangePicker, XnTextRuleConfig, XnFormList, XnTable, XnModal, XnSelectInput, XnListCard };
|
|
17
18
|
export declare const components: Record<string, Component>;
|
|
18
19
|
export type { CascaderProps } from './cascader/props';
|
|
19
20
|
export type { TagProps } from './tag/props';
|
|
@@ -25,6 +26,7 @@ export type { TextRuleConfigProps } from './text-rule-config/props';
|
|
|
25
26
|
export type { FormListProps, FormListRow, FormListDefaultRow } from './form-list/props';
|
|
26
27
|
export type { SelectInputProps } from './select-input/props';
|
|
27
28
|
export type { SelectInputValue, SelectInputInst } from './types/select-input';
|
|
29
|
+
export type { ListCardProps } from './list-card/props';
|
|
28
30
|
export { useFormList, useFormListActions, useFormListLayout, useFormListRowForms, useFormListUidSync, generateUid, cssLength, getFormListRowKey, ensureRowUids, stripUidRow } from './form-list/index';
|
|
29
31
|
export type { FormListExpose, FormListSubmitRow, RowKeyOptions, UseFormListOptions, UseFormListReturn } from './form-list/index';
|
|
30
32
|
export * from './types';
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import 'vue-virtual-scroller';
|
|
2
|
+
declare function handleAddClick(): void;
|
|
3
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_37: {
|
|
4
|
+
item: any;
|
|
5
|
+
index: any;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
}, __VLS_39: {
|
|
8
|
+
item: any;
|
|
9
|
+
index: any;
|
|
10
|
+
}, __VLS_53: {
|
|
11
|
+
item: any;
|
|
12
|
+
index: number;
|
|
13
|
+
selected: boolean;
|
|
14
|
+
}, __VLS_55: {
|
|
15
|
+
item: any;
|
|
16
|
+
index: number;
|
|
17
|
+
}, __VLS_68: {}, __VLS_70: {
|
|
18
|
+
add: typeof handleAddClick;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
title?: (props: typeof __VLS_1) => any;
|
|
22
|
+
} & {
|
|
23
|
+
search?: (props: typeof __VLS_3) => any;
|
|
24
|
+
} & {
|
|
25
|
+
item?: (props: typeof __VLS_37) => any;
|
|
26
|
+
} & {
|
|
27
|
+
'item-actions'?: (props: typeof __VLS_39) => any;
|
|
28
|
+
} & {
|
|
29
|
+
item?: (props: typeof __VLS_53) => any;
|
|
30
|
+
} & {
|
|
31
|
+
'item-actions'?: (props: typeof __VLS_55) => any;
|
|
32
|
+
} & {
|
|
33
|
+
empty?: (props: typeof __VLS_68) => any;
|
|
34
|
+
} & {
|
|
35
|
+
footer?: (props: typeof __VLS_70) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
38
|
+
readonly title: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "";
|
|
41
|
+
};
|
|
42
|
+
readonly data: {
|
|
43
|
+
readonly type: import("vue").PropType<any[]>;
|
|
44
|
+
readonly default: () => never[];
|
|
45
|
+
};
|
|
46
|
+
readonly remoteMethod: {
|
|
47
|
+
readonly type: import("vue").PropType<(params: Record<string, any>) => Promise<import("./props").RemoteMethodResult>>;
|
|
48
|
+
readonly default: undefined;
|
|
49
|
+
};
|
|
50
|
+
readonly remote: {
|
|
51
|
+
readonly type: BooleanConstructor;
|
|
52
|
+
readonly default: false;
|
|
53
|
+
};
|
|
54
|
+
readonly immediate: {
|
|
55
|
+
readonly type: BooleanConstructor;
|
|
56
|
+
readonly default: true;
|
|
57
|
+
};
|
|
58
|
+
readonly searchKey: {
|
|
59
|
+
readonly type: StringConstructor;
|
|
60
|
+
readonly default: "name";
|
|
61
|
+
};
|
|
62
|
+
readonly searchPlaceholder: {
|
|
63
|
+
readonly type: StringConstructor;
|
|
64
|
+
readonly default: "请输入搜索内容";
|
|
65
|
+
};
|
|
66
|
+
readonly paginationKey: {
|
|
67
|
+
readonly type: StringConstructor;
|
|
68
|
+
readonly default: "page";
|
|
69
|
+
};
|
|
70
|
+
readonly pageSize: {
|
|
71
|
+
readonly type: NumberConstructor;
|
|
72
|
+
readonly default: 20;
|
|
73
|
+
};
|
|
74
|
+
readonly pageSizeKey: {
|
|
75
|
+
readonly type: StringConstructor;
|
|
76
|
+
readonly default: "pageSize";
|
|
77
|
+
};
|
|
78
|
+
readonly virtual: {
|
|
79
|
+
readonly type: BooleanConstructor;
|
|
80
|
+
readonly default: false;
|
|
81
|
+
};
|
|
82
|
+
readonly idKey: {
|
|
83
|
+
readonly type: StringConstructor;
|
|
84
|
+
readonly default: "id";
|
|
85
|
+
};
|
|
86
|
+
readonly nameKey: {
|
|
87
|
+
readonly type: StringConstructor;
|
|
88
|
+
readonly default: "name";
|
|
89
|
+
};
|
|
90
|
+
readonly itemHeight: {
|
|
91
|
+
readonly type: NumberConstructor;
|
|
92
|
+
readonly default: 40;
|
|
93
|
+
};
|
|
94
|
+
readonly addText: {
|
|
95
|
+
readonly type: StringConstructor;
|
|
96
|
+
readonly default: "添加";
|
|
97
|
+
};
|
|
98
|
+
readonly emptyText: {
|
|
99
|
+
readonly type: StringConstructor;
|
|
100
|
+
readonly default: "暂无数据";
|
|
101
|
+
};
|
|
102
|
+
readonly modelValue: {
|
|
103
|
+
readonly type: import("vue").PropType<string | number>;
|
|
104
|
+
readonly default: undefined;
|
|
105
|
+
};
|
|
106
|
+
readonly showHeader: {
|
|
107
|
+
readonly type: BooleanConstructor;
|
|
108
|
+
readonly default: true;
|
|
109
|
+
};
|
|
110
|
+
readonly showSearch: {
|
|
111
|
+
readonly type: BooleanConstructor;
|
|
112
|
+
readonly default: true;
|
|
113
|
+
};
|
|
114
|
+
readonly showFooter: {
|
|
115
|
+
readonly type: BooleanConstructor;
|
|
116
|
+
readonly default: true;
|
|
117
|
+
};
|
|
118
|
+
}>, {
|
|
119
|
+
refresh(): Promise<void>;
|
|
120
|
+
loadMore(): Promise<void>;
|
|
121
|
+
clearSearch(): void;
|
|
122
|
+
getSelectedValue(): any;
|
|
123
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
124
|
+
search: (keyword: string) => any;
|
|
125
|
+
select: (value: any, index: number, item: any) => any;
|
|
126
|
+
"update:modelValue": (value: any) => any;
|
|
127
|
+
add: () => any;
|
|
128
|
+
"scroll-bottom": () => any;
|
|
129
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
130
|
+
readonly title: {
|
|
131
|
+
readonly type: StringConstructor;
|
|
132
|
+
readonly default: "";
|
|
133
|
+
};
|
|
134
|
+
readonly data: {
|
|
135
|
+
readonly type: import("vue").PropType<any[]>;
|
|
136
|
+
readonly default: () => never[];
|
|
137
|
+
};
|
|
138
|
+
readonly remoteMethod: {
|
|
139
|
+
readonly type: import("vue").PropType<(params: Record<string, any>) => Promise<import("./props").RemoteMethodResult>>;
|
|
140
|
+
readonly default: undefined;
|
|
141
|
+
};
|
|
142
|
+
readonly remote: {
|
|
143
|
+
readonly type: BooleanConstructor;
|
|
144
|
+
readonly default: false;
|
|
145
|
+
};
|
|
146
|
+
readonly immediate: {
|
|
147
|
+
readonly type: BooleanConstructor;
|
|
148
|
+
readonly default: true;
|
|
149
|
+
};
|
|
150
|
+
readonly searchKey: {
|
|
151
|
+
readonly type: StringConstructor;
|
|
152
|
+
readonly default: "name";
|
|
153
|
+
};
|
|
154
|
+
readonly searchPlaceholder: {
|
|
155
|
+
readonly type: StringConstructor;
|
|
156
|
+
readonly default: "请输入搜索内容";
|
|
157
|
+
};
|
|
158
|
+
readonly paginationKey: {
|
|
159
|
+
readonly type: StringConstructor;
|
|
160
|
+
readonly default: "page";
|
|
161
|
+
};
|
|
162
|
+
readonly pageSize: {
|
|
163
|
+
readonly type: NumberConstructor;
|
|
164
|
+
readonly default: 20;
|
|
165
|
+
};
|
|
166
|
+
readonly pageSizeKey: {
|
|
167
|
+
readonly type: StringConstructor;
|
|
168
|
+
readonly default: "pageSize";
|
|
169
|
+
};
|
|
170
|
+
readonly virtual: {
|
|
171
|
+
readonly type: BooleanConstructor;
|
|
172
|
+
readonly default: false;
|
|
173
|
+
};
|
|
174
|
+
readonly idKey: {
|
|
175
|
+
readonly type: StringConstructor;
|
|
176
|
+
readonly default: "id";
|
|
177
|
+
};
|
|
178
|
+
readonly nameKey: {
|
|
179
|
+
readonly type: StringConstructor;
|
|
180
|
+
readonly default: "name";
|
|
181
|
+
};
|
|
182
|
+
readonly itemHeight: {
|
|
183
|
+
readonly type: NumberConstructor;
|
|
184
|
+
readonly default: 40;
|
|
185
|
+
};
|
|
186
|
+
readonly addText: {
|
|
187
|
+
readonly type: StringConstructor;
|
|
188
|
+
readonly default: "添加";
|
|
189
|
+
};
|
|
190
|
+
readonly emptyText: {
|
|
191
|
+
readonly type: StringConstructor;
|
|
192
|
+
readonly default: "暂无数据";
|
|
193
|
+
};
|
|
194
|
+
readonly modelValue: {
|
|
195
|
+
readonly type: import("vue").PropType<string | number>;
|
|
196
|
+
readonly default: undefined;
|
|
197
|
+
};
|
|
198
|
+
readonly showHeader: {
|
|
199
|
+
readonly type: BooleanConstructor;
|
|
200
|
+
readonly default: true;
|
|
201
|
+
};
|
|
202
|
+
readonly showSearch: {
|
|
203
|
+
readonly type: BooleanConstructor;
|
|
204
|
+
readonly default: true;
|
|
205
|
+
};
|
|
206
|
+
readonly showFooter: {
|
|
207
|
+
readonly type: BooleanConstructor;
|
|
208
|
+
readonly default: true;
|
|
209
|
+
};
|
|
210
|
+
}>> & Readonly<{
|
|
211
|
+
onSearch?: ((keyword: string) => any) | undefined;
|
|
212
|
+
onSelect?: ((value: any, index: number, item: any) => any) | undefined;
|
|
213
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
214
|
+
onAdd?: (() => any) | undefined;
|
|
215
|
+
"onScroll-bottom"?: (() => any) | undefined;
|
|
216
|
+
}>, {
|
|
217
|
+
readonly data: any[];
|
|
218
|
+
readonly title: string;
|
|
219
|
+
readonly modelValue: string | number;
|
|
220
|
+
readonly remote: boolean;
|
|
221
|
+
readonly remoteMethod: (params: Record<string, any>) => Promise<import("./props").RemoteMethodResult>;
|
|
222
|
+
readonly emptyText: string;
|
|
223
|
+
readonly showFooter: boolean;
|
|
224
|
+
readonly showHeader: boolean;
|
|
225
|
+
readonly virtual: boolean;
|
|
226
|
+
readonly itemHeight: number;
|
|
227
|
+
readonly immediate: boolean;
|
|
228
|
+
readonly pageSize: number;
|
|
229
|
+
readonly showSearch: boolean;
|
|
230
|
+
readonly searchKey: string;
|
|
231
|
+
readonly searchPlaceholder: string;
|
|
232
|
+
readonly paginationKey: string;
|
|
233
|
+
readonly pageSizeKey: string;
|
|
234
|
+
readonly idKey: string;
|
|
235
|
+
readonly nameKey: string;
|
|
236
|
+
readonly addText: string;
|
|
237
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
238
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
239
|
+
declare const _default: typeof __VLS_export;
|
|
240
|
+
export default _default;
|
|
241
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
242
|
+
new (): {
|
|
243
|
+
$slots: S;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface RemoteMethodResult {
|
|
3
|
+
list: any[];
|
|
4
|
+
total: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const listCardProps: {
|
|
7
|
+
readonly title: {
|
|
8
|
+
readonly type: StringConstructor;
|
|
9
|
+
readonly default: "";
|
|
10
|
+
};
|
|
11
|
+
readonly data: {
|
|
12
|
+
readonly type: PropType<any[]>;
|
|
13
|
+
readonly default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
readonly remoteMethod: {
|
|
16
|
+
readonly type: PropType<(params: Record<string, any>) => Promise<RemoteMethodResult>>;
|
|
17
|
+
readonly default: undefined;
|
|
18
|
+
};
|
|
19
|
+
readonly remote: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly immediate: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
27
|
+
readonly searchKey: {
|
|
28
|
+
readonly type: StringConstructor;
|
|
29
|
+
readonly default: "name";
|
|
30
|
+
};
|
|
31
|
+
readonly searchPlaceholder: {
|
|
32
|
+
readonly type: StringConstructor;
|
|
33
|
+
readonly default: "请输入搜索内容";
|
|
34
|
+
};
|
|
35
|
+
readonly paginationKey: {
|
|
36
|
+
readonly type: StringConstructor;
|
|
37
|
+
readonly default: "page";
|
|
38
|
+
};
|
|
39
|
+
readonly pageSize: {
|
|
40
|
+
readonly type: NumberConstructor;
|
|
41
|
+
readonly default: 20;
|
|
42
|
+
};
|
|
43
|
+
readonly pageSizeKey: {
|
|
44
|
+
readonly type: StringConstructor;
|
|
45
|
+
readonly default: "pageSize";
|
|
46
|
+
};
|
|
47
|
+
readonly virtual: {
|
|
48
|
+
readonly type: BooleanConstructor;
|
|
49
|
+
readonly default: false;
|
|
50
|
+
};
|
|
51
|
+
readonly idKey: {
|
|
52
|
+
readonly type: StringConstructor;
|
|
53
|
+
readonly default: "id";
|
|
54
|
+
};
|
|
55
|
+
readonly nameKey: {
|
|
56
|
+
readonly type: StringConstructor;
|
|
57
|
+
readonly default: "name";
|
|
58
|
+
};
|
|
59
|
+
readonly itemHeight: {
|
|
60
|
+
readonly type: NumberConstructor;
|
|
61
|
+
readonly default: 40;
|
|
62
|
+
};
|
|
63
|
+
readonly addText: {
|
|
64
|
+
readonly type: StringConstructor;
|
|
65
|
+
readonly default: "添加";
|
|
66
|
+
};
|
|
67
|
+
readonly emptyText: {
|
|
68
|
+
readonly type: StringConstructor;
|
|
69
|
+
readonly default: "暂无数据";
|
|
70
|
+
};
|
|
71
|
+
readonly modelValue: {
|
|
72
|
+
readonly type: PropType<string | number>;
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
};
|
|
75
|
+
readonly showHeader: {
|
|
76
|
+
readonly type: BooleanConstructor;
|
|
77
|
+
readonly default: true;
|
|
78
|
+
};
|
|
79
|
+
readonly showSearch: {
|
|
80
|
+
readonly type: BooleanConstructor;
|
|
81
|
+
readonly default: true;
|
|
82
|
+
};
|
|
83
|
+
readonly showFooter: {
|
|
84
|
+
readonly type: BooleanConstructor;
|
|
85
|
+
readonly default: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type ListCardProps = ExtractPropTypes<typeof listCardProps>;
|
|
@@ -51,8 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
51
51
|
onChange?: ((val: SelectInputValue) => any) | undefined;
|
|
52
52
|
}>, {
|
|
53
53
|
readonly modelValue: import("./props").SelectInputValue;
|
|
54
|
-
readonly placeholder: string;
|
|
55
54
|
readonly options: any[];
|
|
55
|
+
readonly placeholder: string;
|
|
56
56
|
readonly stripWhitespace: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
58
58
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
export { useTableProvider, useTableStore } from './store';
|
|
2
2
|
export type { TableStore } from './store';
|
|
3
|
+
export { useSelection } from './useSelection';
|
|
4
|
+
export { usePagination } from './usePagination';
|
|
5
|
+
export { useSearch } from './useSearch';
|
|
6
|
+
export { useColumns } from './useColumns';
|
|
7
|
+
export { useRequest } from './useRequest';
|
|
8
|
+
export { useFilter } from './useFilter';
|
|
9
|
+
export { useModal } from './useModal';
|
|
10
|
+
export { useAutoHeight } from './useAutoHeight';
|
|
11
|
+
export { useSelectionSync } from './useSelectionSync';
|
|
12
|
+
export { useModalHandlers } from './useModalHandlers';
|