bkui-vue 1.0.3-beta.54 → 1.0.3-beta.56
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.js +43 -45
- package/dist/index.esm.js +9802 -9743
- package/dist/index.umd.js +42 -44
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/search-select/index.d.ts +315 -12
- package/lib/search-select/index.js +395 -214
- package/lib/search-select/input.d.ts +4 -1
- package/lib/search-select/search-select.css +19 -6
- package/lib/search-select/search-select.d.ts +105 -4
- package/lib/search-select/search-select.less +15 -12
- package/lib/search-select/search-select.variable.css +19 -6
- package/lib/search-select/selected.d.ts +102 -5
- package/lib/search-select/utils.d.ts +7 -1
- package/package.json +1 -1
@@ -53,14 +53,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
53
53
|
};
|
54
54
|
documentArrowEvent: (e: KeyboardEvent) => void;
|
55
55
|
handleClickOutside: (e: MouseEvent) => void;
|
56
|
-
handleInputFocus: (
|
56
|
+
handleInputFocus: () => void;
|
57
57
|
handleInputChange: (event: Event) => void;
|
58
|
+
handleInputPaste: (event: ClipboardEvent) => void;
|
58
59
|
handleLogicalChange: (logical: SearchLogical) => void;
|
59
60
|
handleInputKeyup: (event: KeyboardEvent) => void;
|
60
61
|
handleSelectItem: (item: ICommonItem, type?: SearchItemType) => Promise<void>;
|
61
62
|
handleSelectCondtionItem: (item: ICommonItem) => void;
|
62
63
|
handleMenuFooterClick: (item: IMenuFooterItem) => void;
|
63
64
|
resolveClassName: (cls: string) => string;
|
65
|
+
inputFocusForWrapper: () => void;
|
66
|
+
inputEnterForWrapper: () => void;
|
64
67
|
t: import("vue").ComputedRef<{
|
65
68
|
pleaseSelect: string;
|
66
69
|
loading: string;
|
@@ -189,6 +189,7 @@
|
|
189
189
|
margin-top: -4px;
|
190
190
|
color: #63656e;
|
191
191
|
border: none;
|
192
|
+
flex: 1;
|
192
193
|
}
|
193
194
|
.bk-search-select-container .search-container-input .input-before:before {
|
194
195
|
color: #c4c6cc;
|
@@ -287,12 +288,16 @@
|
|
287
288
|
}
|
288
289
|
.bk-search-select-menu .menu-item-mixin {
|
289
290
|
display: flex;
|
290
|
-
align-items: center;
|
291
291
|
width: 100%;
|
292
292
|
height: 32px;
|
293
|
+
max-width: 500px;
|
293
294
|
padding: 0 8px;
|
294
|
-
|
295
|
+
overflow: hidden;
|
296
|
+
text-overflow: ellipsis;
|
297
|
+
white-space: nowrap;
|
295
298
|
outline: none;
|
299
|
+
align-items: center;
|
300
|
+
flex: 0 0 32px;
|
296
301
|
}
|
297
302
|
.bk-search-select-menu .menu-item-mixin:hover {
|
298
303
|
cursor: pointer;
|
@@ -312,12 +317,16 @@
|
|
312
317
|
}
|
313
318
|
.bk-search-select-menu .menu-header-item {
|
314
319
|
display: flex;
|
315
|
-
align-items: center;
|
316
320
|
width: 100%;
|
317
321
|
height: 32px;
|
322
|
+
max-width: 500px;
|
318
323
|
padding: 0 8px;
|
319
|
-
|
324
|
+
overflow: hidden;
|
325
|
+
text-overflow: ellipsis;
|
326
|
+
white-space: nowrap;
|
320
327
|
outline: none;
|
328
|
+
align-items: center;
|
329
|
+
flex: 0 0 32px;
|
321
330
|
}
|
322
331
|
.bk-search-select-menu .menu-header-item:hover {
|
323
332
|
cursor: pointer;
|
@@ -366,12 +375,16 @@
|
|
366
375
|
}
|
367
376
|
.bk-search-select-menu .menu-content .menu-item {
|
368
377
|
display: flex;
|
369
|
-
align-items: center;
|
370
378
|
width: 100%;
|
371
379
|
height: 32px;
|
380
|
+
max-width: 500px;
|
372
381
|
padding: 0 8px;
|
373
|
-
|
382
|
+
overflow: hidden;
|
383
|
+
text-overflow: ellipsis;
|
384
|
+
white-space: nowrap;
|
374
385
|
outline: none;
|
386
|
+
align-items: center;
|
387
|
+
flex: 0 0 32px;
|
375
388
|
white-space: pre;
|
376
389
|
}
|
377
390
|
.bk-search-select-menu .menu-content .menu-item:hover {
|
@@ -84,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
84
84
|
validator(v: ValueBehavior): boolean;
|
85
85
|
};
|
86
86
|
}, {
|
87
|
-
inputRef: import("vue").Ref<import("vue").
|
87
|
+
inputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
88
88
|
data: {
|
89
89
|
type: PropType<ISearchItem[]>;
|
90
90
|
required: true;
|
@@ -105,6 +105,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
105
105
|
getMenuList: PropType<GetMenuListFunc>;
|
106
106
|
validateValues: PropType<ValidateValuesFunc>;
|
107
107
|
valueBehavior: PropType<ValueBehavior>;
|
108
|
+
}>> & {
|
109
|
+
onFocus?: (...args: any[]) => any;
|
110
|
+
onDelete?: (...args: any[]) => any;
|
111
|
+
onAdd?: (...args: any[]) => any;
|
108
112
|
}, {
|
109
113
|
popoverRef: import("vue").Ref<HTMLDivElement>;
|
110
114
|
inputRef: import("vue").Ref<HTMLDivElement>;
|
@@ -137,14 +141,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
137
141
|
};
|
138
142
|
documentArrowEvent: (e: KeyboardEvent) => void;
|
139
143
|
handleClickOutside: (e: MouseEvent) => void;
|
140
|
-
handleInputFocus: (
|
144
|
+
handleInputFocus: () => void;
|
141
145
|
handleInputChange: (event: Event) => void;
|
146
|
+
handleInputPaste: (event: ClipboardEvent) => void;
|
142
147
|
handleLogicalChange: (logical: SearchLogical) => void;
|
143
148
|
handleInputKeyup: (event: KeyboardEvent) => void;
|
144
149
|
handleSelectItem: (item: ICommonItem, type?: SearchItemType) => Promise<void>;
|
145
150
|
handleSelectCondtionItem: (item: ICommonItem) => void;
|
146
151
|
handleMenuFooterClick: (item: import("./utils").IMenuFooterItem) => void;
|
147
152
|
resolveClassName: (cls: string) => string;
|
153
|
+
inputFocusForWrapper: () => void;
|
154
|
+
inputEnterForWrapper: () => void;
|
148
155
|
t: import("vue").ComputedRef<{
|
149
156
|
pleaseSelect: string;
|
150
157
|
loading: string;
|
@@ -155,7 +162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
155
162
|
and: string;
|
156
163
|
logical: string;
|
157
164
|
}>;
|
158
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add")[],
|
165
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
159
166
|
data: {
|
160
167
|
type: PropType<ISearchItem[]>;
|
161
168
|
required: true;
|
@@ -185,7 +192,97 @@ declare const _default: import("vue").DefineComponent<{
|
|
185
192
|
conditions: ICommonItem[];
|
186
193
|
showInputBefore: boolean;
|
187
194
|
showCondition: boolean;
|
188
|
-
}, {}
|
195
|
+
}, true, {}, {}, {
|
196
|
+
P: {};
|
197
|
+
B: {};
|
198
|
+
D: {};
|
199
|
+
C: {};
|
200
|
+
M: {};
|
201
|
+
Defaults: {};
|
202
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
203
|
+
data: {
|
204
|
+
type: PropType<ISearchItem[]>;
|
205
|
+
required: true;
|
206
|
+
};
|
207
|
+
showInputBefore: BooleanConstructor;
|
208
|
+
showCondition: BooleanConstructor;
|
209
|
+
clickOutside: FunctionConstructor;
|
210
|
+
placeholder: StringConstructor;
|
211
|
+
conditions: {
|
212
|
+
type: PropType<ICommonItem[]>;
|
213
|
+
default: () => any[];
|
214
|
+
};
|
215
|
+
defautUsingItem: PropType<SelectedItem>;
|
216
|
+
mode: {
|
217
|
+
type: PropType<import("./utils").SearchInputMode>;
|
218
|
+
default: import("./utils").SearchInputMode;
|
219
|
+
};
|
220
|
+
getMenuList: PropType<GetMenuListFunc>;
|
221
|
+
validateValues: PropType<ValidateValuesFunc>;
|
222
|
+
valueBehavior: PropType<ValueBehavior>;
|
223
|
+
}>> & {
|
224
|
+
onFocus?: (...args: any[]) => any;
|
225
|
+
onDelete?: (...args: any[]) => any;
|
226
|
+
onAdd?: (...args: any[]) => any;
|
227
|
+
}, {
|
228
|
+
popoverRef: import("vue").Ref<HTMLDivElement>;
|
229
|
+
inputRef: import("vue").Ref<HTMLDivElement>;
|
230
|
+
keyword: import("vue").Ref<string>;
|
231
|
+
loading: import("vue").Ref<boolean>;
|
232
|
+
remoteMenuList: import("vue").Ref<{
|
233
|
+
id: string;
|
234
|
+
name: string;
|
235
|
+
disabled?: boolean;
|
236
|
+
realId?: string;
|
237
|
+
value?: {
|
238
|
+
name: string;
|
239
|
+
id: string;
|
240
|
+
realId?: string;
|
241
|
+
isSelected?: boolean;
|
242
|
+
logical?: SearchLogical;
|
243
|
+
};
|
244
|
+
isSelected?: boolean;
|
245
|
+
logical?: SearchLogical;
|
246
|
+
}[]>;
|
247
|
+
menuList: import("vue").Ref<ISearchItem[]>;
|
248
|
+
menuHoverId: import("vue").Ref<string>;
|
249
|
+
isFocus: import("vue").Ref<boolean>;
|
250
|
+
usingItem: import("vue").Ref<SelectedItem>;
|
251
|
+
showPopover: import("vue").Ref<boolean>;
|
252
|
+
showNoSelectValueError: import("vue").Ref<boolean>;
|
253
|
+
debounceSetMenuList: {
|
254
|
+
(this: any): any;
|
255
|
+
cancel(): void;
|
256
|
+
};
|
257
|
+
documentArrowEvent: (e: KeyboardEvent) => void;
|
258
|
+
handleClickOutside: (e: MouseEvent) => void;
|
259
|
+
handleInputFocus: () => void;
|
260
|
+
handleInputChange: (event: Event) => void;
|
261
|
+
handleInputPaste: (event: ClipboardEvent) => void;
|
262
|
+
handleLogicalChange: (logical: SearchLogical) => void;
|
263
|
+
handleInputKeyup: (event: KeyboardEvent) => void;
|
264
|
+
handleSelectItem: (item: ICommonItem, type?: SearchItemType) => Promise<void>;
|
265
|
+
handleSelectCondtionItem: (item: ICommonItem) => void;
|
266
|
+
handleMenuFooterClick: (item: import("./utils").IMenuFooterItem) => void;
|
267
|
+
resolveClassName: (cls: string) => string;
|
268
|
+
inputFocusForWrapper: () => void;
|
269
|
+
inputEnterForWrapper: () => void;
|
270
|
+
t: import("vue").ComputedRef<{
|
271
|
+
pleaseSelect: string;
|
272
|
+
loading: string;
|
273
|
+
filterQueryMustHasValue: string;
|
274
|
+
ok: string;
|
275
|
+
cancel: string;
|
276
|
+
or: string;
|
277
|
+
and: string;
|
278
|
+
logical: string;
|
279
|
+
}>;
|
280
|
+
}, {}, {}, {}, {
|
281
|
+
mode: import("./utils").SearchInputMode;
|
282
|
+
conditions: ICommonItem[];
|
283
|
+
showInputBefore: boolean;
|
284
|
+
showCondition: boolean;
|
285
|
+
}>>;
|
189
286
|
wrapRef: import("vue").Ref<HTMLDivElement>;
|
190
287
|
isFocus: import("vue").Ref<boolean>;
|
191
288
|
copyData: ShallowRef<ISearchItem[]>;
|
@@ -209,6 +306,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
209
306
|
}[];
|
210
307
|
condition: string;
|
211
308
|
logical: SearchLogical;
|
309
|
+
nameRenderkey: string;
|
212
310
|
searchItem: {
|
213
311
|
id: string;
|
214
312
|
name: string;
|
@@ -278,6 +376,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
278
376
|
readonly showLogical: boolean;
|
279
377
|
isSpecialType: () => boolean;
|
280
378
|
addValue: (item: ICommonItem) => void;
|
379
|
+
str2Values: (str: string) => ICommonItem[];
|
380
|
+
addValues: (str: string, mergeValues?: boolean) => void;
|
381
|
+
getValue: (str: string) => ICommonItem;
|
281
382
|
toValue: () => ISearchValue;
|
282
383
|
toValueKey: () => string;
|
283
384
|
isInValueList: (item: ICommonItem) => boolean;
|
@@ -2,10 +2,8 @@
|
|
2
2
|
@import '../styles/themes/themes.less';
|
3
3
|
@import '../styles/mixins/mixins.less';
|
4
4
|
|
5
|
-
|
6
5
|
@search-select-name: ~'@{bk-prefix}-search-select';
|
7
6
|
|
8
|
-
|
9
7
|
.@{search-select-name} {
|
10
8
|
position: relative;
|
11
9
|
z-index: 9;
|
@@ -41,7 +39,7 @@
|
|
41
39
|
border-radius: @border-radius-base;
|
42
40
|
outline: none;
|
43
41
|
box-sizing: border-box;
|
44
|
-
transition: border .2s linear;
|
42
|
+
transition: border 0.2s linear;
|
45
43
|
resize: none;
|
46
44
|
flex-direction: row;
|
47
45
|
align-items: center;
|
@@ -72,7 +70,7 @@
|
|
72
70
|
margin-top: 4px;
|
73
71
|
overflow: visible;
|
74
72
|
text-align: left;
|
75
|
-
transition: max-height .3s cubic-bezier(.4, 0, .2, 1);
|
73
|
+
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
76
74
|
flex: 1;
|
77
75
|
flex-wrap: wrap;
|
78
76
|
align-items: center;
|
@@ -91,7 +89,7 @@
|
|
91
89
|
align-self: center;
|
92
90
|
|
93
91
|
&.hidden-selected {
|
94
|
-
visibility: hidden
|
92
|
+
visibility: hidden;
|
95
93
|
}
|
96
94
|
|
97
95
|
&.overflow-selected {
|
@@ -139,6 +137,7 @@
|
|
139
137
|
margin-top: -4px;
|
140
138
|
color: @search-select-font-color;
|
141
139
|
border: none;
|
140
|
+
flex: 1;
|
142
141
|
|
143
142
|
.input-before {
|
144
143
|
&:before {
|
@@ -198,7 +197,7 @@
|
|
198
197
|
display: flex;
|
199
198
|
margin-right: 8px;
|
200
199
|
font-size: 16px;
|
201
|
-
transition: color .2s linear;
|
200
|
+
transition: color 0.2s linear;
|
202
201
|
align-items: center;
|
203
202
|
justify-content: center;
|
204
203
|
|
@@ -216,7 +215,7 @@
|
|
216
215
|
&::-webkit-scrollbar-thumb {
|
217
216
|
background: #e6e9ea;
|
218
217
|
border-radius: 20px;
|
219
|
-
box-shadow: inset 0 0 6px rgba(204, 204, 204, .3);
|
218
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
220
219
|
}
|
221
220
|
}
|
222
221
|
|
@@ -255,12 +254,16 @@
|
|
255
254
|
|
256
255
|
.menu-item-mixin {
|
257
256
|
display: flex;
|
258
|
-
align-items: center;
|
259
257
|
width: 100%;
|
260
258
|
height: 32px;
|
259
|
+
max-width: 500px;
|
261
260
|
padding: 0 8px;
|
262
|
-
|
261
|
+
overflow: hidden;
|
262
|
+
text-overflow: ellipsis;
|
263
|
+
white-space: nowrap;
|
263
264
|
outline: none;
|
265
|
+
align-items: center;
|
266
|
+
flex: 0 0 32px;
|
264
267
|
|
265
268
|
&:hover {
|
266
269
|
cursor: pointer;
|
@@ -285,7 +288,7 @@
|
|
285
288
|
.menu-item-mixin();
|
286
289
|
|
287
290
|
&.is-disabled {
|
288
|
-
.menu-disabled-mixin()
|
291
|
+
.menu-disabled-mixin();
|
289
292
|
}
|
290
293
|
}
|
291
294
|
}
|
@@ -355,7 +358,7 @@
|
|
355
358
|
.menu-disabled-mixin();
|
356
359
|
|
357
360
|
.menu-name {
|
358
|
-
color: @light-gray
|
361
|
+
color: @light-gray;
|
359
362
|
}
|
360
363
|
}
|
361
364
|
|
@@ -394,7 +397,7 @@
|
|
394
397
|
}
|
395
398
|
|
396
399
|
&.is-disabled {
|
397
|
-
.menu-disabled-mixin()
|
400
|
+
.menu-disabled-mixin();
|
398
401
|
}
|
399
402
|
}
|
400
403
|
}
|
@@ -318,6 +318,7 @@
|
|
318
318
|
margin-top: -4px;
|
319
319
|
color: #63656e;
|
320
320
|
border: none;
|
321
|
+
flex: 1;
|
321
322
|
}
|
322
323
|
.bk-search-select-container .search-container-input .input-before:before {
|
323
324
|
color: #c4c6cc;
|
@@ -416,12 +417,16 @@
|
|
416
417
|
}
|
417
418
|
.bk-search-select-menu .menu-item-mixin {
|
418
419
|
display: flex;
|
419
|
-
align-items: center;
|
420
420
|
width: 100%;
|
421
421
|
height: 32px;
|
422
|
+
max-width: 500px;
|
422
423
|
padding: 0 8px;
|
423
|
-
|
424
|
+
overflow: hidden;
|
425
|
+
text-overflow: ellipsis;
|
426
|
+
white-space: nowrap;
|
424
427
|
outline: none;
|
428
|
+
align-items: center;
|
429
|
+
flex: 0 0 32px;
|
425
430
|
}
|
426
431
|
.bk-search-select-menu .menu-item-mixin:hover {
|
427
432
|
cursor: pointer;
|
@@ -441,12 +446,16 @@
|
|
441
446
|
}
|
442
447
|
.bk-search-select-menu .menu-header-item {
|
443
448
|
display: flex;
|
444
|
-
align-items: center;
|
445
449
|
width: 100%;
|
446
450
|
height: 32px;
|
451
|
+
max-width: 500px;
|
447
452
|
padding: 0 8px;
|
448
|
-
|
453
|
+
overflow: hidden;
|
454
|
+
text-overflow: ellipsis;
|
455
|
+
white-space: nowrap;
|
449
456
|
outline: none;
|
457
|
+
align-items: center;
|
458
|
+
flex: 0 0 32px;
|
450
459
|
}
|
451
460
|
.bk-search-select-menu .menu-header-item:hover {
|
452
461
|
cursor: pointer;
|
@@ -495,12 +504,16 @@
|
|
495
504
|
}
|
496
505
|
.bk-search-select-menu .menu-content .menu-item {
|
497
506
|
display: flex;
|
498
|
-
align-items: center;
|
499
507
|
width: 100%;
|
500
508
|
height: 32px;
|
509
|
+
max-width: 500px;
|
501
510
|
padding: 0 8px;
|
502
|
-
|
511
|
+
overflow: hidden;
|
512
|
+
text-overflow: ellipsis;
|
513
|
+
white-space: nowrap;
|
503
514
|
outline: none;
|
515
|
+
align-items: center;
|
516
|
+
flex: 0 0 32px;
|
504
517
|
white-space: pre;
|
505
518
|
}
|
506
519
|
.bk-search-select-menu .menu-content .menu-item:hover {
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
21
21
|
validateValues: PropType<ValidateValuesFunc>;
|
22
22
|
valueBehavior: PropType<ValueBehavior>;
|
23
23
|
}, {
|
24
|
-
inputRef: import("vue").Ref<import("vue").
|
24
|
+
inputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
25
25
|
data: {
|
26
26
|
type: PropType<ISearchItem[]>;
|
27
27
|
required: true;
|
@@ -42,6 +42,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
42
|
getMenuList: PropType<GetMenuListFunc>;
|
43
43
|
validateValues: PropType<ValidateValuesFunc>;
|
44
44
|
valueBehavior: PropType<ValueBehavior>;
|
45
|
+
}>> & {
|
46
|
+
onFocus?: (...args: any[]) => any;
|
47
|
+
onDelete?: (...args: any[]) => any;
|
48
|
+
onAdd?: (...args: any[]) => any;
|
45
49
|
}, {
|
46
50
|
popoverRef: import("vue").Ref<HTMLDivElement>;
|
47
51
|
inputRef: import("vue").Ref<HTMLDivElement>;
|
@@ -74,14 +78,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
78
|
};
|
75
79
|
documentArrowEvent: (e: KeyboardEvent) => void;
|
76
80
|
handleClickOutside: (e: MouseEvent) => void;
|
77
|
-
handleInputFocus: (
|
81
|
+
handleInputFocus: () => void;
|
78
82
|
handleInputChange: (event: Event) => void;
|
83
|
+
handleInputPaste: (event: ClipboardEvent) => void;
|
79
84
|
handleLogicalChange: (logical: SearchLogical) => void;
|
80
85
|
handleInputKeyup: (event: KeyboardEvent) => void;
|
81
86
|
handleSelectItem: (item: ICommonItem, type?: import("./utils").SearchItemType) => Promise<void>;
|
82
87
|
handleSelectCondtionItem: (item: ICommonItem) => void;
|
83
88
|
handleMenuFooterClick: (item: import("./utils").IMenuFooterItem) => void;
|
84
89
|
resolveClassName: (cls: string) => string;
|
90
|
+
inputFocusForWrapper: () => void;
|
91
|
+
inputEnterForWrapper: () => void;
|
85
92
|
t: import("vue").ComputedRef<{
|
86
93
|
pleaseSelect: string;
|
87
94
|
loading: string;
|
@@ -92,7 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
99
|
and: string;
|
93
100
|
logical: string;
|
94
101
|
}>;
|
95
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add")[],
|
102
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
96
103
|
data: {
|
97
104
|
type: PropType<ISearchItem[]>;
|
98
105
|
required: true;
|
@@ -122,12 +129,102 @@ declare const _default: import("vue").DefineComponent<{
|
|
122
129
|
conditions: ICommonItem[];
|
123
130
|
showInputBefore: boolean;
|
124
131
|
showCondition: boolean;
|
125
|
-
}, {}
|
132
|
+
}, true, {}, {}, {
|
133
|
+
P: {};
|
134
|
+
B: {};
|
135
|
+
D: {};
|
136
|
+
C: {};
|
137
|
+
M: {};
|
138
|
+
Defaults: {};
|
139
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
140
|
+
data: {
|
141
|
+
type: PropType<ISearchItem[]>;
|
142
|
+
required: true;
|
143
|
+
};
|
144
|
+
showInputBefore: BooleanConstructor;
|
145
|
+
showCondition: BooleanConstructor;
|
146
|
+
clickOutside: FunctionConstructor;
|
147
|
+
placeholder: StringConstructor;
|
148
|
+
conditions: {
|
149
|
+
type: PropType<ICommonItem[]>;
|
150
|
+
default: () => any[];
|
151
|
+
};
|
152
|
+
defautUsingItem: PropType<SelectedItem>;
|
153
|
+
mode: {
|
154
|
+
type: PropType<SearchInputMode>;
|
155
|
+
default: SearchInputMode;
|
156
|
+
};
|
157
|
+
getMenuList: PropType<GetMenuListFunc>;
|
158
|
+
validateValues: PropType<ValidateValuesFunc>;
|
159
|
+
valueBehavior: PropType<ValueBehavior>;
|
160
|
+
}>> & {
|
161
|
+
onFocus?: (...args: any[]) => any;
|
162
|
+
onDelete?: (...args: any[]) => any;
|
163
|
+
onAdd?: (...args: any[]) => any;
|
164
|
+
}, {
|
165
|
+
popoverRef: import("vue").Ref<HTMLDivElement>;
|
166
|
+
inputRef: import("vue").Ref<HTMLDivElement>;
|
167
|
+
keyword: import("vue").Ref<string>;
|
168
|
+
loading: import("vue").Ref<boolean>;
|
169
|
+
remoteMenuList: import("vue").Ref<{
|
170
|
+
id: string;
|
171
|
+
name: string;
|
172
|
+
disabled?: boolean;
|
173
|
+
realId?: string;
|
174
|
+
value?: {
|
175
|
+
name: string;
|
176
|
+
id: string;
|
177
|
+
realId?: string;
|
178
|
+
isSelected?: boolean;
|
179
|
+
logical?: SearchLogical;
|
180
|
+
};
|
181
|
+
isSelected?: boolean;
|
182
|
+
logical?: SearchLogical;
|
183
|
+
}[]>;
|
184
|
+
menuList: import("vue").Ref<ISearchItem[]>;
|
185
|
+
menuHoverId: import("vue").Ref<string>;
|
186
|
+
isFocus: import("vue").Ref<boolean>;
|
187
|
+
usingItem: import("vue").Ref<SelectedItem>;
|
188
|
+
showPopover: import("vue").Ref<boolean>;
|
189
|
+
showNoSelectValueError: import("vue").Ref<boolean>;
|
190
|
+
debounceSetMenuList: {
|
191
|
+
(this: any): any;
|
192
|
+
cancel(): void;
|
193
|
+
};
|
194
|
+
documentArrowEvent: (e: KeyboardEvent) => void;
|
195
|
+
handleClickOutside: (e: MouseEvent) => void;
|
196
|
+
handleInputFocus: () => void;
|
197
|
+
handleInputChange: (event: Event) => void;
|
198
|
+
handleInputPaste: (event: ClipboardEvent) => void;
|
199
|
+
handleLogicalChange: (logical: SearchLogical) => void;
|
200
|
+
handleInputKeyup: (event: KeyboardEvent) => void;
|
201
|
+
handleSelectItem: (item: ICommonItem, type?: import("./utils").SearchItemType) => Promise<void>;
|
202
|
+
handleSelectCondtionItem: (item: ICommonItem) => void;
|
203
|
+
handleMenuFooterClick: (item: import("./utils").IMenuFooterItem) => void;
|
204
|
+
resolveClassName: (cls: string) => string;
|
205
|
+
inputFocusForWrapper: () => void;
|
206
|
+
inputEnterForWrapper: () => void;
|
207
|
+
t: import("vue").ComputedRef<{
|
208
|
+
pleaseSelect: string;
|
209
|
+
loading: string;
|
210
|
+
filterQueryMustHasValue: string;
|
211
|
+
ok: string;
|
212
|
+
cancel: string;
|
213
|
+
or: string;
|
214
|
+
and: string;
|
215
|
+
logical: string;
|
216
|
+
}>;
|
217
|
+
}, {}, {}, {}, {
|
218
|
+
mode: SearchInputMode;
|
219
|
+
conditions: ICommonItem[];
|
220
|
+
showInputBefore: boolean;
|
221
|
+
showCondition: boolean;
|
222
|
+
}>>;
|
126
223
|
editKey: import("vue").Ref<String>;
|
127
224
|
copySeletedItem: (item: SelectedItem) => SelectedItem;
|
128
225
|
handleDeleteSelected: (index: number) => void;
|
129
226
|
handleEditSeleted: (e: MouseEvent, item: SelectedItem, index: number) => void;
|
130
|
-
handleInputOutside: () => boolean;
|
227
|
+
handleInputOutside: (target: Node) => boolean;
|
131
228
|
handleAddSelected: (item: SelectedItem, index: number) => void;
|
132
229
|
handleInputFocus: (isFocus: boolean) => void;
|
133
230
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "delete"[], "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { InjectionKey, Ref, VNode } from 'vue';
|
1
|
+
import { ComputedRef, InjectionKey, Ref, VNode } from 'vue';
|
2
2
|
/**
|
3
3
|
* @description: 获取menu list方法
|
4
4
|
* @param {ISearchItem} item 已选择的key字段 为空则代表当前并未选择key字段
|
@@ -24,6 +24,8 @@ export interface ISearchSelectProvider {
|
|
24
24
|
onEditBlur: () => void;
|
25
25
|
onValidate: (str: string) => void;
|
26
26
|
editKey: Ref<String>;
|
27
|
+
searchData: ComputedRef<ISearchItem[]>;
|
28
|
+
isClickOutside: (target: Node) => boolean;
|
27
29
|
}
|
28
30
|
export declare const SEARCH_SLECT_PROVIDER_KEY: InjectionKey<ISearchSelectProvider>;
|
29
31
|
export declare const useSearchSelectProvider: (data: ISearchSelectProvider) => void;
|
@@ -78,6 +80,7 @@ export declare class SelectedItem {
|
|
78
80
|
values: ICommonItem[];
|
79
81
|
condition: string;
|
80
82
|
logical: SearchLogical;
|
83
|
+
nameRenderkey: string;
|
81
84
|
constructor(searchItem: ISearchItem, type?: SearchItemType);
|
82
85
|
get multiple(): boolean;
|
83
86
|
get placeholder(): string;
|
@@ -90,6 +93,9 @@ export declare class SelectedItem {
|
|
90
93
|
get showLogical(): boolean;
|
91
94
|
isSpecialType(): boolean;
|
92
95
|
addValue(item: ICommonItem): void;
|
96
|
+
str2Values(str: string): ICommonItem[];
|
97
|
+
addValues(str: string, mergeValues?: boolean): void;
|
98
|
+
getValue(str: string): ICommonItem;
|
93
99
|
toValue(): ISearchValue;
|
94
100
|
toValueKey(): string;
|
95
101
|
isInValueList(item: ICommonItem): boolean;
|