bkui-vue 2.0.2-beta.73 → 2.0.2-beta.75

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.
Files changed (39) hide show
  1. package/dist/cli.css +1 -1
  2. package/dist/index.cjs.js +53 -52
  3. package/dist/index.esm.js +6055 -6018
  4. package/dist/index.umd.js +53 -52
  5. package/dist/style.variable.css +1 -1
  6. package/lib/cascader/cascader.d.ts +6 -2
  7. package/lib/cascader/index.d.ts +12 -4
  8. package/lib/cascader/index.js +2 -0
  9. package/lib/color-picker/index.js +2 -0
  10. package/lib/date-picker/index.js +2 -0
  11. package/lib/directives/index.js +2 -0
  12. package/lib/form/index.js +2 -0
  13. package/lib/image/index.js +2 -0
  14. package/lib/index.js +1 -1
  15. package/lib/input/index.js +2 -0
  16. package/lib/overflow-title/components/overflow-title.d.ts +6 -2
  17. package/lib/overflow-title/index.d.ts +12 -4
  18. package/lib/overflow-title/props.d.ts +3 -1
  19. package/lib/pop-confirm/index.d.ts +12 -4
  20. package/lib/pop-confirm/pop-confirm.d.ts +6 -2
  21. package/lib/pop-confirm/props.d.ts +3 -1
  22. package/lib/popover/index.d.ts +15 -4
  23. package/lib/popover/index.js +3 -1
  24. package/lib/popover/popover.d.ts +7 -2
  25. package/lib/popover/props.d.ts +3 -1
  26. package/lib/search-select/index.js +2 -0
  27. package/lib/select/index.d.ts +21 -7
  28. package/lib/select/index.js +2 -0
  29. package/lib/select/select.d.ts +9 -3
  30. package/lib/tab/index.js +2 -0
  31. package/lib/table/index.js +2 -0
  32. package/lib/tag-input/index.d.ts +70 -6
  33. package/lib/tag-input/index.js +55 -6
  34. package/lib/tag-input/tag-input.css +23 -8
  35. package/lib/tag-input/tag-input.d.ts +34 -17
  36. package/lib/tag-input/tag-input.less +28 -8
  37. package/lib/tag-input/tag-input.variable.css +23 -8
  38. package/lib/tag-input/tag-props.d.ts +13 -1
  39. package/package.json +1 -1
@@ -225,7 +225,9 @@ declare const TagInput: {
225
225
  alignmentAxis?: number;
226
226
  });
227
227
  };
228
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
228
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
229
+ default: string | (() => HTMLElement);
230
+ };
229
231
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
230
232
  default: number;
231
233
  } & {
@@ -301,6 +303,16 @@ declare const TagInput: {
301
303
  type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
302
304
  default: () => {};
303
305
  };
306
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
307
+ default: boolean;
308
+ } & {
309
+ default: boolean;
310
+ };
311
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
312
+ default: string;
313
+ } & {
314
+ default: string;
315
+ };
304
316
  }>> & {
305
317
  onFocus?: (...args: any[]) => any;
306
318
  onBlur?: (...args: any[]) => any;
@@ -310,9 +322,11 @@ declare const TagInput: {
310
322
  "onUpdate:modelValue"?: (...args: any[]) => any;
311
323
  onRemove?: (...args: any[]) => any;
312
324
  onRemoveAll?: (...args: any[]) => any;
325
+ "onCopy-success"?: (...args: any[]) => any;
313
326
  }, {
314
327
  isShowPlaceholder: import("vue").ComputedRef<boolean>;
315
328
  isShowClear: import("vue").ComputedRef<boolean>;
329
+ isShowCopy: import("vue").ComputedRef<boolean>;
316
330
  placeholderText: import("vue").ComputedRef<string>;
317
331
  curInputValue: import("vue").Ref<string>;
318
332
  renderList: import("vue").ComputedRef<any[]>;
@@ -348,6 +362,7 @@ declare const TagInput: {
348
362
  resolveClassName: (cls: string) => string;
349
363
  handleTagDblclick: (isDblclick: any) => void;
350
364
  handleTagDblclickChange: (item: any, index: any, value: any) => void;
365
+ handleCopy: (e: MouseEvent) => void;
351
366
  curPage: import("vue").Ref<number>;
352
367
  totalSize: import("vue").Ref<number>;
353
368
  totalPage: import("vue").Ref<number>;
@@ -370,7 +385,7 @@ declare const TagInput: {
370
385
  crossAxis: number;
371
386
  };
372
387
  };
373
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
388
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll" | "copy-success")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
374
389
  modelValue: import("vue-types").VueTypeDef<string[]> & {
375
390
  default: () => string[];
376
391
  };
@@ -595,7 +610,9 @@ declare const TagInput: {
595
610
  alignmentAxis?: number;
596
611
  });
597
612
  };
