bkui-vue 2.0.1-beta.61 → 2.0.1-beta.62

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.
@@ -510,14 +510,16 @@ function useRegistry(data) {
510
510
  // 注册item
511
511
  var register = function register(key, item) {
512
512
  if (!item) return;
513
- if (data.value.has(key)) {
514
- return;
515
- }
516
513
  return data.value.set(key, item);
517
514
  };
518
515
  // 删除item
519
- var unregister = function unregister(key) {
520
- data.value["delete"](key);
516
+ var unregister = function unregister(key, item) {
517
+ if (item) {
518
+ if (data.value.get(key) !== item) return;
519
+ data.value["delete"](key);
520
+ } else {
521
+ data.value["delete"](key);
522
+ }
521
523
  };
522
524
  return {
523
525
  register: register,
package/lib/index.js CHANGED
@@ -4,5 +4,5 @@ export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
6
  export * as plugins from './plugins';
7
- export const version = "2.0.1-beta.61";
7
+ export const version = "2.0.1-beta.62";
8
8
  window.__bkui_vue_version__ = version;
@@ -1208,7 +1208,7 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
1208
1208
  "min": props.min,
1209
1209
  "step": props.step,
1210
1210
  "type": pwdVisible.value && props.type === 'password' ? 'text' : props.type
1211
- }, eventListener, bindProps.value, innerInputValue.value), null), !isTextArea.value && props.clearable && !!props.modelValue && (0,external_vue_namespaceObject.createVNode)("span", {
1211
+ }, eventListener, bindProps.value, innerInputValue.value), null), props.clearable && !!props.modelValue && (0,external_vue_namespaceObject.createVNode)("span", {
1212
1212
  "class": clearCls.value,
1213
1213
  "onClick": clear
1214
1214
  }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, null, null)]), suffixIcon.value, showMaxLimit.value && (props.showWordLimit || isTextArea.value) && (0,external_vue_namespaceObject.createVNode)("p", {
@@ -286,6 +286,25 @@
286
286
  outline: 0;
287
287
  box-shadow: 0px 0px 3px 0px var(--input-shadow-color);
288
288
  }
289
+ .bk-textarea--suffix-icon {
290
+ color: var(--gray-color);
291
+ padding-right: var(--input-horizontal-padding);
292
+ font-size: var(--font-size-medium);
293
+ margin: 0;
294
+ margin-left: auto;
295
+ text-align: right;
296
+ flex-shrink: 0;
297
+ cursor: pointer;
298
+ }
299
+ .bk-textarea--suffix-icon:hover {
300
+ color: #313238;
301
+ }
302
+ .bk-textarea--suffix-icon.show-clear-only-hover {
303
+ display: none;
304
+ }
305
+ .bk-textarea:hover:not(.is-disabled) .show-clear-only-hover {
306
+ display: flex;
307
+ }
289
308
  .bk-input {
290
309
  display: inline-flex;
291
310
  align-items: stretch;
@@ -109,6 +109,32 @@
109
109
  &.is-focused:not(.is-readonly) {
110
110
  .active();
111
111
  }
112
+
113
+ &--suffix-icon {
114
+ color: @gray-color;
115
+ padding-right: @input-horizontal-padding;
116
+ font-size: @font-size-medium;
117
+ margin: 0;
118
+ margin-left: auto;
119
+ text-align: right;
120
+ flex-shrink: 0;
121
+ cursor: pointer;
122
+
123
+ &:hover {
124
+ color: #313238;
125
+ }
126
+
127
+ &.show-clear-only-hover {
128
+ display: none;
129
+ }
130
+ }
131
+
132
+ &:hover:not(.is-disabled) {
133
+
134
+ .show-clear-only-hover {
135
+ display: flex;
136
+ }
137
+ }
112
138
  }
113
139
 
114
140
  .@{bk-prefix}-input {
@@ -676,6 +676,25 @@
676
676
  outline: 0;
677
677
  box-shadow: 0px 0px 3px 0px var(--input-shadow-color);
678
678
  }
679
+ .bk-textarea--suffix-icon {
680
+ color: var(--gray-color);
681
+ padding-right: var(--input-horizontal-padding);
682
+ font-size: var(--font-size-medium);
683
+ margin: 0;
684
+ margin-left: auto;
685
+ text-align: right;
686
+ flex-shrink: 0;
687
+ cursor: pointer;
688
+ }
689
+ .bk-textarea--suffix-icon:hover {
690
+ color: #313238;
691
+ }
692
+ .bk-textarea--suffix-icon.show-clear-only-hover {
693
+ display: none;
694
+ }
695
+ .bk-textarea:hover:not(.is-disabled) .show-clear-only-hover {
696
+ display: flex;
697
+ }
679
698
  .bk-input {
680
699
  display: inline-flex;
681
700
  align-items: stretch;
@@ -9,7 +9,7 @@ export declare function useHover(): {
9
9
  };
10
10
  export declare function useRegistry<T>(data: Ref<Map<PropertyKey, T>>): {
11
11
  register: (key: string, item: T) => Map<PropertyKey, T>;
12
- unregister: (key: string) => void;
12
+ unregister: (key: string, item?: T) => void;
13
13
  };
14
14
  export declare function useDebouncedRef<T>(value: any, delay?: number): Ref<T>;
15
15
  export declare function usePopover(config: IPopoverConfig, triggerRef: Ref<HTMLElement>): {
@@ -597,14 +597,16 @@ function useRegistry(data) {
597
597
  // 注册item
598
598
  var register = function register(key, item) {
599
599
  if (!item) return;
600
- if (data.value.has(key)) {
601
- return;
602
- }
603
600
  return data.value.set(key, item);
604
601
  };
605
602
  // 删除item
606
- var unregister = function unregister(key) {
607
- data.value["delete"](key);
603
+ var unregister = function unregister(key, item) {
604
+ if (item) {
605
+ if (data.value.get(key) !== item) return;
606
+ data.value["delete"](key);
607
+ } else {
608
+ data.value["delete"](key);
609
+ }
608
610
  };
609
611
  return {
610
612
  register: register,
@@ -861,8 +863,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
861
863
  group === null || group === void 0 || group.register(optionID.value, proxy);
862
864
  });
863
865
  (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
864
- select === null || select === void 0 || select.unregister(optionID.value);
865
- group === null || group === void 0 || group.unregister(optionID.value);
866
+ select === null || select === void 0 || select.unregister(optionID.value, proxy);
867
+ group === null || group === void 0 || group.unregister(optionID.value, proxy);
866
868
  });
867
869
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
868
870
  resolveClassName = _usePrefix.resolveClassName;
@@ -17,7 +17,7 @@ export interface ISelectContext {
17
17
  curSearchValue: string;
18
18
  highlightKeyword: boolean;
19
19
  register(key: PropertyKey, option: OptionInstanceType): void;
20
- unregister(key: PropertyKey): void;
20
+ unregister(key: PropertyKey, option?: OptionInstanceType): void;
21
21
  registerGroup(key: PropertyKey, option: GroupInstanceType): void;
22
22
  unregisterGroup(key: PropertyKey): void;
23
23
  handleOptionSelected(option: OptionInstanceType): void;
@@ -27,7 +27,7 @@ export interface IOptionGroupContext {
27
27
  disabled: boolean;
28
28
  groupCollapse: boolean;
29
29
  register(key: PropertyKey, option: OptionInstanceType): void;
30
- unregister(key: PropertyKey): void;
30
+ unregister(key: PropertyKey, option?: OptionInstanceType): void;
31
31
  }
32
32
  export interface ISelectState {
33
33
  currentPlaceholder: string;
@@ -328,6 +328,16 @@ declare const BkTab: {
328
328
  }) | (import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
329
329
  default: (...args: any[]) => any;
330
330
  });
331
+ num: import("vue-types").VueTypeValidableDef<number> & {
332
+ default: number;
333
+ } & {
334
+ default: number;
335
+ };
336
+ numDisplayType: import("vue-types").VueTypeValidableDef<string> & {
337
+ default: string;
338
+ } & {
339
+ default: string;
340
+ };
331
341
  }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
332
342
  name: import("vue-types").VueTypeDef<string | number> & {
333
343
  default: string | number;
@@ -362,6 +372,16 @@ declare const BkTab: {
362
372
  }) | (import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
363
373
  default: (...args: any[]) => any;
364
374
  });
375
+ num: import("vue-types").VueTypeValidableDef<number> & {
376
+ default: number;
377
+ } & {
378
+ default: number;
379
+ };
380
+ numDisplayType: import("vue-types").VueTypeValidableDef<string> & {
381
+ default: string;
382
+ } & {
383
+ default: string;
384
+ };
365
385
  }>>, {
366
386
  name: string | number;
367
387
  label: string | ((...args: any[]) => any);
@@ -372,6 +392,8 @@ declare const BkTab: {
372
392
  renderDirective: "show" | "if";
373
393
  panel: string | ((...args: any[]) => any);
374
394
  sortable: boolean;
395
+ num: number;
396
+ numDisplayType: string;
375
397
  }, {}>;
376
398
  }>;
