bkui-vue 0.0.1-beta.345 → 0.0.1-beta.347

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.
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, Ref } from 'vue';
2
2
  import { GetMenuListFunc, ICommonItem, ISearchItem, ISearchValue, SearchItemType, SelectedItem, ValidateValuesFunc } from './utils';
3
3
  export declare const SearchSelectProps: {
4
4
  data: {
@@ -34,6 +34,14 @@ export declare const SearchSelectProps: {
34
34
  };
35
35
  getMenuList: PropType<GetMenuListFunc>;
36
36
  validateValues: PropType<ValidateValuesFunc>;
37
+ valueSplitCode: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ uniqueSelect: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
37
45
  };
38
46
  declare const _default: import("vue").DefineComponent<{
39
47
  data: {
@@ -69,8 +77,16 @@ declare const _default: import("vue").DefineComponent<{
69
77
  };
70
78
  getMenuList: PropType<GetMenuListFunc>;
71
79
  validateValues: PropType<ValidateValuesFunc>;
80
+ valueSplitCode: {
81
+ type: StringConstructor;
82
+ default: string;
83
+ };
84
+ uniqueSelect: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
72
88
  }, {
73
- inputRef: import("vue").Ref<import("vue").DefineComponent<{
89
+ inputRef: Ref<import("vue").DefineComponent<{
74
90
  data: {
75
91
  type: PropType<ISearchItem[]>;
76
92
  required: true;
@@ -87,14 +103,14 @@ declare const _default: import("vue").DefineComponent<{
87
103
  type: PropType<import("./utils").SearchInputMode>;
88
104
  default: import("./utils").SearchInputMode;
89
105
  };
90
- geMenuList: PropType<GetMenuListFunc>;
106
+ getMenuList: PropType<GetMenuListFunc>;
91
107
  validateValues: PropType<ValidateValuesFunc>;
92
108
  }, {
93
- popoverRef: import("vue").Ref<HTMLDivElement>;
94
- inputRef: import("vue").Ref<HTMLDivElement>;
95
- keyword: import("vue").Ref<string>;
96
- loading: import("vue").Ref<boolean>;
97
- remoteMenuList: import("vue").Ref<{
109
+ popoverRef: Ref<HTMLDivElement>;
110
+ inputRef: Ref<HTMLDivElement>;
111
+ keyword: Ref<string>;
112
+ loading: Ref<boolean>;
113
+ remoteMenuList: Ref<{
98
114
  id: string;
99
115
  name: string;
100
116
  disabled?: boolean;
@@ -103,14 +119,16 @@ declare const _default: import("vue").DefineComponent<{
103
119
  name: string;
104
120
  id: string;
105
121
  realId?: string;
122
+ isSelected?: boolean;
106
123
  };
124
+ isSelected?: boolean;
107
125
  }[]>;
108
- menuList: import("vue").Ref<ISearchItem[]>;
109
- menuHoverId: import("vue").Ref<string>;
110
- isFocus: import("vue").Ref<boolean>;
111
- usingItem: import("vue").Ref<SelectedItem>;
112
- showPopover: import("vue").Ref<boolean>;
113
- showNoSelectValueError: import("vue").Ref<boolean>;
126
+ menuList: Ref<ISearchItem[]>;
127
+ menuHoverId: Ref<string>;
128
+ isFocus: Ref<boolean>;
129
+ usingItem: Ref<SelectedItem>;
130
+ showPopover: Ref<boolean>;
131
+ showNoSelectValueError: Ref<boolean>;
114
132
  debounceSetMenuList: {
115
133
  (this: any): any;
116
134
  cancel(): void;
@@ -140,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{
140
158
  type: PropType<import("./utils").SearchInputMode>;
141
159
  default: import("./utils").SearchInputMode;
142
160
  };
143
- geMenuList: PropType<GetMenuListFunc>;
161
+ getMenuList: PropType<GetMenuListFunc>;
144
162
  validateValues: PropType<ValidateValuesFunc>;
145
163
  }>> & {
146
164
  onFocus?: (...args: any[]) => any;
@@ -152,9 +170,10 @@ declare const _default: import("vue").DefineComponent<{
152
170
  showInputBefore: boolean;
153
171
  showCondition: boolean;
154
172
  }>>;
155
- wrapRef: import("vue").Ref<HTMLDivElement>;
156
- isFocus: import("vue").Ref<boolean>;
157
- selectedList: import("vue").Ref<{
173
+ wrapRef: Ref<HTMLDivElement>;
174
+ isFocus: Ref<boolean>;
175
+ copyData: Ref<ISearchItem[]>;
176
+ selectedList: Ref<{
158
177
  id: string;
159
178
  name: string;
160
179
  values: {
@@ -166,7 +185,9 @@ declare const _default: import("vue").DefineComponent<{
166
185
  name: string;
167
186
  id: string;
168
187
  realId?: string;
188
+ isSelected?: boolean;
169
189
  };
190
+ isSelected?: boolean;
170
191
  }[];
171
192
  condition: string;
172
193
  searchItem: {
@@ -181,15 +202,32 @@ declare const _default: import("vue").DefineComponent<{
181
202
  name: string;
182
203
  id: string;
183
204
  realId?: string;
205
+ isSelected?: boolean;
184
206
  };
207
+ isSelected?: boolean;
185
208
  }[];
186
209
  multiple?: boolean;
187
210
  async?: boolean;
188
211
  noValidate?: boolean;
189
212
  placeholder?: string;
190
213
  disabled?: boolean;
214
+ value?: {
215
+ id: string;
216
+ name: string;
217
+ disabled?: boolean;
218
+ realId?: string;
219
+ value?: {
220
+ name: string;
221
+ id: string;
222
+ realId?: string;
223
+ isSelected?: boolean;
224
+ };
225
+ isSelected?: boolean;
226
+ };
227
+ isSelected?: boolean;
191
228
  };
192
229
  type: SearchItemType;
230
+ splitCode: string;
193
231
  readonly multiple: boolean;
194
232
  readonly placeholder: string;
195
233
  readonly children: {
@@ -201,7 +239,9 @@ declare const _default: import("vue").DefineComponent<{
201
239
  name: string;
202
240
  id: string;
203
241
  realId?: string;
242
+ isSelected?: boolean;
204
243
  };
244
+ isSelected?: boolean;
205
245
  }[];
206
246
  readonly validate: boolean;
207
247
  readonly inputInnerHtml: string;
@@ -214,8 +254,9 @@ declare const _default: import("vue").DefineComponent<{
214
254
  toValueKey: () => string;
215
255
  isInValueList: (item: ICommonItem) => boolean;
216
256
  }[]>;
217
- overflowIndex: import("vue").Ref<number>;
218
- validateStr: import("vue").Ref<string>;
257
+ overflowIndex: Ref<number>;
258
+ validateStr: Ref<string>;
259
+ splitCode: import("vue").ComputedRef<string>;
219
260
  onEditClick: (item: SelectedItem, index: number) => void;
220
261
  onEditEnter: (item: SelectedItem, index: number) => void;
221
262
  handleWrapClick: () => void;
@@ -259,6 +300,14 @@ declare const _default: import("vue").DefineComponent<{
259
300
  };
260
301
  getMenuList: PropType<GetMenuListFunc>;
261
302
  validateValues: PropType<ValidateValuesFunc>;
303
+ valueSplitCode: {
304
+ type: StringConstructor;
305
+ default: string;
306
+ };
307
+ uniqueSelect: {
308
+ type: BooleanConstructor;
309
+ default: boolean;
310
+ };
262
311
  }>> & {
263
312
  "onUpdate:modelValue"?: (...args: any[]) => any;
264
313
  }, {
@@ -268,6 +317,8 @@ declare const _default: import("vue").DefineComponent<{
268
317
  clearable: boolean;
269
318
  modelValue: ISearchValue[];
270
319
  conditions: ICommonItem[];
320
+ valueSplitCode: string;
271
321
  shrink: boolean;
322
+ uniqueSelect: boolean;
272
323
  }>;
273
324
  export default _default;
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  .div-input {
22
- height: @component-size-base;
22
+ height: 100%;
23
23
  padding: 5px 0;
24
24
  line-height: 20px;
25
25
  word-break: break-all;
@@ -33,7 +33,7 @@
33
33
  &-container {
34
34
  position: relative;
35
35
  display: flex;
36
- min-height: @component-size-base;
36
+ min-height: 30px;
37
37
  overflow: hidden;
38
38
  font-size: 12px;
39
39
  color: @search-select-font-color;
@@ -50,6 +50,10 @@
50
50
  &.is-focus {
51
51
  overflow: auto;
52
52
  .focus();
53
+
54
+ // .search-container-selected {
55
+ // margin-bottom: 2p;
56
+ // }
53
57
  }
54
58
 
55
59
  .search-prefix {
@@ -293,7 +297,8 @@
293
297
 
294
298
  .menu-item {
295
299
  .menu-item-mixin();
296
-
300
+ white-space: pre;
301
+
297
302
  .is-keyword {
298
303
  display: inline-flex;
299
304
  color: @primary-color;
@@ -916,7 +916,7 @@
916
916
  border-color: var(--search-select-focus-border-color) !important;
917
917
  }
918
918
  .bk-search-select .div-input {
919
- height: var(--component-size-base);
919
+ height: 100%;
920
920
  padding: 5px 0;
921
921
  line-height: 20px;
922
922
  word-break: break-all;
@@ -928,7 +928,7 @@
928
928
  .bk-search-select-container {
929
929
  position: relative;
930
930
  display: flex;
931
- min-height: var(--component-size-base);
931
+ min-height: 30px;
932
932
  overflow: hidden;
933
933
  font-size: 12px;
934
934
  color: var(--search-select-font-color);
@@ -1177,6 +1177,7 @@
1177
1177
  padding: 0 12px;
1178
1178
  flex: 0 0 32px;
1179
1179
  outline: none;
1180
+ white-space: pre;
1180
1181
  }
1181
1182
  .bk-search-select-menu .menu-content .menu-item:hover {
1182
1183
  cursor: pointer;
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
17
17
  type: PropType<ICommonItem[]>;
18
18
  default: () => any[];
19
19
  };
20
- geMenuList: PropType<GetMenuListFunc>;
20
+ getMenuList: PropType<GetMenuListFunc>;
21
21
  validateValues: PropType<ValidateValuesFunc>;
22
22
  }, {
23
23
  inputRef: import("vue").Ref<import("vue").DefineComponent<{
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<{
37
37
  type: PropType<SearchInputMode>;
38
38
  default: SearchInputMode;
39
39
  };
40
- geMenuList: PropType<GetMenuListFunc>;
40
+ getMenuList: PropType<GetMenuListFunc>;
41
41
  validateValues: PropType<ValidateValuesFunc>;
42
42
  }, {
43
43
  popoverRef: import("vue").Ref<HTMLDivElement>;
@@ -53,7 +53,9 @@ declare const _default: import("vue").DefineComponent<{
53
53
  name: string;
54
54
  id: string;
55
55
  realId?: string;
56
+ isSelected?: boolean;
56
57
  };
58
+ isSelected?: boolean;
57
59
  }[]>;
58
60
  menuList: import("vue").Ref<ISearchItem[]>;
59
61
  menuHoverId: import("vue").Ref<string>;
@@ -90,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
90
92
  type: PropType<SearchInputMode>;
91
93
  default: SearchInputMode;
92
94
  };
93
- geMenuList: PropType<GetMenuListFunc>;
95
+ getMenuList: PropType<GetMenuListFunc>;
94
96
  validateValues: PropType<ValidateValuesFunc>;
95
97
  }>> & {
96
98
  onFocus?: (...args: any[]) => any;
@@ -126,7 +128,7 @@ declare const _default: import("vue").DefineComponent<{
126
128
  type: PropType<ICommonItem[]>;
127
129
  default: () => any[];
128
130
  };
129
- geMenuList: PropType<GetMenuListFunc>;
131
+ getMenuList: PropType<GetMenuListFunc>;
130
132
  validateValues: PropType<ValidateValuesFunc>;
131
133
  }>> & {
132
134
  onDelete?: (...args: any[]) => any;
@@ -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字段
@@ -20,6 +20,7 @@ export interface ISearchSelectProvider {
20
20
  onEditBlur: () => void;
21
21
  onValidate: (str: string) => void;
22
22
  editKey: Ref<String>;
23
+ valueSplitCode: ComputedRef<string>;
23
24
  }
24
25
  export declare const SEARCH_SLECT_PROVIDER_KEY: InjectionKey<ISearchSelectProvider>;
25
26
  export declare const useSearchSelectProvider: (data: ISearchSelectProvider) => void;
@@ -34,6 +35,7 @@ export interface ICommonItem {
34
35
  disabled?: boolean;
35
36
  realId?: string;
36
37
  value?: Omit<ICommonItem, 'disabled' | 'value'>;
38
+ isSelected?: boolean;
37
39
  }
38
40
  export interface ISearchValue extends Omit<ICommonItem, 'disabled' | 'value'> {
39
41
  type?: SearchItemType;
@@ -48,6 +50,8 @@ export interface ISearchItem {
48
50
  noValidate?: boolean;
49
51
  placeholder?: string;
50
52
  disabled?: boolean;
53
+ value?: ICommonItem;
54
+ isSelected?: boolean;
51
55
  }
52
56
  export interface IMenuFooterItem {
53
57
  id: 'confirm' | 'cancel';
@@ -58,11 +62,12 @@ export declare type SearchItemType = 'text' | 'default' | 'condition';
58
62
  export declare class SelectedItem {
59
63
  searchItem: ISearchItem;
60
64
  type: SearchItemType;
65
+ splitCode: string;
61
66
  id: string;
62
67
  name: string;
63
68
  values: ICommonItem[];
64
69
  condition: string;
65
- constructor(searchItem: ISearchItem, type?: SearchItemType);
70
+ constructor(searchItem: ISearchItem, type?: SearchItemType, splitCode?: string);
66
71
  get multiple(): boolean;
67
72
  get placeholder(): string;
68
73
  get children(): ICommonItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "0.0.1-beta.345",
3
+ "version": "0.0.1-beta.347",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",