bkui-vue 0.0.2-beta.39 → 0.0.2-beta.40
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 +47 -47
- package/dist/index.esm.js +9244 -9199
- package/dist/index.umd.js +47 -47
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +4 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/preset.d.ts +2 -0
- package/lib/search-select/index.d.ts +51 -21
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +5 -1
- package/lib/search-select/menu.d.ts +33 -2
- package/lib/search-select/search-select.css +31 -11
- package/lib/search-select/search-select.d.ts +18 -16
- package/lib/search-select/search-select.less +29 -10
- package/lib/search-select/search-select.variable.css +31 -11
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +12 -5
- package/package.json +1 -1
@@ -400,7 +400,7 @@
|
|
400
400
|
}
|
401
401
|
.bk-search-select-menu {
|
402
402
|
display: flex;
|
403
|
-
min-width:
|
403
|
+
min-width: 200px;
|
404
404
|
font-size: 12px;
|
405
405
|
color: #63656e;
|
406
406
|
flex-direction: column;
|
@@ -414,7 +414,7 @@
|
|
414
414
|
align-items: center;
|
415
415
|
width: 100%;
|
416
416
|
height: 32px;
|
417
|
-
padding: 0
|
417
|
+
padding: 0 8px;
|
418
418
|
flex: 0 0 32px;
|
419
419
|
outline: none;
|
420
420
|
}
|
@@ -439,7 +439,7 @@
|
|
439
439
|
align-items: center;
|
440
440
|
width: 100%;
|
441
441
|
height: 32px;
|
442
|
-
padding: 0
|
442
|
+
padding: 0 8px;
|
443
443
|
flex: 0 0 32px;
|
444
444
|
outline: none;
|
445
445
|
}
|
@@ -454,19 +454,46 @@
|
|
454
454
|
cursor: not-allowed;
|
455
455
|
background-color: white;
|
456
456
|
}
|
457
|
+
.bk-search-select-menu .menu-content-wrapper {
|
458
|
+
display: flex;
|
459
|
+
width: 100%;
|
460
|
+
height: 100%;
|
461
|
+
}
|
462
|
+
.bk-search-select-menu .menu-content-wrapper .menu-condition {
|
463
|
+
display: flex;
|
464
|
+
flex-direction: column;
|
465
|
+
width: 64px;
|
466
|
+
flex: 0 0 64px;
|
467
|
+
background-color: #F5F7FA;
|
468
|
+
padding: 8px 8px 2px 10px;
|
469
|
+
}
|
470
|
+
.bk-search-select-menu .menu-content-wrapper .menu-condition-title {
|
471
|
+
margin-bottom: 12px;
|
472
|
+
line-height: 24px;
|
473
|
+
display: flex;
|
474
|
+
align-items: center;
|
475
|
+
}
|
476
|
+
.bk-search-select-menu .menu-content-wrapper .menu-condition .bk-radio {
|
477
|
+
width: 50px;
|
478
|
+
margin-bottom: 14.5px;
|
479
|
+
}
|
480
|
+
.bk-search-select-menu .menu-content-wrapper .menu-condition .bk-radio ~ .bk-radio {
|
481
|
+
margin-left: 0;
|
482
|
+
}
|
457
483
|
.bk-search-select-menu .menu-content {
|
458
484
|
display: flex;
|
459
485
|
flex-direction: column;
|
460
486
|
flex: 1;
|
461
487
|
max-height: 240px;
|
462
488
|
overflow: auto;
|
489
|
+
padding: 4px 0;
|
463
490
|
}
|
464
491
|
.bk-search-select-menu .menu-content .menu-item {
|
465
492
|
display: flex;
|
466
493
|
align-items: center;
|
467
494
|
width: 100%;
|
468
495
|
height: 32px;
|
469
|
-
padding: 0
|
496
|
+
padding: 0 8px;
|
470
497
|
flex: 0 0 32px;
|
471
498
|
outline: none;
|
472
499
|
white-space: pre;
|
@@ -483,13 +510,6 @@
|
|
483
510
|
display: flex;
|
484
511
|
width: 22px;
|
485
512
|
height: 22px;
|
486
|
-
margin-left: auto;
|
487
|
-
overflow: hidden;
|
488
|
-
font-size: 22px;
|
489
|
-
font-weight: bold;
|
490
|
-
color: #3a84ff;
|
491
|
-
align-items: center;
|
492
|
-
justify-content: center;
|
493
513
|
}
|
494
514
|
.bk-search-select-menu .menu-content .menu-item.is-hover {
|
495
515
|
color: #3a84ff;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
|
-
import { GetMenuListFunc, ICommonItem, ISearchItem, SearchInputMode, SelectedItem, ValidateValuesFunc, ValueBehavior } from './utils';
|
2
|
+
import { GetMenuListFunc, ICommonItem, ISearchItem, SearchInputMode, SearchLogical, SelectedItem, ValidateValuesFunc, ValueBehavior } from './utils';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
4
|
data: {
|
5
5
|
type: PropType<ISearchItem[]>;
|
@@ -57,8 +57,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
57
57
|
id: string;
|
58
58
|
realId?: string;
|
59
59
|
isSelected?: boolean;
|
60
|
+
logical?: SearchLogical;
|
60
61
|
};
|
61
62
|
isSelected?: boolean;
|
63
|
+
logical?: SearchLogical;
|
62
64
|
}[]>;
|
63
65
|
menuList: import("vue").Ref<ISearchItem[]>;
|
64
66
|
menuHoverId: import("vue").Ref<string>;
|
@@ -74,6 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
76
|
handleClickOutside: (e: MouseEvent) => void;
|
75
77
|
handleInputFocus: (e: FocusEvent) => void;
|
76
78
|
handleInputChange: (event: Event) => void;
|
79
|
+
handleLogicalChange: (logical: SearchLogical) => void;
|
77
80
|
handleInputKeyup: (event: KeyboardEvent) => void;
|
78
81
|
handleSelectItem: (item: ICommonItem, type?: import("./utils").SearchItemType) => Promise<void>;
|
79
82
|
handleSelectCondtionItem: (item: ICommonItem) => void;
|
@@ -87,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
87
90
|
cancel: string;
|
88
91
|
or: string;
|
89
92
|
and: string;
|
93
|
+
logical: string;
|
90
94
|
}>;
|
91
95
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "add" | "delete")[], "focus" | "add" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
92
96
|
data: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { InjectionKey, Ref, VNode } from 'vue';
|
2
2
|
/**
|
3
3
|
* @description: 获取menu list方法
|
4
4
|
* @param {ISearchItem} item 已选择的key字段 为空则代表当前并未选择key字段
|
@@ -24,7 +24,6 @@ export interface ISearchSelectProvider {
|
|
24
24
|
onEditBlur: () => void;
|
25
25
|
onValidate: (str: string) => void;
|
26
26
|
editKey: Ref<String>;
|
27
|
-
valueSplitCode: ComputedRef<string>;
|
28
27
|
}
|
29
28
|
export declare const SEARCH_SLECT_PROVIDER_KEY: InjectionKey<ISearchSelectProvider>;
|
30
29
|
export declare const useSearchSelectProvider: (data: ISearchSelectProvider) => void;
|
@@ -40,10 +39,11 @@ export interface ICommonItem {
|
|
40
39
|
realId?: string;
|
41
40
|
value?: Omit<ICommonItem, 'disabled' | 'value'>;
|
42
41
|
isSelected?: boolean;
|
42
|
+
logical?: SearchLogical;
|
43
43
|
}
|
44
44
|
export interface ISearchValue extends Omit<ICommonItem, 'disabled' | 'value'> {
|
45
45
|
type?: SearchItemType;
|
46
|
-
values?: Omit<ICommonItem, 'disabled'>[];
|
46
|
+
values?: Omit<ICommonItem, 'disabled' | 'logical'>[];
|
47
47
|
}
|
48
48
|
export interface ISearchItem {
|
49
49
|
id: string;
|
@@ -57,6 +57,12 @@ export interface ISearchItem {
|
|
57
57
|
value?: ICommonItem;
|
58
58
|
isSelected?: boolean;
|
59
59
|
onlyRecommendChildren?: boolean;
|
60
|
+
logical?: SearchLogical;
|
61
|
+
showLogicalPanel?: boolean;
|
62
|
+
}
|
63
|
+
export declare enum SearchLogical {
|
64
|
+
AND = "&",
|
65
|
+
OR = "|"
|
60
66
|
}
|
61
67
|
export interface IMenuFooterItem {
|
62
68
|
id: 'confirm' | 'cancel';
|
@@ -67,12 +73,12 @@ export type SearchItemType = 'text' | 'default' | 'condition';
|
|
67
73
|
export declare class SelectedItem {
|
68
74
|
searchItem: ISearchItem;
|
69
75
|
type: SearchItemType;
|
70
|
-
splitCode: string;
|
71
76
|
id: string;
|
72
77
|
name: string;
|
73
78
|
values: ICommonItem[];
|
74
79
|
condition: string;
|
75
|
-
|
80
|
+
logical: SearchLogical;
|
81
|
+
constructor(searchItem: ISearchItem, type?: SearchItemType);
|
76
82
|
get multiple(): boolean;
|
77
83
|
get placeholder(): string;
|
78
84
|
get children(): ICommonItem[];
|
@@ -81,6 +87,7 @@ export declare class SelectedItem {
|
|
81
87
|
get inputInnerText(): string;
|
82
88
|
get keyInnerHtml(): string;
|
83
89
|
get keyInnerText(): string;
|
90
|
+
get showLogical(): boolean;
|
84
91
|
isSpecialType(): boolean;
|
85
92
|
addValue(item: ICommonItem): void;
|
86
93
|
toValue(): ISearchValue;
|