377
399
  export { BkTab, TabPanel as BkTabPanel, SortTypeEnum, PositionEnum };
package/lib/tab/index.js CHANGED
@@ -195,7 +195,9 @@ var tabPanelProps = {
195
195
  disabled: shared_namespaceObject.PropTypes.bool,
196
196
  sortable: shared_namespaceObject.PropTypes.bool,
197
197
  renderDirective: (0,shared_namespaceObject.renderDirectiveType)(),
198
- panel: shared_namespaceObject.PropTypes.string || shared_namespaceObject.PropTypes.func
198
+ panel: shared_namespaceObject.PropTypes.string || shared_namespaceObject.PropTypes.func,
199
+ num: shared_namespaceObject.PropTypes.number.def(undefined),
200
+ numDisplayType: shared_namespaceObject.PropTypes.string.def('default')
199
201
  };
200
202
  var tabProps = {
201
203
  active: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.string]).def(''),
@@ -380,11 +382,13 @@ function tab_nav_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
380
382
  var _item$props = item.props,
381
383
  name = _item$props.name,
382
384
  label = _item$props.label,
385
+ num = _item$props.num,
383
386
  closable = _item$props.closable,
384
387
  visible = _item$props.visible,
385
388
  disabled = _item$props.disabled,
386
389
  sortable = _item$props.sortable,