598
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
613
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
614
+ default: string | (() => HTMLElement);
615
+ };
599
616
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
600
617
  default: number;
601
618
  } & {
@@ -671,6 +688,16 @@ declare const TagInput: {
671
688
  type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
672
689
  default: () => {};
673
690
  };
691
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
692
+ default: boolean;
693
+ } & {
694
+ default: boolean;
695
+ };
696
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
697
+ default: string;
698
+ } & {
699
+ default: string;
700
+ };
674
701
  }>> & {
675
702
  onFocus?: (...args: any[]) => any;
676
703
  onBlur?: (...args: any[]) => any;
@@ -680,6 +707,7 @@ declare const TagInput: {
680
707
  "onUpdate:modelValue"?: (...args: any[]) => any;
681
708
  onRemove?: (...args: any[]) => any;
682
709
  onRemoveAll?: (...args: any[]) => any;
710
+ "onCopy-success"?: (...args: any[]) => any;
683
711
  }, {
684
712
  disabled: boolean;
685
713
  trigger: "focus" | "search";
@@ -711,6 +739,8 @@ declare const TagInput: {
711
739
  leftSpace: number;
712
740
  popoverProps: {};
713
741
  tagOverflowTips: {};
742
+ copyable: boolean;
743
+ copySeparator: string;
714
744
  }, true, {}, {}, {
715
745
  P: {};
716
746
  B: {};
@@ -943,7 +973,9 @@ declare const TagInput: {
943
973
  alignmentAxis?: number;
944
974
  });
945
975
  };
946
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
976
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
977
+ default: string | (() => HTMLElement);
978
+ };
947
979
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
948
980
  default: number;
949
981
  } & {
@@ -1019,6 +1051,16 @@ declare const TagInput: {
1019
1051
  type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
1020
1052
  default: () => {};
1021
1053
  };
1054
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
1055
+ default: boolean;
1056
+ } & {
1057
+ default: boolean;
1058
+ };
1059
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
1060
+ default: string;
1061
+ } & {
1062
+ default: string;
1063
+ };
1022
1064
  }>> & {
1023
1065
  onFocus?: (...args: any[]) => any;
1024
1066
  onBlur?: (...args: any[]) => any;
@@ -1028,9 +1070,11 @@ declare const TagInput: {
1028
1070
  "onUpdate:modelValue"?: (...args: any[]) => any;
1029
1071
  onRemove?: (...args: any[]) => any;
1030
1072
  onRemoveAll?: (...args: any[]) => any;
1073
+ "onCopy-success"?: (...args: any[]) => any;
1031
1074
  }, {
1032
1075
  isShowPlaceholder: import("vue").ComputedRef<boolean>;
1033
1076
  isShowClear: import("vue").ComputedRef<boolean>;
1077
+ isShowCopy: import("vue").ComputedRef<boolean>;
1034
1078
  placeholderText: import("vue").ComputedRef<string>;
1035
1079
  curInputValue: import("vue").Ref<string>;
1036
1080
  renderList: import("vue").ComputedRef<any[]>;
@@ -1066,6 +1110,7 @@ declare const TagInput: {
1066
1110
  resolveClassName: (cls: string) => string;
1067
1111
  handleTagDblclick: (isDblclick: any) => void;
1068
1112
  handleTagDblclickChange: (item: any, index: any, value: any) => void;
1113
+ handleCopy: (e: MouseEvent) => void;
1069
1114
  curPage: import("vue").Ref<number>;
1070
1115
  totalSize: import("vue").Ref<number>;
1071
1116
  totalPage: import("vue").Ref<number>;
@@ -1119,6 +1164,8 @@ declare const TagInput: {
1119
1164
  leftSpace: number;
1120
1165
  popoverProps: {};
1121
1166
  tagOverflowTips: {};
1167
+ copyable: boolean;
1168
+ copySeparator: string;
1122
1169
  }>;
1123
1170
  __isFragment?: never;
1124
1171
  __isTeleport?: never;
@@ -1348,7 +1395,9 @@ declare const TagInput: {
1348
1395
  alignmentAxis?: number;
1349
1396
  });
1350
1397
  };
1351
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
1398
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
1399
+ default: string | (() => HTMLElement);
1400
+ };
1352
1401
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
1353
1402
  default: number;
