bkui-vue 2.0.1-beta.36 → 2.0.1-beta.38

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.
@@ -511,7 +511,6 @@ function useRegistry(data) {
511
511
  var register = function register(key, item) {
512
512
  if (!item) return;
513
513
  if (data.value.has(key)) {
514
- // console.warn(`repeat ${key}`, item);
515
514
  return;
516
515
  }
517
516
  return data.value.set(key, item);
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.36";
7
+ export const version = "2.0.1-beta.38";
8
8
  window.__bkui_vue_version__ = version;
@@ -7,8 +7,8 @@ export declare function useHover(): {
7
7
  setHover: () => void;
8
8
  cancelHover: () => void;
9
9
  };
10
- export declare function useRegistry<T>(data: Ref<Map<string, T>>): {
11
- register: (key: string, item: T) => Map<string, T>;
10
+ export declare function useRegistry<T>(data: Ref<Map<PropertyKey, T>>): {
11
+ register: (key: string, item: T) => Map<PropertyKey, T>;
12
12
  unregister: (key: string) => void;
13
13
  };
14
14
  export declare function useDebouncedRef<T>(value: any, delay?: number): Ref<T>;
@@ -710,6 +710,7 @@ declare const BkSelect: {
710
710
  isEnableVirtualRender: import("vue").ComputedRef<boolean>;
711
711
  preloadItemCount: import("vue").ComputedRef<number>;
712
712
  virtualRenderRef: import("vue").Ref<any>;
713
+ setSelected: (data: object[]) => void;
713
714
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "select" | "toggle" | "clear" | "update:modelValue" | "scroll-end" | "tag-remove" | "deselect" | "search-change")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
714
715
  modelValue: import("vue-types").VueTypeValidableDef<any>;
715
716
  multiple: import("vue-types").VueTypeValidableDef<boolean> & {
@@ -1795,6 +1796,7 @@ declare const BkSelect: {
1795
1796
  isEnableVirtualRender: import("vue").ComputedRef<boolean>;
1796
1797
  preloadItemCount: import("vue").ComputedRef<number>;
1797
1798
  virtualRenderRef: import("vue").Ref<any>;
1799
+ setSelected: (data: object[]) => void;
1798
1800
  }, {}, {}, {}, {
1799
1801
  prefix: string;
1800
1802
  size: "default" | "small" | "large" | "huge";
@@ -2551,6 +2553,7 @@ declare const BkSelect: {
2551
2553
  isEnableVirtualRender: import("vue").ComputedRef<boolean>;
2552
2554
  preloadItemCount: import("vue").ComputedRef<number>;
2553
2555
  virtualRenderRef: import("vue").Ref<any>;
2556
+ setSelected: (data: object[]) => void;
2554
2557
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "select" | "toggle" | "clear" | "update:modelValue" | "scroll-end" | "tag-remove" | "deselect" | "search-change")[], "blur" | "change" | "focus" | "select" | "toggle" | "clear" | "update:modelValue" | "scroll-end" | "tag-remove" | "deselect" | "search-change", {
2555
2558
  prefix: string;
2556
2559
  size: "default" | "small" | "large" | "huge";
@@ -2597,7 +2600,7 @@ declare const BkSelect: {
2597
2600
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & Readonly<{
2598
2601
  Option: import("vue").DefineComponent<{
2599
2602
  id: {
2600
- type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
2603
+ type: (NumberConstructor | StringConstructor)[];
2601
2604
  require: boolean;
2602
2605
  };
2603
2606
  name: import("vue-types").VueTypeDef<string | number>;
@@ -2616,9 +2619,9 @@ declare const BkSelect: {
2616
2619
  multiple: import("vue").ComputedRef<boolean>;
2617
2620
  isHover: import("vue").ComputedRef<boolean>;
2618
2621
  showSelectedIcon: import("vue").ComputedRef<boolean>;
2619
- selectedStyle: import("vue").ComputedRef<import("../shared").SelectedTypeEnum>;
2622
+ selectedStyle: import("vue").ComputedRef<"checkbox" | "check">;
2620
2623
  optionName: import("vue").ComputedRef<string | number>;
2621
- optionID: import("vue").ComputedRef<unknown>;
2624
+ optionID: import("vue").ComputedRef<string | number>;
2622
2625
  highlightKeyword: import("vue").ComputedRef<boolean>;
2623
2626
  handleOptionClick: () => void;
2624
2627
  handleMouseEnter: () => void;
@@ -2629,7 +2632,7 @@ declare const BkSelect: {
2629
2632
  visible: import("vue").Ref<boolean>;
2630
2633
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2631
2634
  id: {
2632
- type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
2635
+ type: (NumberConstructor | StringConstructor)[];
2633
2636
  require: boolean;
2634
2637
  };
2635
2638
  name: import("vue-types").VueTypeDef<string | number>;
@@ -17,6 +17,7 @@ import "../popover/popover.less";
17
17
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_virtual_render_927587a8__ from "../virtual-render";
18
18
  import "../virtual-render/virtual-render.less";
19
19
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_merge_cf99375a__ from "lodash/merge";
20
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_overflow_title_051a85a5__ from "../overflow-title";
20
21
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_d74826be__ from "../tag";
21
22
  import "../tag/tag.less";
22
23
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_debounce_3540babe__ from "lodash/debounce";
@@ -597,7 +598,6 @@ function useRegistry(data) {
597
598
  var register = function register(key, item) {
598
599
  if (!item) return;
599
600
  if (data.value.has(key)) {
600
- // console.warn(`repeat ${key}`, item);
601
601
  return;
602
602
  }
603
603
  return data.value.set(key, item);
@@ -770,7 +770,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
770
770
  name: 'Option',
771
771
  props: {
772
772
  id: {
773
- type: [String, Number, Object],
773
+ type: [String, Number],
774
774
  require: true
775
775
  },
776
776
  name: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.string]),
@@ -779,6 +779,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
779
779
  },
780
780
  setup: function setup(props, _ref) {
781
781
  var attrs = _ref.attrs;
782
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
782
783
  var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
783
784
  proxy = _getCurrentInstance.proxy;
784
785
  var states = (0,external_vue_namespaceObject.reactive)({
@@ -2292,6 +2293,10 @@ if (core.isSupported() && _56l.shouldPatch(core.genToken)) {
2292
2293
 
2293
2294
  /* harmony default export */ const pinyin = (core);
2294
2295
 
2296
+ ;// CONCATENATED MODULE: external "../overflow-title"
2297
+ var overflow_title_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2298
+ var overflow_title_y = x => () => x
2299
+ const overflow_title_namespaceObject = overflow_title_x({ ["OverflowTitle"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_overflow_title_051a85a5__.OverflowTitle });
2295
2300
  ;// CONCATENATED MODULE: external "../tag"
2296
2301
  var tag_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2297
2302
  var tag_y = x => () => x
@@ -2340,6 +2345,7 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2340
2345
 
2341
2346
 
2342
2347
 
2348
+
2343
2349
  /* harmony default export */ const selectTagInput = ((0,external_vue_namespaceObject.defineComponent)({
2344
2350
  name: 'SelectTagInput',
2345
2351
  directives: {
@@ -2376,7 +2382,7 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2376
2382
  var overflowTagIndex = (0,external_vue_namespaceObject.ref)(null);
2377
2383
  var overflowContent = (0,external_vue_namespaceObject.computed)(function () {
2378
2384
  return selected.value.slice(overflowTagIndex.value, selected.value.length).map(function (item) {
2379
- return item.label;
2385
+ return select === null || select === void 0 ? void 0 : select.handleGetLabelByValue(item.value);
2380
2386
  }).join(', ');
2381
2387
  });
2382
2388
  (0,external_vue_namespaceObject.watch)(modelValue, function () {
@@ -2481,8 +2487,8 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2481
2487
  _this$$slots$default2,
2482
2488
  _this$$slots3,
2483
2489
  _this = this,
2484
- _this$$slots4,
2485
- _this$$slots4$suffix;
2490
+ _this$$slots5,
2491
+ _this$$slots5$suffix;
2486
2492
  var prefix = (_this$$slots = this.$slots) === null || _this$$slots === void 0 || (_this$$slots$prefix = _this$$slots.prefix) === null || _this$$slots$prefix === void 0 ? void 0 : _this$$slots$prefix.call(_this$$slots);
2487
2493
  var selectTagClass = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, this.resolveClassName('select-tag'), true), this.resolveClassName('select-tag--default'), true), 'is-disabled', this.disabled), 'collapse-tag', this.collapseTags), 'has-prefix', !!prefix), 'is-simplicity', this.behavior === 'simplicity'));
2488
2494
  var tagWrapperClass = (0,shared_namespaceObject.classes)(_defineProperty({}, this.resolveClassName('select-tag-wrapper'), true));
@@ -2495,7 +2501,7 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2495
2501
  }, [(_this$$slots2 = this.$slots) === null || _this$$slots2 === void 0 || (_this$$slots2$prefix = _this$$slots2.prefix) === null || _this$$slots2$prefix === void 0 ? void 0 : _this$$slots2$prefix.call(_this$$slots2), (0,external_vue_namespaceObject.createVNode)("div", {
2496
2502
  "class": tagWrapperClass
2497
2503
  }, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots3 = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots3)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : this.selected.map(function (item, index) {
2498
- var _this$select;
2504
+ var _this$$slots$tagRende, _this$$slots$tagRende2, _this$$slots4, _this$select;
2499
2505
  return (0,external_vue_namespaceObject.createVNode)(tag_namespaceObject["default"], {
2500
2506
  "ref": function ref(el) {
2501
2507
  return _this.tagsRefs[index] = el;
@@ -2510,7 +2516,13 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2510
2516
  }
2511
2517
  }, {
2512
2518
  "default": function _default() {
2513
- return [(_this$select = _this.select) === null || _this$select === void 0 ? void 0 : _this$select.handleGetLabelByValue(item.value)];
2519
+ return [(_this$$slots$tagRende = (_this$$slots$tagRende2 = (_this$$slots4 = _this.$slots).tagRender) === null || _this$$slots$tagRende2 === void 0 ? void 0 : _this$$slots$tagRende2.call(_this$$slots4, item)) !== null && _this$$slots$tagRende !== void 0 ? _this$$slots$tagRende : (0,external_vue_namespaceObject.createVNode)(overflow_title_namespaceObject.OverflowTitle, {
2520
+ "type": "tips"
2521
+ }, {
2522
+ "default": function _default() {
2523
+ return [(_this$select = _this.select) === null || _this$select === void 0 ? void 0 : _this$select.handleGetLabelByValue(item.value)];
2524
+ }
2525
+ })];
2514
2526
  }
2515
2527
  });
2516
2528
  }), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(tag_namespaceObject["default"], {
@@ -2525,7 +2537,8 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2525
2537
  }
2526
2538
  }), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), {
2527
2539
  content: this.overflowContent,
2528
- disabled: !this.overflowTagIndex || !this.collapseTags
2540
+ disabled: !this.overflowTagIndex || !this.collapseTags,
2541
+ extCls: this.resolveClassName('select-tooltips')
2529
2542
  }]]), (0,external_vue_namespaceObject.createVNode)("input", {
2530
2543
  "ref": "inputRef",
2531
2544
  "style": inputStyle,
@@ -2537,7 +2550,7 @@ const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTER
2537
2550
  "value": !this.filterable ? '' : this.value,
2538
2551
  "onInput": this.handleInput,
2539
2552
  "onKeydown": this.handleKeydown
2540
- }, null)]), (_this$$slots4 = this.$slots) === null || _this$$slots4 === void 0 || (_this$$slots4$suffix = _this$$slots4.suffix) === null || _this$$slots4$suffix === void 0 ? void 0 : _this$$slots4$suffix.call(_this$$slots4)]);
2553
+ }, null)]), (_this$$slots5 = this.$slots) === null || _this$$slots5 === void 0 || (_this$$slots5$suffix = _this$$slots5.suffix) === null || _this$$slots5$suffix === void 0 ? void 0 : _this$$slots5$suffix.call(_this$$slots5)]);
2541
2554
  }