387
- tips = _item$props.tips;
390
+ tips = _item$props.tips,
391
+ numDisplayType = _item$props.numDisplayType;
388
392
  if (!visible) {
389
393
  return false;
390
394
  }
@@ -413,7 +417,9 @@ function tab_nav_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
413
417
  disabled: disabled,
414
418
  sortable: sortable,
415
419
  tips: tips,
416
- tabLabel: renderLabel(label)
420
+ numDisplayType: numDisplayType,
421
+ tabLabel: renderLabel(label),
422
+ tabNum: num
417
423
  });
418
424
  return true;
419
425
  });
@@ -505,7 +511,9 @@ function tab_nav_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
505
511
  }
506
512
  var name = item.name,
507
513
  disabled = item.disabled,
508
- tabLabel = item.tabLabel;
514
+ tabLabel = item.tabLabel,
515
+ tabNum = item.tabNum,
516
+ numDisplayType = item.numDisplayType;
509
517
  var getNavItemClass = function getNavItemClass() {
510
518
  var classNames = [_this.resolveClassName('tab-header-item')];
511
519
  if (disabled) {
@@ -519,6 +527,17 @@ function tab_nav_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
519
527
  var getValue = function getValue(curentValue, parentValue) {
520
528
  return !disabled && (curentValue || parentValue);
521
529
  };
530
+ var getCloseTag = function getCloseTag(item, index) {
531
+ return getValue(item.closable, closable) ? (0,external_vue_namespaceObject.createVNode)("span", {
532
+ "class": _this.resolveClassName('tab-header--close'),
533
+ "onClick": function onClick() {
534
+ return _this.handleTabRemove(index, item);
535
+ }
536
+ }, [(0,external_vue_namespaceObject.createVNode)(_namespaceObject.Close, null, null)]) : '';
537
+ };
538
+ var getNumType = function getNumType() {
539
+ return ['bracket'].includes(numDisplayType) ? "(".concat(tabNum, ")") : tabNum;
540
+ };
522
541
  return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
523
542
  "key": name,
524
543
  "ref": active === name ? 'activeRef' : '',
@@ -548,12 +567,15 @@ function tab_nav_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
548
567
  e.preventDefault();
549
568
  drop(index, sortType);
550
569
  }
551
- }, [(0,external_vue_namespaceObject.createVNode)("div", null, [tabLabel]), getValue(item.closable, closable) ? (0,external_vue_namespaceObject.createVNode)("span", {
552
- "class": _this.resolveClassName('tab-header--close'),
553
- "onClick": function onClick() {
554
- return _this.handleTabRemove(index, item);
555
- }
556
- }, [(0,external_vue_namespaceObject.createVNode)(_namespaceObject.Close, null, null)]) : '']), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), {
570
+ }, [!isNaN(tabNum) ? (0,external_vue_namespaceObject.createVNode)("div", {
571
+ "class": _this.resolveClassName('tab-header--has-num')
572
+ }, [(0,external_vue_namespaceObject.createVNode)("div", {
573
+ "class": _this.resolveClassName('tab-header--has-num-left')
574
+ }, [tabLabel]), (0,external_vue_namespaceObject.createVNode)("div", {
575
+ "class": _this.resolveClassName('tab-header--has-num-right')
576
+ }, [(0,external_vue_namespaceObject.createVNode)("div", {
577
+ "class": _this.resolveClassName("tab-header--has-num-".concat(numDisplayType))
578
+ }, [getNumType()]), getCloseTag === null || getCloseTag === void 0 ? void 0 : getCloseTag(item, index)])]) : (0,external_vue_namespaceObject.createVNode)("div", null, [tabLabel]), isNaN(tabNum) ? getCloseTag === null || getCloseTag === void 0 ? void 0 : getCloseTag(item, index) : '']), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), {
557
579
  content: item.tips || '',
558
580
  disabled: !item.tips
559
581
  }]]);