1354
1403
  } & {
@@ -1424,6 +1473,16 @@ declare const TagInput: {
1424
1473
  type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
1425
1474
  default: () => {};
1426
1475
  };
1476
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
1477
+ default: boolean;
1478
+ } & {
1479
+ default: boolean;
1480
+ };
1481
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
1482
+ default: string;
1483
+ } & {
1484
+ default: string;
1485
+ };
1427
1486
  }>> & {
1428
1487
  onFocus?: (...args: any[]) => any;
1429
1488
  onBlur?: (...args: any[]) => any;
@@ -1433,9 +1492,11 @@ declare const TagInput: {
1433
1492
  "onUpdate:modelValue"?: (...args: any[]) => any;
1434
1493
  onRemove?: (...args: any[]) => any;
1435
1494
  onRemoveAll?: (...args: any[]) => any;
1495
+ "onCopy-success"?: (...args: any[]) => any;
1436
1496
  }, {
1437
1497
  isShowPlaceholder: import("vue").ComputedRef<boolean>;
1438
1498
  isShowClear: import("vue").ComputedRef<boolean>;
1499
+ isShowCopy: import("vue").ComputedRef<boolean>;
1439
1500
  placeholderText: import("vue").ComputedRef<string>;
1440
1501
  curInputValue: import("vue").Ref<string>;
1441
1502
  renderList: import("vue").ComputedRef<any[]>;
@@ -1471,6 +1532,7 @@ declare const TagInput: {
1471
1532
  resolveClassName: (cls: string) => string;
1472
1533
  handleTagDblclick: (isDblclick: any) => void;
1473
1534
  handleTagDblclickChange: (item: any, index: any, value: any) => void;
1535
+ handleCopy: (e: MouseEvent) => void;
1474
1536
  curPage: import("vue").Ref<number>;
1475
1537
  totalSize: import("vue").Ref<number>;
1476
1538
  totalPage: import("vue").Ref<number>;
@@ -1493,7 +1555,7 @@ declare const TagInput: {
1493
1555
  crossAxis: number;
1494
1556
  };
1495
1557
  };
1496
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll")[], "blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll", {
1558
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll" | "copy-success")[], "blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll" | "copy-success", {
1497
1559
  disabled: boolean;
1498
1560
  trigger: "focus" | "search";
1499
1561
  separator: string;
@@ -1524,6 +1586,8 @@ declare const TagInput: {
1524
1586
  leftSpace: number;
1525
1587
  popoverProps: {};
1526
1588
  tagOverflowTips: {};
1589
+ copyable: boolean;
1590
+ copySeparator: string;
1527
1591
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]>;
1528
1592
  export default TagInput;
1529
1593
  export { useTagsOverflow, TagInput };
@@ -1485,6 +1485,7 @@ function renderArrow() {
1485
1485
  * @returns popper实例
1486
1486
  */
1487
1487
  function createPopperInstance(el, popper) {
1488
+ if (!tooltips_nodeList.get(el)) return;
1488
1489
  var _nodeList$get = tooltips_nodeList.get(el),
1489
1490
  opts = _nodeList$get.opts;
1490
1491
  var placement = opts.placement,
@@ -1525,6 +1526,7 @@ function createPopperInstance(el, popper) {
1525
1526
  * @param el
1526
1527
  */
1527
1528
  function show(el) {
1529
+ if (!tooltips_nodeList.get(el)) return;
1528
1530
  var _nodeList$get2 = tooltips_nodeList.get(el),
1529
1531
  popper = _nodeList$get2.popper,
1530
1532
  opts = _nodeList$get2.opts;
@@ -1631,7 +1633,7 @@ const external_overflow_title_namespaceObject = external_overflow_title_x({ });
1631
1633
  ;// CONCATENATED MODULE: external "../icon"
1632
1634
  var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1633
1635
  var icon_y = x => () => x
1634
- const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error });
1636
+ const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Copy"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Copy, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error });
1635
1637
  ;// CONCATENATED MODULE: external "../loading"
1636
1638
  var loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1637
1639
  var loading_y = x => () => x
@@ -3163,7 +3165,9 @@ var tagProps = function tagProps() {
3163
3165
  "default": function _default() {
3164
3166
  return {};
3165
3167
  }
3166
- }
3168
+ },
3169
+ copyable: shared_namespaceObject.PropTypes.bool.def(true),
3170
+ copySeparator: shared_namespaceObject.PropTypes.string.def('\n')
3167
3171
  };
3168
3172
  };
3169
3173
  /* harmony default export */ const tag_props = (tagProps);
@@ -3403,7 +3407,7 @@ function tag_input_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
3403
3407
  bkTooltips: src_tooltips
3404
3408
  },