2542
2555
  }));
2543
2556
  ;// CONCATENATED MODULE: ../../packages/select/src/select.tsx
@@ -2748,6 +2761,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
2748
2761
  return pre;
2749
2762
  }, {});
2750
2763
  });
2764
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2751
2765
  var activeOptionValue = (0,external_vue_namespaceObject.ref)(); // 当前悬浮的option
2752
2766
  var listMap = (0,external_vue_namespaceObject.computed)(function () {
2753
2767
  return list.value.reduce(function (pre, item) {
@@ -2960,6 +2974,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
2960
2974
  }
2961
2975
  };
2962
2976
  // 默认搜索方法
2977
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2963
2978
  var defaultSearchMethod = function defaultSearchMethod(searchValue, optionName) {
2964
2979
  var _toLowerCase2;
2965
2980
  var filterData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -3258,6 +3273,15 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3258
3273
  }
3259
3274
  }
3260
3275
  };
3276
+ // 手动设置selected值
3277
+ var setSelected = function setSelected(data) {
3278
+ selected.value = data.map(function (item) {
3279
+ return {
3280
+ label: item[displayKey.value],
3281
+ value: item[idKey.value]
3282
+ };
3283
+ });
3284
+ };
3261
3285
  // 处理键盘事件
3262
3286
  var handleDocumentKeydown = function handleDocumentKeydown(e) {
3263
3287
  if (!isPopoverShow.value || isEnableVirtualRender.value) return;
@@ -3405,7 +3429,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3405
3429
  virtualLineHeight: virtualLineHeight,
3406
3430
  isEnableVirtualRender: isEnableVirtualRender,
3407
3431
  preloadItemCount: preloadItemCount,
3408
- virtualRenderRef: virtualRenderRef
3432
+ virtualRenderRef: virtualRenderRef,
3433
+ setSelected: setSelected
3409
3434
  };
