bkui-vue 2.0.1-beta.37 → 2.0.1-beta.39

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.37";
7
+ export const version = "2.0.1-beta.39";
8
8
  window.__bkui_vue_version__ = version;
@@ -606,7 +606,7 @@ var genDefaultState = function genDefaultState() {
606
606
  },
607
607
  onConfirm: function onConfirm() {},
608
608
  onCancel: function onCancel() {},
609
- onClose: function onClose() {}
609
+ onClose: undefined
610
610
  };
611
611
  };
612
612
  /* harmony default export */ const render_component = ((0,external_vue_namespaceObject.defineComponent)({
@@ -670,11 +670,9 @@ var genDefaultState = function genDefaultState() {
670
670
  }
671
671
  return _context2.abrupt("return");
672
672
  case 5:
673
- _context2.next = 7;
674
- return state.onCancel();
675
- case 7:
673
+ state.onCancel();
676
674
  isShow.value = false;
677
- case 8:
675
+ case 7:
678
676
  case "end":
679
677
  return _context2.stop();
680
678
  }
@@ -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;
@@ -1,5 +1,10 @@
1
1
  declare const Upload: {
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
3
+ type: {
4
+ type: import("vue").PropType<"formdata" | "binary">;
5
+ default: "formdata" | "binary";
6
+ validator: (val: import("./upload.type").ETypes) => boolean;
7
+ };
3
8
  theme: {
4
9
  type: import("vue").PropType<"button" | "picture" | "draggable">;
5
10
  default: "button" | "picture" | "draggable";
@@ -117,6 +122,11 @@ declare const Upload: {
117
122
  onSuccess?: (...args: any[]) => any;
118
123
  onExceed?: (...args: any[]) => any;
119
124
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("done" | "error" | "progress" | "delete" | "success" | "exceed")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
125
+ type: {
126
+ type: import("vue").PropType<"formdata" | "binary">;
127
+ default: "formdata" | "binary";
128
+ validator: (val: import("./upload.type").ETypes) => boolean;
129
+ };
120
130
  theme: {
121
131
  type: import("vue").PropType<"button" | "picture" | "draggable">;
122
132
  default: "button" | "picture" | "draggable";
@@ -235,6 +245,7 @@ declare const Upload: {
235
245
  onExceed?: (...args: any[]) => any;
236
246
  }, {
237
247
  name: string;
248
+ type: "formdata" | "binary";
238
249
  data: import("./upload.type").ExtraFormData | import("./upload.type").ExtraFormData[];
239
250
  header: import("./upload.type").HeaderDataAttr | import("./upload.type").HeaderDataAttr[];
240
251
  extCls: string;
@@ -263,6 +274,11 @@ declare const Upload: {
263
274
  M: {};
264
275
  Defaults: {};
265
276
  }, Readonly<import("vue").ExtractPropTypes<{
277
+ type: {
278
+ type: import("vue").PropType<"formdata" | "binary">;
279
+ default: "formdata" | "binary";
280
+ validator: (val: import("./upload.type").ETypes) => boolean;
281
+ };
266
282
  theme: {
267
283
  type: import("vue").PropType<"button" | "picture" | "draggable">;
268
284
  default: "button" | "picture" | "draggable";
@@ -381,6 +397,7 @@ declare const Upload: {
381
397
  onExceed?: (...args: any[]) => any;
382
398
  }, () => JSX.Element, {}, {}, {}, {
383
399
  name: string;
400
+ type: "formdata" | "binary";
384
401
  data: import("./upload.type").ExtraFormData | import("./upload.type").ExtraFormData[];
385
402
  header: import("./upload.type").HeaderDataAttr | import("./upload.type").HeaderDataAttr[];
386
403
  extCls: string;
@@ -406,6 +423,11 @@ declare const Upload: {
406
423
  __isTeleport?: never;
407
424
  __isSuspense?: never;
408
425
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
426
+ type: {
427
+ type: import("vue").PropType<"formdata" | "binary">;
428
+ default: "formdata" | "binary";
429
+ validator: (val: import("./upload.type").ETypes) => boolean;
430
+ };
409
431
  theme: {
410
432
  type: import("vue").PropType<"button" | "picture" | "draggable">;
411
433
  default: "button" | "picture" | "draggable";
@@ -524,6 +546,7 @@ declare const Upload: {
524
546
  onExceed?: (...args: any[]) => any;
525
547
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("done" | "error" | "progress" | "delete" | "success" | "exceed")[], "done" | "error" | "progress" | "delete" | "success" | "exceed", {
526
548
  name: string;
549
+ type: "formdata" | "binary";
527
550
  data: import("./upload.type").ExtraFormData | import("./upload.type").ExtraFormData[];
528
551
  header: import("./upload.type").HeaderDataAttr | import("./upload.type").HeaderDataAttr[];
529
552
  extCls: string;