3405
3409
  props: tag_props(),
3406
- emits: ['update:modelValue', 'change', 'select', 'focus', 'blur', 'remove', 'removeAll', 'input'],
3410
+ emits: ['update:modelValue', 'change', 'select', 'focus', 'blur', 'remove', 'removeAll', 'input', 'copy-success'],
3407
3411
  setup: function setup(props, _ref) {
3408
3412
  var emit = _ref.emit;
3409
3413
  var formItem = (0,shared_namespaceObject.useFormItem)();
@@ -3466,6 +3470,9 @@ function tag_input_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
3466
3470
  var isShowClear = (0,external_vue_namespaceObject.computed)(function () {
3467
3471
  return props.clearable && !props.disabled && listState.selectedTagList.length !== 0 && (props.showClearOnlyHover ? state.isHover : true);
3468
3472
  });
3473
+ var isShowCopy = (0,external_vue_namespaceObject.computed)(function () {
3474
+ return props.copyable && listState.selectedTagList.length !== 0 && (props.showClearOnlyHover ? state.isHover : true);
3475
+ });
3469
3476
  var triggerClass = (0,external_vue_namespaceObject.computed)(function () {
3470
3477
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(resolveClassName('tag-input-trigger')), true), "active", state.isEdit), "disabled", props.disabled);
3471
3478
  });
@@ -4282,11 +4289,46 @@ function tag_input_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
4282
4289
  return acc;
4283
4290
  }, []);
4284
4291
  });