3410
3435
  },
3411
3436
  render: function render() {
@@ -3477,9 +3502,9 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3477
3502
  };
3478
3503
  // 默认trigger输入框渲染
3479
3504
  var renderTriggerInput = function renderTriggerInput() {
3480
- var _this$$slots7;
3505
+ var _this$$slots9;
3481
3506
  if (_this.multipleMode === 'tag') {
3482
- var _this$$slots5;
3507
+ var _this$$slots5, _this$$slots7;
3483
3508
  return (0,external_vue_namespaceObject.createVNode)(selectTagInput, {
3484
3509
  "ref": "selectTagInputRef",
3485
3510
  "modelValue": _this.customOptionName,
@@ -3503,6 +3528,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3503
3528
  selected: _this.selected
3504
3529
  });
3505
3530
  },
3531
+ tagRender: ((_this$$slots7 = _this.$slots) === null || _this$$slots7 === void 0 ? void 0 : _this$$slots7.tagRender) && function (item) {
3532
+ var _this$$slots8;
3533
+ return (_this$$slots8 = _this.$slots) === null || _this$$slots8 === void 0 ? void 0 : _this$$slots8.tagRender(item);
3534
+ },
3506
3535
  suffix: function suffix() {
3507
3536
  return suffixIcon();
3508
3537
  }
@@ -3524,10 +3553,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3524
3553
  "onInput": _this.handleInputChange
3525
3554
  }, _this.prefix ? {
3526
3555
  prefix: _this.prefix
3527
- } : null), select_objectSpread(select_objectSpread({}, typeof ((_this$$slots7 = _this.$slots) === null || _this$$slots7 === void 0 ? void 0 : _this$$slots7.prefix) === 'function' ? {
3556
+ } : null), select_objectSpread(select_objectSpread({}, typeof ((_this$$slots9 = _this.$slots) === null || _this$$slots9 === void 0 ? void 0 : _this$$slots9.prefix) === 'function' ? {
3528
3557
  prefix: function prefix() {
3529
- var _this$$slots8, _this$$slots8$prefix;
3530
- return (_this$$slots8 = _this.$slots) === null || _this$$slots8 === void 0 || (_this$$slots8$prefix = _this$$slots8.prefix) === null || _this$$slots8$prefix === void 0 ? void 0 : _this$$slots8$prefix.call(_this$$slots8);
3558
+ var _this$$slots10, _this$$slots10$prefix;
3559
+ return (_this$$slots10 = _this.$slots) === null || _this$$slots10 === void 0 || (_this$$slots10$prefix = _this$$slots10.prefix) === null || _this$$slots10$prefix === void 0 ? void 0 : _this$$slots10$prefix.call(_this$$slots10);
3531
3560
  }
3532
3561
  } : null), {}, {
3533
3562
  suffix: function suffix() {
@@ -3537,7 +3566,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3537
3566
  };
3538
3567
  // 渲染trigger
3539
3568
  var renderSelectTrigger = function renderSelectTrigger() {
3540
- var _this$$slots9, _this$$slots9$trigger;
3569
+ var _this$$slots11, _this$$slots11$trigge;
3541
3570
  return (0,external_vue_namespaceObject.createVNode)("div", {
3542
3571
  "ref": "triggerRef",
3543
3572
  "style": {
@@ -3547,7 +3576,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3547
3576
  "onClick": _this.handleTogglePopover,
3548
3577
  "onMouseenter": _this.setHover,
3549
3578
  "onMouseleave": _this.cancelHover
3550
- }, [((_this$$slots9 = _this.$slots) === null || _this$$slots9 === void 0 || (_this$$slots9$trigger = _this$$slots9.trigger) === null || _this$$slots9$trigger === void 0 ? void 0 : _this$$slots9$trigger.call(_this$$slots9, {
3579
+ }, [((_this$$slots11 = _this.$slots) === null || _this$$slots11 === void 0 || (_this$$slots11$trigge = _this$$slots11.trigger) === null || _this$$slots11$trigge === void 0 ? void 0 : _this$$slots11$trigge.call(_this$$slots11, {
3551
3580
  selected: _this.selected
3552
3581
  })) || renderTriggerInput()]);
3553
3582
  };
@@ -3565,9 +3594,9 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3565
3594
  }
3566
3595
  }, {
3567
3596
  "default": function _default(_ref3) {
3568
- var _this$$slots10, _this$$slots11;
3597
+ var _this$$slots12, _this$$slots13;
3569
3598
  var data = _ref3.data;
3570
- var optionRender = ((_this$$slots10 = _this.$slots) === null || _this$$slots10 === void 0 ? void 0 : _this$$slots10.optionRender) || ((_this$$slots11 = _this.$slots) === null || _this$$slots11 === void 0 ? void 0 : _this$$slots11.virtualScrollRender);
3599
+ var optionRender = ((_this$$slots12 = _this.$slots) === null || _this$$slots12 === void 0 ? void 0 : _this$$slots12.optionRender) || ((_this$$slots13 = _this.$slots) === null || _this$$slots13 === void 0 ? void 0 : _this$$slots13.virtualScrollRender);
3571
3600
  return data.map(function (item) {
3572
3601
  return (0,external_vue_namespaceObject.createVNode)(src_option, {
3573
3602
  "id": item[_this.idKey],
@@ -3583,15 +3612,15 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3583
3612
  });
3584
3613
  }
3585
3614
  }) : _this.filterList.map(function (item) {
3586
- var _this$$slots12;
3615
+ var _this$$slots14;
3587
3616
  return (0,external_vue_namespaceObject.createVNode)(src_option, {
3588
3617
  "id": item[_this.idKey],
3589
3618
  "key": item[_this.idKey],
3590
3619
  "name": item[_this.displayKey]
3591
- }, (_this$$slots12 = _this.$slots) !== null && _this$$slots12 !== void 0 && _this$$slots12.optionRender ? {
3620
+ }, (_this$$slots14 = _this.$slots) !== null && _this$$slots14 !== void 0 && _this$$slots14.optionRender ? {
3592
3621
  "default": function _default() {
3593
- var _this$$slots13, _this$$slots13$option;
3594
- return (_this$$slots13 = _this.$slots) === null || _this$$slots13 === void 0 || (_this$$slots13$option = _this$$slots13.optionRender) === null || _this$$slots13$option === void 0 ? void 0 : _this$$slots13$option.call(_this$$slots13, {
3622
+ var _this$$slots15, _this$$slots15$option;
3623
+ return (_this$$slots15 = _this.$slots) === null || _this$$slots15 === void 0 || (_this$$slots15$option = _this$$slots15.optionRender) === null || _this$$slots15$option === void 0 ? void 0 : _this$$slots15$option.call(_this$$slots15, {
3595
3624
  item: item
3596
3625
  });
3597
3626
  }
@@ -3600,7 +3629,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3600
3629
  };
3601
3630
  // 渲染内容
3602
3631
  var renderSelectContent = function renderSelectContent() {
3603
- var _this$$slots14, _this$$slots14$defaul, _this$$slots15, _this$$slots16;
3632
+ var _this$$slots16, _this$$slots16$defaul, _this$$slots17, _this$$slots18;
3604
3633
  return (0,external_vue_namespaceObject.createVNode)("div", {
3605
3634
  "ref": "contentRef",
3606
3635
  "class": _this.resolveClassName('select-content-wrapper')
@@ -3636,7 +3665,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3636
3665
  "onScroll": _this.handleScroll
3637
3666
  }, [(0,external_vue_namespaceObject.createVNode)("ul", {
3638
3667
  "class": _this.resolveClassName('select-options')
3639
- }, [renderSelectAll(), renderList(), (_this$$slots14 = _this.$slots) === null || _this$$slots14 === void 0 || (_this$$slots14$defaul = _this$$slots14["default"]) === null || _this$$slots14$defaul === void 0 ? void 0 : _this$$slots14$defaul.call(_this$$slots14), _this.scrollLoading && (0,external_vue_namespaceObject.createVNode)("li", {
3668
+ }, [renderSelectAll(), renderList(), (_this$$slots16 = _this.$slots) === null || _this$$slots16 === void 0 || (_this$$slots16$defaul = _this$$slots16["default"]) === null || _this$$slots16$defaul === void 0 ? void 0 : _this$$slots16$defaul.call(_this$$slots16), _this.scrollLoading && (0,external_vue_namespaceObject.createVNode)("li", {
3640
3669
  "class": _this.resolveClassName('select-options-loading')
3641
3670
  }, [(0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
3642
3671
  "class": "spinner mr5",
@@ -3644,9 +3673,9 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3644
3673
  "mode": "spin",
3645
3674
  "size": "mini",
3646
3675
  "theme": "primary"
3647
- }, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.localLoadingText])])])]), ((_this$$slots15 = _this.$slots) === null || _this$$slots15 === void 0 ? void 0 : _this$$slots15.extension) && (0,external_vue_namespaceObject.createVNode)("div", {
3676
+ }, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.localLoadingText])])])]), ((_this$$slots17 = _this.$slots) === null || _this$$slots17 === void 0 ? void 0 : _this$$slots17.extension) && (0,external_vue_namespaceObject.createVNode)("div", {
3648
3677
  "class": _this.resolveClassName('select-extension')
3649
- }, [(_this$$slots16 = _this.$slots) === null || _this$$slots16 === void 0 ? void 0 : _this$$slots16.extension()])])]);
3678
+ }, [(_this$$slots18 = _this.$slots) === null || _this$$slots18 === void 0 ? void 0 : _this$$slots18.extension()])])]);
3650
3679
  };