@@ -99,6 +99,16 @@ export declare const tabPanelProps: {
99
99
  }) | (import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
100
100
  default: (...args: any[]) => any;
101
101
  });
102
+ num: import("vue-types").VueTypeValidableDef<number> & {
103
+ default: number;
104
+ } & {
105
+ default: number;
106
+ };
107
+ numDisplayType: import("vue-types").VueTypeValidableDef<string> & {
108
+ default: string;
109
+ } & {
110
+ default: string;
111
+ };
102
112
  };
103
113
  export type TabPanelProps = ExtractPropTypes<typeof tabPanelProps>;
104
114
  export declare const tabProps: {
@@ -55,7 +55,12 @@ declare const _default: import("vue").DefineComponent<{
55
55
  default: number;
56
56
  } & {
57
57
  default: number;
58
- };
58
+ }; /**
59
+ * @description 判断拖动的元素是否是在同一个tab。
60
+ * 使用guid,相比 el1.parentNode === el2.parentNode 判断,性能要高
61
+ * @param e {event} 触发的元素
62
+ * @return {boolean}
63
+ */
59
64
  validateActive: import("vue-types").VueTypeValidableDef<boolean> & {
60
65
  default: boolean;
61
66
  } & {
@@ -139,7 +144,12 @@ declare const _default: import("vue").DefineComponent<{
139
144
  default: number;
140
145
  } & {
141
146
  default: number;
142
- };
147
+ }; /**
148
+ * @description 判断拖动的元素是否是在同一个tab。
149
+ * 使用guid,相比 el1.parentNode === el2.parentNode 判断,性能要高
150
+ * @param e {event} 触发的元素
151
+ * @return {boolean}
152
+ */
143
153
  validateActive: import("vue-types").VueTypeValidableDef<boolean> & {
144
154
  default: boolean;
145
155
  } & {
@@ -32,6 +32,16 @@ declare const _default: import("vue").DefineComponent<{
32
32
  }) | (import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
33
33
  default: (...args: any[]) => any;
34
34
  });
35
+ num: import("vue-types").VueTypeValidableDef<number> & {
36
+ default: number;
37
+ } & {
38
+ default: number;
39
+ };
40
+ numDisplayType: import("vue-types").VueTypeValidableDef<string> & {
41
+ default: string;
42
+ } & {
43
+ default: string;
44
+ };
35
45
  }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
46
  name: import("vue-types").VueTypeDef<string | number> & {
37
47
  default: string | number;
@@ -66,6 +76,16 @@ declare const _default: import("vue").DefineComponent<{
66
76
  }) | (import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
67
77
  default: (...args: any[]) => any;
68
78
  });