4292
+ var handleCopy = function handleCopy(e) {
4293
+ var _navigator$clipboard;
4294
+ e.stopPropagation();
4295
+ // 获取选中的 tag 列表
4296
+ var selectedTags = listState.selectedTagList;
4297
+ if (selectedTags.length === 0) {
4298
+ return;
4299
+ }
4300
+ // 将选中的 tags 按换行分隔
4301
+ var copyText = selectedTags.map(function (tag) {
4302
+ return tag[props.displayKey];
4303
+ }).join(props.copySeparator);
4304
+ if ((_navigator$clipboard = navigator.clipboard) !== null && _navigator$clipboard !== void 0 && _navigator$clipboard.writeText) {
4305
+ navigator.clipboard.writeText(copyText)["catch"](function (err) {
4306
+ console.error('Failed to copy:', err);
4307
+ });
4308
+ } else {
4309
+ var textarea = document.createElement('textarea');
4310
+ textarea.value = copyText;
4311
+ textarea.style.position = 'fixed';
4312
+ textarea.style.opacity = '0';
4313
+ document.body.appendChild(textarea);
4314
+ textarea.select();
4315
+ try {
4316
+ document.execCommand('copy');
4317
+ } catch (err) {
4318
+ console.error('Failed to copy:', err);
4319
+ }
4320
+ document.body.removeChild(textarea);
4321
+ }
4322
+ setTimeout(function () {
4323
+ emit('copy-success', tagList.value);
4324
+ });
4325
+ };
4285
4326
  return tag_input_objectSpread(tag_input_objectSpread(tag_input_objectSpread(tag_input_objectSpread({
4286
4327
  popoverProps: popoverProps
4287
4328
  }, (0,external_vue_namespaceObject.toRefs)(state)), (0,external_vue_namespaceObject.toRefs)(listState)), (0,external_vue_namespaceObject.toRefs)(pageState)), {}, {
4288
4329
  isShowPlaceholder: isShowPlaceholder,
4289
4330
  isShowClear: isShowClear,
4331
+ isShowCopy: isShowCopy,
4290
4332
  placeholderText: placeholderText,
4291
4333
  curInputValue: curInputValue,
4292
4334
  renderList: renderList,
@@ -4315,7 +4357,8 @@ function tag_input_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
4315
4357
  handlePaste: handlePaste,
4316
4358
  resolveClassName: resolveClassName,
4317
4359
  handleTagDblclick: handleTagDblclick,
4318
- handleTagDblclickChange: handleTagDblclickChange
4360
+ handleTagDblclickChange: handleTagDblclickChange,
4361
+ handleCopy: handleCopy
4319
4362
  });
4320
4363
  },
4321
4364
  render: function render() {
@@ -4403,10 +4446,16 @@ function tag_input_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
4403
4446
  "style": "position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"
4404
4447
  }, [_this.curInputValue])]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("p", {
4405
4448
  "class": "placeholder"
4406
- }, [_this.placeholderText]), [[external_vue_namespaceObject.vShow, _this.isShowPlaceholder]]), (_this$$slots$suffix = (_this$$slots = _this.$slots) === null || _this$$slots === void 0 || (_this$$slots$suffix2 = _this$$slots.suffix) === null || _this$$slots$suffix2 === void 0 ? void 0 : _this$$slots$suffix2.call(_this$$slots)) !== null && _this$$slots$suffix !== void 0 ? _this$$slots$suffix : _this.isShowClear && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
4449
+ }, [_this.placeholderText]), [[external_vue_namespaceObject.vShow, _this.isShowPlaceholder]]), (_this$$slots$suffix = (_this$$slots = _this.$slots) === null || _this$$slots === void 0 || (_this$$slots$suffix2 = _this$$slots.suffix) === null || _this$$slots$suffix2 === void 0 ? void 0 : _this$$slots$suffix2.call(_this$$slots)) !== null && _this$$slots$suffix !== void 0 ? _this$$slots$suffix : (0,external_vue_namespaceObject.createVNode)("div", {
4450
+ "class": "icon-wrapper"
4451
+ }, [_this.isShowCopy && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Copy, {
4452
+ "class": "copy-icon",
4453
+ "title": "\u590D\u5236",
4454
+ "onClick": _this.handleCopy
4455
+ }, null), _this.isShowClear && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
4407
4456
  "class": "clear-icon",
4408
4457
  "onClick": _this.handleClear
4409
- }, null)]);
4458
+ }, null)])]);
4410
4459
  },