3651
3680
  return (0,external_vue_namespaceObject.createVNode)("div", {
3652
3681
  "class": selectClass
@@ -1,8 +1,7 @@
1
1
  import { VNode } from 'vue';
2
- import { SelectedTypeEnum } from '../shared';
3
2
  declare const _default: import("vue").DefineComponent<{
4
3
  id: {
5
- type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
4
+ type: (NumberConstructor | StringConstructor)[];
6
5
  require: boolean;
7
6
  };
8
7
  name: import("vue-types").VueTypeDef<string | number>;
@@ -21,9 +20,9 @@ declare const _default: import("vue").DefineComponent<{
21
20
  multiple: import("vue").ComputedRef<boolean>;
22
21
  isHover: import("vue").ComputedRef<boolean>;
23
22
  showSelectedIcon: import("vue").ComputedRef<boolean>;
24
- selectedStyle: import("vue").ComputedRef<SelectedTypeEnum>;
23
+ selectedStyle: import("vue").ComputedRef<"checkbox" | "check">;
25
24
  optionName: import("vue").ComputedRef<string | number>;
26
- optionID: import("vue").ComputedRef<unknown>;
25
+ optionID: import("vue").ComputedRef<string | number>;
27
26
  highlightKeyword: import("vue").ComputedRef<boolean>;
28
27
  handleOptionClick: () => void;
29
28
  handleMouseEnter: () => void;
@@ -32,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
32
31
  visible: import("vue").Ref<boolean>;
33
32
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
33
  id: {
35
- type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
34
+ type: (NumberConstructor | StringConstructor)[];
36
35
  require: boolean;
37
36
  };
38
37
  name: import("vue-types").VueTypeDef<string | number>;
@@ -601,3 +601,6 @@
601
601
  .bk-popover.bk-pop2-content.bk-select-popover .bk-select-content-wrapper .bk-select-search-wrapper .bk-select-search-input::placeholder {
602
602
  color: var(--light-gray);
603
603
  }
604
+ .bk-select-tooltips {
605
+ max-width: 600px;
606
+ }
@@ -697,6 +697,7 @@ declare const _default: import("vue").DefineComponent<{
697
697
  isEnableVirtualRender: import("vue").ComputedRef<boolean>;
698
698
  preloadItemCount: import("vue").ComputedRef<number>;
699
699
  virtualRenderRef: import("vue").Ref<any>;
700
+ setSelected: (data: Array<object>) => void;
700
701
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "select" | "toggle" | "clear" | "update:modelValue" | "scroll-end" | "tag-remove" | "deselect" | "search-change")[], "blur" | "change" | "focus" | "select" | "toggle" | "clear" | "update:modelValue" | "scroll-end" | "tag-remove" | "deselect" | "search-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
701
702
  modelValue: import("vue-types").VueTypeValidableDef<any>;
702
703
  multiple: import("vue-types").VueTypeValidableDef<boolean> & {
@@ -528,3 +528,7 @@
528
528
  }
529
529
  }
530
530
  }
531
+
532
+ .@{bk-prefix}-select-tooltips {
533
+ max-width: 600px;
534
+ }
@@ -991,3 +991,6 @@
991
991
  .bk-popover.bk-pop2-content.bk-select-popover .bk-select-content-wrapper .bk-select-search-wrapper .bk-select-search-input::placeholder {
992
992
  color: var(--light-gray);
993
993
  }
994
+ .bk-select-tooltips {
995
+ max-width: 600px;
996
+ }
@@ -1,5 +1,4 @@
1
1
  import Popover from '../popover';
2
- import { SelectedTypeEnum } from '../shared';
3
2
  import Option from './option';
4
3
  import Group from './optionGroup';
5
4
  import SelectTagInput from './selectTagInput';
@@ -12,23 +11,23 @@ export type SelectTagInputType = InstanceType<typeof SelectTagInput>;
12
11
  export interface ISelectContext {
13
12
  multiple?: boolean;
14
13
  selected: ISelected[];
15
- activeOptionValue: any;
14
+ activeOptionValue: PropertyKey;
16
15
  showSelectedIcon: boolean;
17
- selectedStyle: SelectedTypeEnum;
16
+ selectedStyle: 'check' | 'checkbox';
18
17
  curSearchValue: string;
19
18
  highlightKeyword: boolean;
20
- register(key: any, option: OptionInstanceType): any;
21
- unregister(key: any): any;
22
- registerGroup(key: any, option: GroupInstanceType): any;
23
- unregisterGroup(key: any): any;
19
+ register(key: PropertyKey, option: OptionInstanceType): void;
20
+ unregister(key: PropertyKey): void;
21
+ registerGroup(key: PropertyKey, option: GroupInstanceType): void;
22
+ unregisterGroup(key: PropertyKey): void;
24
23
  handleOptionSelected(option: OptionInstanceType): void;
25
- handleGetLabelByValue(value: any): number | string;
24
+ handleGetLabelByValue(value: PropertyKey): number | string;
26
25
  }
27
26
  export interface IOptionGroupContext {
28
27
  disabled: boolean;
29
28
  groupCollapse: boolean;
30
- register(key: any, option: OptionInstanceType): any;
31
- unregister(key: any): any;
29
+ register(key: PropertyKey, option: OptionInstanceType): void;
30
+ unregister(key: PropertyKey): void;
32
31
  }
33
32
  export interface ISelectState {
34
33
  currentPlaceholder: string;
@@ -82,6 +82,9 @@ declare const BkTable: {
82
82
  emptyCellText: import("vue-types").VueTypeDef<any> & {
83
83
  default: any;
84
84
  };
85
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
86
+ default: any;
87
+ };
85
88
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
86
89
  rowClass: import("vue-types").VueTypeDef<any> & {
87
90
  default: any;
@@ -251,6 +254,9 @@ declare const BkTable: {
251
254
  emptyCellText: import("vue-types").VueTypeDef<any> & {
252
255
  default: any;
253
256
  };
257
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
258
+ default: any;
259
+ };
254
260
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
255
261
  rowClass: import("vue-types").VueTypeDef<any> & {
256
262
  default: any;
@@ -371,6 +377,7 @@ declare const BkTable: {
371
377
  remotePagination: boolean;
372
378
  acrossAll: boolean;
373
379
  emptyCellText: any;
380
+ isEmptyCell: any;
374
381
  rowClass: any;
375
382
  rowStyle: any;
376
383
  cellStyle: any;
@@ -472,6 +479,9 @@ declare const BkTable: {
472
479
  emptyCellText: import("vue-types").VueTypeDef<any> & {
473
480
  default: any;
474
481
  };
482
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
483
+ default: any;
484
+ };
475
485
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
476
486
  rowClass: import("vue-types").VueTypeDef<any> & {
477
487
  default: any;
@@ -592,6 +602,7 @@ declare const BkTable: {
592
602
  remotePagination: boolean;
593
603
  acrossAll: boolean;
594
604
  emptyCellText: any;
605
+ isEmptyCell: any;
595
606
  rowClass: any;
596
607
  rowStyle: any;
597
608
  cellStyle: any;
@@ -690,6 +701,9 @@ declare const BkTable: {
690
701
  emptyCellText: import("vue-types").VueTypeDef<any> & {
691
702
  default: any;
692
703
  };
704
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
705
+ default: any;
706
+ };
693
707
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
694
708
  rowClass: import("vue-types").VueTypeDef<any> & {
695
709
  default: any;
@@ -810,6 +824,7 @@ declare const BkTable: {
810
824
  remotePagination: boolean;
811
825
  acrossAll: boolean;
812
826
  emptyCellText: any;
827
+ isEmptyCell: any;
813
828
  rowClass: any;
814
829
  rowStyle: any;
815
830
  cellStyle: any;
@@ -17771,6 +17771,12 @@ var tableProps = {
17771
17771
  emptyCellText: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.func.def(function () {
17772
17772
  return '';
17773
17773
  })]).def(''),
17774
+ /**
17775
+ * 判定单元格是否为空
17776
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
17777
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
17778
+ */
17779
+ isEmptyCell: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(external_vue_types_namespaceObject.string), shared_namespaceObject.PropTypes.arrayOf(null), shared_namespaceObject.PropTypes.arrayOf(undefined), shared_namespaceObject.PropTypes.func]).def(['', undefined, null]),
17774
17780
  /**
17775
17781
  * bk-table-setting-content
17776
17782
  */
@@ -22053,6 +22059,21 @@ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MO
22053
22059
  "onChange": handleChecked
22054
22060
  }, null);
22055
22061
  };
22062
+ var isEmptyCellText = function isEmptyCellText(cellText) {
22063
+ if (Array.isArray(props.isEmptyCell)) {
22064
+ return props.isEmptyCell.some(function (item) {
22065
+ return item === cellText;
22066
+ });
22067
+ }
22068
+ if (typeof props.isEmptyCell === 'function') {
22069
+ return props.isEmptyCell({
22070
+ cellText: cellText,
22071
+ row: row,
22072
+ column: column
22073
+ });
22074
+ }
22075
+ return (0,lodash.isEmpty)(cellText);
22076
+ };
22056
22077
  /**
22057
22078
  * 渲染表格Cell内容
22058
22079
  * @param row 当前行
@@ -22076,10 +22097,10 @@ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MO
22076
22097
  if (typeof cell === 'boolean' || typeof cell === 'number') {
22077
22098
  return "".concat(cell);
22078
22099
  }
22079
- if (typeof_typeof(cell) === 'object') {
22100
+ if (typeof_typeof(cell) === 'object' && cell !== null) {
22080
22101
  return JSON.stringify((0,external_vue_namespaceObject.unref)(cell));
22081
22102
  }
22082
- if ((0,lodash.isEmpty)(cell)) {
22103
+ if (isEmptyCellText(cell)) {
22083
22104
  var emptyCellText = props.emptyCellText;
22084
22105
  if (emptyCellText) {
22085
22106
  if (typeof emptyCellText === 'function') {
@@ -409,6 +409,14 @@ export declare const tableProps: {
409
409
  emptyCellText: import("vue-types").VueTypeDef<any> & {
410
410
  default: any;
411
411
  };
412
+ /**
413
+ * 判定单元格是否为空
414
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
415
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
416
+ */
417
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
418
+ default: any;
419
+ };
412
420
  /**
413
421
  * bk-table-setting-content
414
422
  */
@@ -76,6 +76,9 @@ declare const _default: import("vue").DefineComponent<{
76
76
  emptyCellText: import("vue-types").VueTypeDef<any> & {
77
77
  default: any;
78
78
  };
79
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
80
+ default: any;
81
+ };
79
82
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
80
83
  rowClass: import("vue-types").VueTypeDef<any> & {
81
84
  default: any;
@@ -245,6 +248,9 @@ declare const _default: import("vue").DefineComponent<{
245
248
  emptyCellText: import("vue-types").VueTypeDef<any> & {
246
249
  default: any;
247
250
  };
251
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
252
+ default: any;
253
+ };
248
254
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
249
255
  rowClass: import("vue-types").VueTypeDef<any> & {
250
256
  default: any;
@@ -365,6 +371,7 @@ declare const _default: import("vue").DefineComponent<{
365
371
  remotePagination: boolean;
366
372
  acrossAll: boolean;
367
373
  emptyCellText: any;
374
+ isEmptyCell: any;
368
375
  rowClass: any;
369
376
  rowStyle: any;
370
377
  cellStyle: any;
@@ -17746,6 +17746,12 @@ var tableProps = {
17746
17746
  emptyCellText: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.func.def(function () {
17747
17747
  return '';
17748
17748
  })]).def(''),
17749
+ /**
17750
+ * 判定单元格是否为空
17751
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
17752
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
17753
+ */
17754
+ isEmptyCell: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(external_vue_types_namespaceObject.string), shared_namespaceObject.PropTypes.arrayOf(null), shared_namespaceObject.PropTypes.arrayOf(undefined), shared_namespaceObject.PropTypes.func]).def(['', undefined, null]),
17749
17755
  /**
17750
17756
  * bk-table-setting-content
17751
17757
  */