@xn-lib/component 0.1.40 → 0.1.42
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 +6 -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/index.d.ts +6 -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-panel/index.d.ts +5 -0
- package/dist/types/select-panel/index.vue.d.ts +99 -0
- package/dist/types/select-panel/props.d.ts +40 -0
- package/dist/types/text-rule-config/index.vue.d.ts +3 -3
- package/dist/types/text-rule-config/props.d.ts +2 -2
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/text-rule-config.d.ts +14 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ 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
|
+
import XnSelectPanel from './select-panel/index';
|
|
18
|
+
export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea, XnTimeRangePicker, XnTextRuleConfig, XnFormList, XnTable, XnModal, XnSelectInput, XnListCard, XnSelectPanel };
|
|
17
19
|
export declare const components: Record<string, Component>;
|
|
18
20
|
export type { CascaderProps } from './cascader/props';
|
|
19
21
|
export type { TagProps } from './tag/props';
|
|
@@ -22,9 +24,12 @@ export type { EditableTextProps } from './editable-text/props';
|
|
|
22
24
|
export type { EditableTextareaProps } from './editable-textarea/props';
|
|
23
25
|
export type { TimeRangePickerProps, TimeRangeValue, TimeRange } from './time-range-picker/props';
|
|
24
26
|
export type { TextRuleConfigProps } from './text-rule-config/props';
|
|
27
|
+
export type { WildcardOption } from './types/text-rule-config';
|
|
25
28
|
export type { FormListProps, FormListRow, FormListDefaultRow } from './form-list/props';
|
|
26
29
|
export type { SelectInputProps } from './select-input/props';
|
|
27
30
|
export type { SelectInputValue, SelectInputInst } from './types/select-input';
|
|
31
|
+
export type { ListCardProps } from './list-card/props';
|
|
32
|
+
export type { SelectPanelProps } from './select-panel/props';
|
|
28
33
|
export { useFormList, useFormListActions, useFormListLayout, useFormListRowForms, useFormListUidSync, generateUid, cssLength, getFormListRowKey, ensureRowUids, stripUidRow } from './form-list/index';
|
|
29
34
|
export type { FormListExpose, FormListSubmitRow, RowKeyOptions, UseFormListOptions, UseFormListReturn } from './form-list/index';
|
|
30
35
|
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>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
readonly modelValue: {
|
|
3
|
+
readonly type: import("vue").PropType<any[]>;
|
|
4
|
+
readonly default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
readonly max: {
|
|
7
|
+
readonly type: NumberConstructor;
|
|
8
|
+
readonly default: undefined;
|
|
9
|
+
};
|
|
10
|
+
readonly itemKey: {
|
|
11
|
+
readonly type: import("vue").PropType<string | ((item: any) => any)>;
|
|
12
|
+
readonly default: "id";
|
|
13
|
+
};
|
|
14
|
+
readonly itemLabel: {
|
|
15
|
+
readonly type: import("vue").PropType<string | ((item: any) => string)>;
|
|
16
|
+
readonly default: "label";
|
|
17
|
+
};
|
|
18
|
+
readonly showClear: {
|
|
19
|
+
readonly type: BooleanConstructor;
|
|
20
|
+
readonly default: true;
|
|
21
|
+
};
|
|
22
|
+
readonly showRefresh: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: false;
|
|
25
|
+
};
|
|
26
|
+
readonly emptyText: {
|
|
27
|
+
readonly type: StringConstructor;
|
|
28
|
+
readonly default: "暂无数据";
|
|
29
|
+
};
|
|
30
|
+
readonly title: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "已选";
|
|
33
|
+
};
|
|
34
|
+
readonly maxHeight: {
|
|
35
|
+
readonly type: import("vue").PropType<number | string>;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:modelValue": (value: any[]) => any;
|
|
40
|
+
change: (value: any[]) => any;
|
|
41
|
+
remove: (item: any, index: number) => any;
|
|
42
|
+
clear: () => any;
|
|
43
|
+
refresh: () => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
readonly modelValue: {
|
|
46
|
+
readonly type: import("vue").PropType<any[]>;
|
|
47
|
+
readonly default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
readonly max: {
|
|
50
|
+
readonly type: NumberConstructor;
|
|
51
|
+
readonly default: undefined;
|
|
52
|
+
};
|
|
53
|
+
readonly itemKey: {
|
|
54
|
+
readonly type: import("vue").PropType<string | ((item: any) => any)>;
|
|
55
|
+
readonly default: "id";
|
|
56
|
+
};
|
|
57
|
+
readonly itemLabel: {
|
|
58
|
+
readonly type: import("vue").PropType<string | ((item: any) => string)>;
|
|
59
|
+
readonly default: "label";
|
|
60
|
+
};
|
|
61
|
+
readonly showClear: {
|
|
62
|
+
readonly type: BooleanConstructor;
|
|
63
|
+
readonly default: true;
|
|
64
|
+
};
|
|
65
|
+
readonly showRefresh: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
readonly emptyText: {
|
|
70
|
+
readonly type: StringConstructor;
|
|
71
|
+
readonly default: "暂无数据";
|
|
72
|
+
};
|
|
73
|
+
readonly title: {
|
|
74
|
+
readonly type: StringConstructor;
|
|
75
|
+
readonly default: "已选";
|
|
76
|
+
};
|
|
77
|
+
readonly maxHeight: {
|
|
78
|
+
readonly type: import("vue").PropType<number | string>;
|
|
79
|
+
readonly default: undefined;
|
|
80
|
+
};
|
|
81
|
+
}>> & Readonly<{
|
|
82
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
83
|
+
onChange?: ((value: any[]) => any) | undefined;
|
|
84
|
+
onRemove?: ((item: any, index: number) => any) | undefined;
|
|
85
|
+
onClear?: (() => any) | undefined;
|
|
86
|
+
onRefresh?: (() => any) | undefined;
|
|
87
|
+
}>, {
|
|
88
|
+
readonly title: string;
|
|
89
|
+
readonly modelValue: any[];
|
|
90
|
+
readonly maxHeight: string | number;
|
|
91
|
+
readonly emptyText: string;
|
|
92
|
+
readonly itemKey: string | ((item: any) => any);
|
|
93
|
+
readonly max: number;
|
|
94
|
+
readonly itemLabel: string | ((item: any) => string);
|
|
95
|
+
readonly showClear: boolean;
|
|
96
|
+
readonly showRefresh: boolean;
|
|
97
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
|
+
declare const _default: typeof __VLS_export;
|
|
99
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const selectPanelProps: {
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: PropType<any[]>;
|
|
5
|
+
readonly default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
readonly max: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: undefined;
|
|
10
|
+
};
|
|
11
|
+
readonly itemKey: {
|
|
12
|
+
readonly type: PropType<string | ((item: any) => any)>;
|
|
13
|
+
readonly default: "id";
|
|
14
|
+
};
|
|
15
|
+
readonly itemLabel: {
|
|
16
|
+
readonly type: PropType<string | ((item: any) => string)>;
|
|
17
|
+
readonly default: "label";
|
|
18
|
+
};
|
|
19
|
+
readonly showClear: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly showRefresh: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: false;
|
|
26
|
+
};
|
|
27
|
+
readonly emptyText: {
|
|
28
|
+
readonly type: StringConstructor;
|
|
29
|
+
readonly default: "暂无数据";
|
|
30
|
+
};
|
|
31
|
+
readonly title: {
|
|
32
|
+
readonly type: StringConstructor;
|
|
33
|
+
readonly default: "已选";
|
|
34
|
+
};
|
|
35
|
+
readonly maxHeight: {
|
|
36
|
+
readonly type: PropType<number | string>;
|
|
37
|
+
readonly default: undefined;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type SelectPanelProps = ExtractPropTypes<typeof selectPanelProps>;
|
|
@@ -11,7 +11,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
11
|
readonly default: 3;
|
|
12
12
|
};
|
|
13
13
|
readonly wildcards: {
|
|
14
|
-
readonly type: import("vue").PropType<import("..").
|
|
14
|
+
readonly type: import("vue").PropType<import("..").WildcardOption[]>;
|
|
15
15
|
readonly default: () => never[];
|
|
16
16
|
};
|
|
17
17
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -30,7 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
30
30
|
readonly default: 3;
|
|
31
31
|
};
|
|
32
32
|
readonly wildcards: {
|
|
33
|
-
readonly type: import("vue").PropType<import("..").
|
|
33
|
+
readonly type: import("vue").PropType<import("..").WildcardOption[]>;
|
|
34
34
|
readonly default: () => never[];
|
|
35
35
|
};
|
|
36
36
|
}>> & Readonly<{
|
|
@@ -39,7 +39,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
39
39
|
}>, {
|
|
40
40
|
readonly placeholder: string;
|
|
41
41
|
readonly rows: number;
|
|
42
|
-
readonly wildcards: import("..").
|
|
42
|
+
readonly wildcards: import("..").WildcardOption[];
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
44
|
declare const _default: typeof __VLS_export;
|
|
45
45
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import type { WildcardOption } from '../types';
|
|
3
3
|
export declare const textRuleConfigProps: {
|
|
4
4
|
readonly modelValue: {
|
|
5
5
|
readonly type: StringConstructor;
|
|
@@ -13,7 +13,7 @@ export declare const textRuleConfigProps: {
|
|
|
13
13
|
readonly default: 3;
|
|
14
14
|
};
|
|
15
15
|
readonly wildcards: {
|
|
16
|
-
readonly type: PropType<
|
|
16
|
+
readonly type: PropType<WildcardOption[]>;
|
|
17
17
|
readonly default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -3,6 +3,7 @@ export * from './tag';
|
|
|
3
3
|
export * from './transfer';
|
|
4
4
|
export * from './virtual-list';
|
|
5
5
|
export * from './editable-textarea';
|
|
6
|
+
export * from './text-rule-config';
|
|
6
7
|
export * from './table';
|
|
7
8
|
export type DefaultType = 'success' | 'info' | 'warning' | 'danger' | 'primary' | 'default';
|
|
8
9
|
export type DefaultSize = 'small' | 'default' | 'large';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface WildcardOption {
|
|
2
|
+
/** 显示文案 */
|
|
3
|
+
label: string;
|
|
4
|
+
/** 插入值(无 onClick 时直接插入) */
|
|
5
|
+
value: string;
|
|
6
|
+
/** 提示信息 */
|
|
7
|
+
tip?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 点击交互回调,不传则直接插入 value
|
|
10
|
+
* 传入后,点击通配符不会直接插入,而是调用此函数
|
|
11
|
+
* 调用方在回调内自行处理交互(弹窗、选择器等),完成后调用 done(最终插入值) 完成插入
|
|
12
|
+
*/
|
|
13
|
+
onClick?: (done: (value: string) => void) => void;
|
|
14
|
+
}
|