4411
4460
  content: function content() {
4412
4461
  return (0,external_vue_namespaceObject.createVNode)("div", {
@@ -34,6 +34,7 @@
34
34
  overflow: auto;
35
35
  }
36
36
  .bk-tag-input .bk-tag-input-trigger .tag-list > li {
37
+ position: relative;
37
38
  display: inline-flex;
38
39
  align-items: center;
39
40
  height: 22px;
@@ -42,7 +43,6 @@
42
43
  font-size: 12px;
43
44
  border: solid 1px transparent;
44
45
  border-radius: 2px;
45
- position: relative;
46
46
  }
47
47
  .bk-tag-input .bk-tag-input-trigger .tag-list > li.tag-item {
48
48
  background: #f0f1f5;
@@ -63,19 +63,19 @@
63
63
  white-space: nowrap;
64
64
  }
65
65
  .bk-tag-input .bk-tag-input-trigger .tag-list .tag .dblclick-edit-input {
66
- background-color: #e1ecff;
67
- border: none;
68
- height: 100%;
69
- max-width: 100%;
70
- padding: 0px 8px;
71
66
  position: absolute;
72
- resize: none;
73
67
  top: 0px;
74
68
  width: 100%;
69
+ max-width: 100%;
70
+ height: 100%;
71
+ padding: 0px 8px;
72
+ resize: none;
73
+ background-color: #e1ecff;
74
+ border: none;
75
75
  }
76
76
  .bk-tag-input .bk-tag-input-trigger .tag-list .tag .dblclick-edit-input:focus {
77
- outline: none;
78
77
  border: none;
78
+ outline: none;
79
79
  }
80
80
  .bk-tag-input .bk-tag-input-trigger .tag-list .text {
81
81
  box-sizing: border-box;
@@ -111,6 +111,11 @@
111
111
  text-overflow: ellipsis;
112
112
  white-space: nowrap;
113
113
  }
114
+ .bk-tag-input .bk-tag-input-trigger .icon-wrapper {
115
+ display: inline-flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ }
114
119
  .bk-tag-input .bk-tag-input-trigger .clear-icon {
115
120
  margin-right: 5px;
116
121
  font-size: 14px;
@@ -121,6 +126,16 @@
121
126
  .bk-tag-input .bk-tag-input-trigger .clear-icon:hover {
122
127
  color: #979ba5;
123
128
  }
129
+ .bk-tag-input .bk-tag-input-trigger .copy-icon {
130
+ margin-right: 5px;
131
+ font-size: 14px;
132
+ line-height: 0;
133
+ color: #c4c6cc;
134
+ cursor: pointer;
135
+ }
136
+ .bk-tag-input .bk-tag-input-trigger .copy-icon:hover {
137
+ color: #979ba5;
138
+ }
124
139
  .bk-tag-input-popover-content.bk-popover {
125
140
  padding: 0 !important;
126
141
  }
@@ -224,7 +224,9 @@ declare const _default: import("vue").DefineComponent<{
224
224
  alignmentAxis?: number;
225
225
  });
226
226
  };
227
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
227
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
228
+ default: string | (() => HTMLElement);
229
+ };
228
230
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
229
231
  default: number;
230
232
  } & {
@@ -244,13 +246,7 @@ declare const _default: import("vue").DefineComponent<{
244
246
  default: boolean;
245
247
  } & {
246
248
  default: boolean;
247
- }; /**
248
- * 不显示条件:
249
- * 1. 设置不可清除
250
- * 2. 禁用时
251
- * 3. tag标签为空时
252
- * 4. 设置了showClearOnlyHover,且没有hover的时候
253
- */
249
+ };
254
250
  disableOutsideClick: import("vue-types").VueTypeValidableDef<boolean> & {
255
251
  default: boolean;
256
252
  } & {
@@ -306,9 +302,20 @@ declare const _default: import("vue").DefineComponent<{
306
302
  type: import("vue").PropType<Partial<import("../directives").IOptions>>;
307
303
  default: () => {};
308
304
  };
305
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
306
+ default: boolean;
307
+ } & {
308
+ default: boolean;
309
+ };
310
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
311
+ default: string;
312
+ } & {
313
+ default: string;
314
+ };
309
315
  }, {
310
316
  isShowPlaceholder: import("vue").ComputedRef<boolean>;
311
317
  isShowClear: import("vue").ComputedRef<boolean>;
318
+ isShowCopy: import("vue").ComputedRef<boolean>;
312
319
  placeholderText: import("vue").ComputedRef<string>;
313
320
  curInputValue: Ref<string>;
314
321
  renderList: import("vue").ComputedRef<any[]>;
@@ -344,6 +351,7 @@ declare const _default: import("vue").DefineComponent<{
344
351
  resolveClassName: (cls: string) => string;
345
352
  handleTagDblclick: (isDblclick: any) => void;
346
353
  handleTagDblclickChange: (item: any, index: any, value: any) => void;
354
+ handleCopy: (e: MouseEvent) => void;
347
355
  curPage: Ref<number>;
348
356
  totalSize: Ref<number>;
349
357
  totalPage: Ref<number>;
@@ -366,7 +374,7 @@ declare const _default: import("vue").DefineComponent<{
366
374
  crossAxis: number;
367
375
  };
368
376
  };
369
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll")[], "blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
377
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll" | "copy-success")[], "blur" | "change" | "focus" | "input" | "select" | "update:modelValue" | "remove" | "removeAll" | "copy-success", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
370
378
  modelValue: import("vue-types").VueTypeDef<string[]> & {
371
379
  default: () => string[];
372
380
  };
@@ -591,7 +599,9 @@ declare const _default: import("vue").DefineComponent<{
591
599
  alignmentAxis?: number;
592
600
  });