79
+ num: import("vue-types").VueTypeValidableDef<number> & {
80
+ default: number;
81
+ } & {
82
+ default: number;
83
+ };
84
+ numDisplayType: import("vue-types").VueTypeValidableDef<string> & {
85
+ default: string;
86
+ } & {
87
+ default: string;
88
+ };
69
89
  }>>, {
70
90
  name: string | number;
71
91
  label: string | ((...args: any[]) => any);
@@ -76,5 +96,7 @@ declare const _default: import("vue").DefineComponent<{
76
96
  renderDirective: "show" | "if";
77
97
  panel: string | ((...args: any[]) => any);
78
98
  sortable: boolean;
99
+ num: number;
100
+ numDisplayType: string;
79
101
  }, {}>;
80
102
  export default _default;
package/lib/tab/tab.css CHANGED
@@ -156,6 +156,21 @@
156
156
  .bk-tab--right .bk-tab-header {
157
157
  flex-direction: column;
158
158
  }
159
+ .bk-tab--left .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num,
160
+ .bk-tab--right .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num {
161
+ width: 100%;
162
+ }
163
+ .bk-tab--left .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
164
+ .bk-tab--right .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-square {
165
+ border-radius: 2px;
166
+ }
167
+ .bk-tab--left .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
168
+ .bk-tab--right .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
169
+ .bk-tab--left .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic,
170
+ .bk-tab--right .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
171
+ background-color: #A3C5FD;
172
+ color: var(--white-color);
173
+ }
159
174
  .bk-tab--left .bk-tab-header > div,
160
175
  .bk-tab--right .bk-tab-header > div {
161
176
  flex-direction: column;
@@ -167,6 +182,18 @@
167
182
  .bk-tab--card-tab .bk-tab-header {
168
183
  border-radius: 4px 4px 0;
169
184
  }
185
+ .bk-tab--card-tab .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-square {
186
+ background-color: var(--white-color);
187
+ }
188
+ .bk-tab--card-tab .bk-tab-header .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
189
+ background-color: var(--white-color);
190
+ color: var(--default-color);
191
+ }
192
+ .bk-tab--card-tab .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
193
+ .bk-tab--card-tab .bk-tab-header .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
194
+ background-color: #A3C5FD;
195
+ color: var(--white-color);
196
+ }
170
197
  .bk-tab--card .bk-tab-header,
171
198
  .bk-tab--vertical-card .bk-tab-header {
172
199
  border-bottom: 1px solid var(--disable-color);
@@ -291,6 +318,35 @@
291
318
  padding-right: 12px;
292
319
  padding-left: 12px;
293
320
  }
321
+ .bk-tab-header-item .bk-tab-header--has-num {
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: space-between;
325
+ }
326
+ .bk-tab-header-item .bk-tab-header--has-num-right {
327
+ margin-left: 4px;
328
+ display: flex;
329
+ align-items: center;
330
+ color: var(--default-color);
331
+ }
332
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-default,
333
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-bracket {
334
+ color: var(--default-color);
335
+ }
336
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
337
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
338
+ background-color: #F0F1F5;
339
+ color: var(--gray-color);
340
+ padding: 0 8px;
341
+ line-height: 18px;
342
+ text-align: center;
343
+ }
344
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-square {
345
+ border-radius: 2px;
346
+ }
347
+ .bk-tab-header-item .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
348
+ border-radius: 18px;
349
+ }
294
350
  .bk-tab-header-item:hover {
295
351
  color: var(--primary-color);
296
352
  }
@@ -336,6 +392,14 @@
336
392
  .bk-tab--card-grid .bk-tab-header--active {
337
393
  background: #fff;
338
394
  }