593
601
  };
594
- boundary: import("vue-types").VueTypeDef<string | HTMLElement>;
602
+ boundary: import("vue-types").VueTypeDef<string | HTMLElement> & {
603
+ default: string | (() => HTMLElement);
604
+ };
595
605
  zIndex: import("vue-types").VueTypeValidableDef<number> & {
596
606
  default: number;
597
607
  } & {
@@ -611,13 +621,7 @@ declare const _default: import("vue").DefineComponent<{
611
621
  default: boolean;
612
622
  } & {
613
623
  default: boolean;
614
- }; /**
615
- * 不显示条件:
616
- * 1. 设置不可清除
617
- * 2. 禁用时
618
- * 3. tag标签为空时
619
- * 4. 设置了showClearOnlyHover,且没有hover的时候
620
- */
624
+ };
621
625
  disableOutsideClick: import("vue-types").VueTypeValidableDef<boolean> & {
622
626
  default: boolean;
623
627
  } & {
@@ -673,6 +677,16 @@ declare const _default: import("vue").DefineComponent<{
673
677
  type: import("vue").PropType<Partial<import("../directives").IOptions>>;
674
678
  default: () => {};
675
679
  };
680
+ copyable: import("vue-types").VueTypeValidableDef<boolean> & {
681
+ default: boolean;
682
+ } & {
683
+ default: boolean;
684
+ };
685
+ copySeparator: import("vue-types").VueTypeValidableDef<string> & {
686
+ default: string;
687
+ } & {
688
+ default: string;
689
+ };
676
690
  }>> & {
677
691
  onFocus?: (...args: any[]) => any;
678
692
  onBlur?: (...args: any[]) => any;
@@ -682,6 +696,7 @@ declare const _default: import("vue").DefineComponent<{
682
696
  "onUpdate:modelValue"?: (...args: any[]) => any;
683
697
  onRemove?: (...args: any[]) => any;
684
698
  onRemoveAll?: (...args: any[]) => any;
699
+ "onCopy-success"?: (...args: any[]) => any;
685
700
  }, {
686
701
  disabled: boolean;
687
702
  trigger: "focus" | "search";
@@ -713,5 +728,7 @@ declare const _default: import("vue").DefineComponent<{
713
728
  leftSpace: number;
714
729
  popoverProps: {};
715
730
  tagOverflowTips: {};
731
+ copyable: boolean;
732
+ copySeparator: string;
716
733
  }, {}>;
717
734
  export default _default;
@@ -41,6 +41,7 @@
41
41
  overflow: auto;
42
42
 
43
43
  > li {
44
+ position: relative;
44
45
  display: inline-flex;
45
46
  align-items: center;
46
47
  height: 22px;
@@ -49,7 +50,6 @@
49
50
  font-size: 12px;
50
51
  border: solid 1px transparent;
51
52
  border-radius: 2px;
52
- position: relative;
53
53
 
54
54
  &.tag-item {
55
55
  background: #f0f1f5;
@@ -71,19 +71,21 @@
71
71
  text-overflow: ellipsis;
72
72
  word-break: break-all;
73
73
  white-space: nowrap;
74
+
74
75
  .dblclick-edit-input {
75
- background-color: rgb(225, 236, 255);
76
- border: none;
77
- height: 100%;
78
- max-width: 100%;
79
- padding: 0px 8px;
80
76
  position: absolute;
81
- resize: none;
82
77
  top: 0px;
83
78
  width: 100%;
79
+ max-width: 100%;
80
+ height: 100%;
81
+ padding: 0px 8px;
82
+ resize: none;
83
+ background-color: rgb(225, 236, 255);
84
+ border: none;
85
+
84
86
  &:focus {
85
- outline: none;
86
87
  border: none;
88
+ outline: none;
87
89
  }
88
90
  }
89
91
  }
@@ -127,6 +129,12 @@
127
129
  white-space: nowrap;
128
130
  }
129
131
 
132
+ .icon-wrapper {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ }
137
+
130
138
  .clear-icon {
131
139
  margin-right: 5px;
132
140
  font-size: 14px;
@@ -138,6 +146,18 @@
138
146
  color: @gray-color;
139
147
  }
140
148
  }
149
+
150
+ .copy-icon {
151
+ margin-right: 5px;
152
+ font-size: 14px;
153
+ line-height: 0;
154
+ color: @light-gray;
155
+ cursor: pointer;
156
+
157
+ &:hover {
158
+ color: @gray-color;
159
+ }
160
+ }
141
161
  }