395
+ .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-bracket,
396
+ .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-square,
397
+ .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-elliptic {
398
+ color: var(--primary-color);
399
+ }
400
+ .bk-tab-header--active .bk-tab-header--has-num-right .bk-tab-header--has-num-square {
401
+ background-color: #E1ECFF;
402
+ }
339
403
  .bk-tab-header--close {
340
404
  display: none;
341
405
  font-size: 16px;
package/lib/tab/tab.less CHANGED
@@ -6,6 +6,9 @@
6
6
  @tab-header-bg: #FAFBFD;
7
7
  @tab-white: @white-color;
8
8
  @tab-gray: @light-gray;
9
+ @tab-number-tag-gray: @gray-color;
10
+ @tab-card-number-active: #E1ECFF;
11
+ @tab-column-active: #A3C5FD;
9
12
  @tab-card-tab-bg: #F0F1F5;
10
13
  @tab-card-tab-divider: #c4c6cc;
11
14
  @tab-disable-color: #aaa;
@@ -42,7 +45,28 @@
42
45
 
43
46
  .@{bk-prefix}-tab--left &, .@{bk-prefix}-tab--right & {
44
47
  flex-direction: column;
45
-
48
+ .@{bk-prefix}-tab-header-item {
49
+ .@{bk-prefix}-tab-header--has-num {
50
+ width: 100%;
51
+ &-right {
52
+ .@{bk-prefix}-tab-header--has-num-square {
53
+ border-radius: 2px;
54
+ }
55
+ }
56
+ }
57
+ }
58
+ .@{bk-prefix}-tab-header--active {
59
+ .@{bk-prefix}-tab-header--has-num {
60
+ &-right {
61
+ .@{bk-prefix}-tab-header--has-num-square,
62
+ .@{bk-prefix}-tab-header--has-num-elliptic {
63
+ background-color: @tab-column-active;
64
+ color: @tab-white;
65
+ }
66
+ }
67
+ }
68
+ }
69
+
46
70
  > div {
47
71
  flex-direction: column;
48
72
  }
@@ -54,6 +78,30 @@
54
78
 
55
79
  .@{bk-prefix}-tab--card-tab & {
56
80
  border-radius: 4px 4px 0;
81
+ .@{bk-prefix}-tab-header-item {
82
+ .@{bk-prefix}-tab-header--has-num {
83
+ &-right {
84
+ .@{bk-prefix}-tab-header--has-num-square {
85
+ background-color: @tab-white;
86
+ }
87
+ .@{bk-prefix}-tab-header--has-num-elliptic {
88
+ background-color: @tab-white;
89
+ color: @tab-color;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ .@{bk-prefix}-tab-header--active {
95
+ .@{bk-prefix}-tab-header--has-num {
96
+ &-right {
97
+ .@{bk-prefix}-tab-header--has-num-square,
98
+ .@{bk-prefix}-tab-header--has-num-elliptic {
99
+ background-color: @tab-column-active;
100
+ color: @tab-white;
101
+ }
102
+ }
103
+ }
104
+ }
57
105
  }
58
106
 
59
107
  .@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--vertical-card & {
@@ -208,7 +256,36 @@
208
256
  padding-left: 12px;
209
257
  }
210
258
 
211
-
259
+ .@{bk-prefix}-tab-header--has-num {
260
+ display: flex;
261
+ align-items: center;
262
+ justify-content: space-between;
263
+ &-right {
264
+ margin-left: 4px;
265
+ display: flex;
266
+ align-items: center;
267
+ color: @tab-color;
268
+ .@{bk-prefix}-tab-header--has-num-default,
269
+ .@{bk-prefix}-tab-header--has-num-bracket {
270
+ color: @tab-color;
271
+ }
272
+ .@{bk-prefix}-tab-header--has-num-square,
273
+ .@{bk-prefix}-tab-header--has-num-elliptic {
274
+ background-color: @tab-card-tab-bg;
275
+ color: @tab-number-tag-gray;
276
+ padding: 0 8px;
277
+ line-height: 18px;
278
+ text-align: center;
279
+ }
280
+ .@{bk-prefix}-tab-header--has-num-square {
281
+ border-radius: 2px;
282
+ }
283
+ .@{bk-prefix}-tab-header--has-num-elliptic {
284
+ border-radius: 18px;
285
+ }
286
+ }
287
+ }
288
+
212
289
  &:hover {
213
290
  color: @tab-active;
214
291
 
@@ -218,7 +295,6 @@
218
295
  color: @danger-color;
219
296
  }
220
297
  }
221
-
222
298
  }
223
299
 
224
300
  &--active {
@@ -260,7 +336,18 @@
260
336
  border-left: 2px solid @tab-active;
261
337
  }
262
338
  */
263
-
339
+ .@{bk-prefix}-tab-header--has-num {
340
+ &-right {
341
+ .@{bk-prefix}-tab-header--has-num-bracket,
342
+ .@{bk-prefix}-tab-header--has-num-square,
343
+ .@{bk-prefix}-tab-header--has-num-elliptic {
344
+ color: @tab-active;
345
+ }
346
+ .@{bk-prefix}-tab-header--has-num-square {
347
+ background-color: @tab-card-number-active;
348
+ }
349
+ }
350
+ }
264
351
  }
265
352
 
266
353
  &--close {