142
162
  }
143
163
 
@@ -165,6 +165,7 @@
165
165
  overflow: auto;
166
166
  }
167
167
  .bk-tag-input .bk-tag-input-trigger .tag-list > li {
168
+ position: relative;
168
169
  display: inline-flex;
169
170
  align-items: center;
170
171
  height: 22px;
@@ -173,7 +174,6 @@
173
174
  font-size: 12px;
174
175
  border: solid 1px transparent;
175
176
  border-radius: 2px;
176
- position: relative;
177
177
  }
178
178
  .bk-tag-input .bk-tag-input-trigger .tag-list > li.tag-item {
179
179
  background: #f0f1f5;
@@ -194,19 +194,19 @@
194
194
  white-space: nowrap;
195
195
  }
196
196
  .bk-tag-input .bk-tag-input-trigger .tag-list .tag .dblclick-edit-input {
197
- background-color: #e1ecff;
198
- border: none;
199
- height: 100%;
200
- max-width: 100%;
201
- padding: 0px 8px;
202
197
  position: absolute;
203
- resize: none;
204
198
  top: 0px;
205
199
  width: 100%;
200
+ max-width: 100%;
201
+ height: 100%;
202
+ padding: 0px 8px;
203
+ resize: none;
204
+ background-color: #e1ecff;
205
+ border: none;
206
206
  }
207
207
  .bk-tag-input .bk-tag-input-trigger .tag-list .tag .dblclick-edit-input:focus {
208
- outline: none;
209
208
  border: none;
209
+ outline: none;
210
210
  }
211
211
  .bk-tag-input .bk-tag-input-trigger .tag-list .text {
212
212
  box-sizing: border-box;
@@ -242,6 +242,11 @@
242
242
  text-overflow: ellipsis;
243
243
  white-space: nowrap;
244
244
  }
245
+ .bk-tag-input .bk-tag-input-trigger .icon-wrapper {
246
+ display: inline-flex;
247
+ align-items: center;
248
+ justify-content: center;
249
+ }
245
250
  .bk-tag-input .bk-tag-input-trigger .clear-icon {
246
251
  margin-right: 5px;
247
252
  font-size: 14px;
@@ -252,6 +257,16 @@
252
257
  .bk-tag-input .bk-tag-input-trigger .clear-icon:hover {
253
258
  color: var(--gray-color);
254
259
  }
260
+ .bk-tag-input .bk-tag-input-trigger .copy-icon {
261
+ margin-right: 5px;
262
+ font-size: 14px;
263
+ line-height: 0;
264
+ color: var(--light-gray);
265
+ cursor: pointer;
266
+ }
267
+ .bk-tag-input .bk-tag-input-trigger .copy-icon:hover {
268
+ color: var(--gray-color);
269
+ }
255
270
  .bk-tag-input-popover-content.bk-popover {
256
271
  padding: 0 !important;
257
272
  }