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

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 (47) hide show
  1. package/dist/index.cjs.js +40 -34
  2. package/dist/index.esm.js +164 -60
  3. package/dist/index.umd.js +39 -33
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/breadcrumb/index.js +1 -1
  7. package/lib/button/index.js +1 -1
  8. package/lib/checkbox/checkbox.d.ts +4 -10
  9. package/lib/checkbox/common.d.ts +1 -0
  10. package/lib/checkbox/index.d.ts +8 -16
  11. package/lib/checkbox/index.js +1 -1
  12. package/lib/collapse/collapse-panel.d.ts +2 -7
  13. package/lib/collapse/index.d.ts +2 -7
  14. package/lib/collapse/index.js +1 -1
  15. package/lib/collapse/props.d.ts +1 -3
  16. package/lib/dialog/dialog.d.ts +2 -2
  17. package/lib/dialog/index.d.ts +4 -4
  18. package/lib/dialog/props.d.ts +1 -1
  19. package/lib/exception/index.js +1 -1
  20. package/lib/form/form.css +0 -1
  21. package/lib/form/form.less +0 -1
  22. package/lib/form/form.variable.css +0 -1
  23. package/lib/modal/index.d.ts +5 -5
  24. package/lib/modal/index.js +1 -1
  25. package/lib/modal/modal.d.ts +2 -2
  26. package/lib/modal/props.mixin.d.ts +1 -2
  27. package/lib/shared/index.js +1 -1
  28. package/lib/shared/utils.d.ts +6 -0
  29. package/lib/sideslider/index.d.ts +4 -4
  30. package/lib/sideslider/sideslider.d.ts +2 -2
  31. package/lib/tab/index.d.ts +2 -2
  32. package/lib/tab/index.js +1 -1
  33. package/lib/tab/props.d.ts +1 -2
  34. package/lib/tab/tab-panel.d.ts +2 -2
  35. package/lib/tab/tab.css +1 -1
  36. package/lib/tab/tab.less +26 -28
  37. package/lib/tab/tab.variable.css +1 -1
  38. package/lib/table/index.js +1 -1
  39. package/lib/table/table.css +6 -0
  40. package/lib/table/table.less +4 -0
  41. package/lib/table/table.variable.css +6 -0
  42. package/lib/tag-input/index.d.ts +20 -1
  43. package/lib/tag-input/index.js +1 -1
  44. package/lib/tag-input/tag-input.d.ts +9 -0
  45. package/lib/tag-input/tag-props.d.ts +5 -0
  46. package/lib/tag-input/tag-render.d.ts +30 -1
  47. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -7354,6 +7354,41 @@ const observerResize$1 = (root, callbackFn, delay = 60, immediate = false) => {
7354
7354
  };
7355
7355
  };
7356
7356
  const capitalize = (str) => str[0].toUpperCase() + str.slice(1);
7357
+ function checkOverflow(el) {
7358
+ if (!el)
7359
+ return false;
7360
+ const createDom = (el2, css) => {
7361
+ const dom = document.createElement("div");
7362
+ const width = parseFloat(css.width) ? `${Math.ceil(parseFloat(css.width))}px` : css.width;
7363
+ dom.style.cssText = `
7364
+ width: ${width};
7365
+ line-height: ${css["line-height"]};
7366
+ font-size: ${css["font-size"]};
7367
+ word-break: ${css["word-break"]};
7368
+ padding: ${css.padding};
7369
+ `;
7370
+ dom.textContent = el2.textContent;
7371
+ return dom;
7372
+ };
7373
+ let isOverflow = false;
7374
+ try {
7375
+ const css = window.getComputedStyle(el, null);
7376
+ const lineClamp = css.webkitLineClamp;
7377
+ if (lineClamp !== "none") {
7378
+ const targetHeight = parseFloat(css.height);
7379
+ const dom = createDom(el, css);
7380
+ document.body.appendChild(dom);
7381
+ const domHeight = window.getComputedStyle(dom, null).height;
7382
+ document.body.removeChild(dom);
7383
+ isOverflow = targetHeight < parseFloat(domHeight);
7384
+ } else {
7385
+ isOverflow = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
7386
+ }
7387
+ } catch (e) {
7388
+ console.warn("There is an error when check element overflow state: ", e);
7389
+ }
7390
+ return isOverflow;
7391
+ }
7357
7392
  class BkMaskManager {
7358
7393
  constructor(config) {
7359
7394
  this.multiInstance = false;
@@ -7889,11 +7924,6 @@ var SizeEnum = /* @__PURE__ */ ((SizeEnum2) => {
7889
7924
  SizeEnum2["DEFAULT"] = "default";
7890
7925
  return SizeEnum2;
7891
7926
  })(SizeEnum || {});
7892
- var RenderDirectiveEnum = /* @__PURE__ */ ((RenderDirectiveEnum2) => {
7893
- RenderDirectiveEnum2["IF"] = "if";
7894
- RenderDirectiveEnum2["SHOW"] = "show";
7895
- return RenderDirectiveEnum2;
7896
- })(RenderDirectiveEnum || {});
7897
7927
  function renderDirectiveType() {
7898
7928
  return j("renderDirective", {
7899
7929
  default: "show"
@@ -9166,8 +9196,25 @@ var BreadcrumbItem = defineComponent({
9166
9196
  const classCtx = classes({
9167
9197
  "bk-breadcrumb-item": true
9168
9198
  }, `${props2.extCls || ""}`);
9199
+ const renderSeparator = () => {
9200
+ if (slots.separator) {
9201
+ return slots.separator();
9202
+ }
9203
+ if (parent.separatorClass) {
9204
+ return createVNode("i", {
9205
+ "class": `bk-breadcrumb-separator ${parent.separatorClass}`
9206
+ }, null);
9207
+ }
9208
+ if (parent.separator) {
9209
+ return createVNode("span", {
9210
+ "class": "bk-breadcrumb-separator",
9211
+ "role": "presentation"
9212
+ }, [parent == null ? void 0 : parent.separator]);
9213
+ }
9214
+ return null;
9215
+ };
9169
9216
  return () => {
9170
- var _a, _b;
9217
+ var _a;
9171
9218
  return createVNode("span", {
9172
9219
  "class": classCtx
9173
9220
  }, [createVNode("span", {
@@ -9175,12 +9222,7 @@ var BreadcrumbItem = defineComponent({
9175
9222
  "class": `bk-breadcrumb-item-inner ${props2.to ? "is-link" : ""}`,
9176
9223
  "role": "link",
9177
9224
  "onClick": handleClick
9178
- }, [(_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)]), (slots == null ? void 0 : slots.separator) ? (_b = slots == null ? void 0 : slots.separator) == null ? void 0 : _b.call(slots) : (parent == null ? void 0 : parent.separatorClass) ? createVNode("i", {
9179
- "class": `bk-breadcrumb-separator ${parent.separatorClass}`
9180
- }, null) : createVNode("span", {
9181
- "class": "bk-breadcrumb-separator",
9182
- "role": "presentation"
9183
- }, [parent == null ? void 0 : parent.separator])]);
9225
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSeparator()]);
9184
9226
  };
9185
9227
  }
9186
9228
  });
@@ -9337,10 +9379,10 @@ var Component$y = defineComponent({
9337
9379
  if (isHover.value && !props2.text)
9338
9380
  return "white";
9339
9381
  if (props2.text && props2.disabled)
9340
- return "";
9382
+ return;
9341
9383
  return props2.hoverTheme || props2.theme;
9342
9384
  }
9343
- return ["", "default"].includes(props2.theme) ? "" : "white";
9385
+ return !props2.theme ? void 0 : "white";
9344
9386
  });
9345
9387
  const loadingSize = computed(() => isText.value || props2.size === BkLoadingSize.Small ? BkLoadingSize.Mini : BkLoadingSize.Small);
9346
9388
  const handleClick = (e) => {
@@ -9798,6 +9840,7 @@ const useCheckbox = () => {
9798
9840
  } = currentInstance;
9799
9841
  const checkboxGroup = inject(checkboxGroupKey, EMPTY_OBJ);
9800
9842
  const isGroup = !isEmptyObj(checkboxGroup);
9843
+ const inputRef = ref();
9801
9844
  const isChecked = ref(props2.checked);
9802
9845
  const isDisabled = computed(() => {
9803
9846
  if (isGroup && checkboxGroup.props.disabled) {
@@ -9805,6 +9848,19 @@ const useCheckbox = () => {
9805
9848
  }
9806
9849
  return props2.disabled;
9807
9850
  });
9851
+ const triggerChange = () => {
9852
+ const nextValue = isChecked.value ? props2.trueLabel : props2.falseLabel;
9853
+ emit("update:modelValue", nextValue);
9854
+ emit("change", nextValue);
9855
+ if (isGroup) {
9856
+ checkboxGroup.handleChange();
9857
+ }
9858
+ nextTick(() => {
9859
+ if (inputRef.value.checked !== isChecked.value) {
9860
+ inputRef.value.checked = isChecked.value;
9861
+ }
9862
+ });
9863
+ };
9808
9864
  if (isGroup) {
9809
9865
  watch(() => checkboxGroup.props.modelValue, (modelValue) => {
9810
9866
  isChecked.value = modelValue.includes(props2.label);
@@ -9821,6 +9877,10 @@ const useCheckbox = () => {
9821
9877
  immediate: true
9822
9878
  });
9823
9879
  }
9880
+ watch(() => props2.checked, () => {
9881
+ isChecked.value = props2.checked;
9882
+ triggerChange();
9883
+ });
9824
9884
  const setChecked = (value = true) => {
9825
9885
  isChecked.value = value;
9826
9886
  };
@@ -9830,17 +9890,7 @@ const useCheckbox = () => {
9830
9890
  }
9831
9891
  const $targetInput = event.target;
9832
9892
  isChecked.value = $targetInput.checked;
9833
- const nextValue = isChecked.value ? props2.trueLabel : props2.falseLabel;
9834
- emit("update:modelValue", nextValue);
9835
- emit("change", nextValue);
9836
- if (isGroup) {
9837
- checkboxGroup.handleChange();
9838
- }
9839
- nextTick(() => {
9840
- if ($targetInput.checked !== isChecked.value) {
9841
- $targetInput.checked = isChecked.value;
9842
- }
9843
- });
9893
+ triggerChange();
9844
9894
  };
9845
9895
  onMounted(() => {
9846
9896
  if (isGroup) {
@@ -9853,6 +9903,7 @@ const useCheckbox = () => {
9853
9903
  }
9854
9904
  });
9855
9905
  return {
9906
+ inputRef,
9856
9907
  isChecked,
9857
9908
  isDisabled,
9858
9909
  setChecked,
@@ -9860,10 +9911,10 @@ const useCheckbox = () => {
9860
9911
  };
9861
9912
  };
9862
9913
  const checkboxProps = {
9863
- modelValue: PropTypes.oneOfType([String, Number, Boolean]).def(""),
9914
+ modelValue: PropTypes.oneOfType([String, Number, Boolean]),
9864
9915
  label: PropTypes.oneOfType([String, Number, Boolean]),
9865
9916
  trueLabel: PropTypes.oneOfType([String, Number, Boolean]).def(true),
9866
- falseLabel: PropTypes.oneOfType([String, Number, Boolean]).def(""),
9917
+ falseLabel: PropTypes.oneOfType([String, Number, Boolean]).def(false),
9867
9918
  disabled: PropTypes.bool.def(false),
9868
9919
  checked: PropTypes.bool.def(false),
9869
9920
  indeterminate: PropTypes.bool,
@@ -9880,12 +9931,14 @@ var Component$v = defineComponent({
9880
9931
  focus: handleFocus
9881
9932
  }] = useFocus$1();
9882
9933
  const {
9934
+ inputRef,
9883
9935
  isChecked,
9884
9936
  isDisabled,
9885
9937
  setChecked,
9886
9938
  handleChange
9887
9939
  } = useCheckbox();
9888
9940
  return {
9941
+ inputRef,
9889
9942
  isFocus,
9890
9943
  isChecked,
9891
9944
  isDisabled,
@@ -9917,6 +9970,7 @@ var Component$v = defineComponent({
9917
9970
  }, [createVNode("span", {
9918
9971
  "class": [resolveClassName("checkbox-input"), this.size]
9919
9972
  }, [createVNode("input", {
9973
+ "ref": "inputRef",
9920
9974
  "role": "checkbox",
9921
9975
  "type": "checkbox",
9922
9976
  "class": "bk-checkbox-original",
@@ -10012,7 +10066,7 @@ const propsCollapsePanel = __spreadValues({
10012
10066
  content: PropTypes.string,
10013
10067
  disabled: PropTypes.bool.def(false),
10014
10068
  isFormList: PropTypes.bool.def(false),
10015
- renderDirective: renderDirectiveType().def(RenderDirectiveEnum.SHOW),
10069
+ renderDirective: renderDirectiveType(),
10016
10070
  modelValue: PropTypes.bool.def(false)
10017
10071
  }, CollapsePanelEventProps);
10018
10072
  const trimArr$1 = function(s2) {
@@ -10310,7 +10364,7 @@ const propsMixin$1 = {
10310
10364
  direction: PropTypes.string,
10311
10365
  title: PropTypes.string.def(""),
10312
10366
  animateType: PropTypes.string.def("slide"),
10313
- renderDirective: renderDirectiveType,
10367
+ renderDirective: renderDirectiveType(),
10314
10368
  beforeClose: PropTypes.custom(() => true),
10315
10369
  dialogType: dialogTypeUnion(),
10316
10370
  multiInstance: PropTypes.bool.def(true),
@@ -10723,6 +10777,11 @@ var Component$t = defineComponent({
10723
10777
  login
10724
10778
  };
10725
10779
  const renderImg = () => {
10780
+ if (_$1.isFunction(slots.type)) {
10781
+ return createVNode("div", {
10782
+ "class": "bk-exception-img"
10783
+ }, [slots.type()]);
10784
+ }
10726
10785
  const imgSrc = images[props2.type] ? images[props2.type] : empty;
10727
10786
  return createVNode("div", {
10728
10787
  "class": "bk-exception-img"
@@ -17280,8 +17339,8 @@ const getSortFn = (column, sortType) => {
17280
17339
  const fieldName = column.field;
17281
17340
  const getVal = (row) => getRowText(row, fieldName, column);
17282
17341
  const sortFn0 = (a2, b2) => {
17283
- const val0 = getVal(a2);
17284
- const val1 = getVal(b2);
17342
+ const val0 = getVal(a2) || "";
17343
+ const val1 = getVal(b2) || "";
17285
17344
  if (typeof val0 === "number" && typeof val1 === "number") {
17286
17345
  return val0 - val1;
17287
17346
  }
@@ -17328,7 +17387,7 @@ const isRowSelectEnable = (props2, {
17328
17387
  isCheckAll
17329
17388
  }) => {
17330
17389
  if (typeof props2.isRowSelectEnable === "boolean") {
17331
- return props2.isRowSelectEnable;
17390
+ return props2.isRowSelectEnable !== false;
17332
17391
  }
17333
17392
  if (typeof props2.isRowSelectEnable === "function") {
17334
17393
  return props2.isRowSelectEnable({
@@ -17442,7 +17501,7 @@ var TableCell = defineComponent({
17442
17501
  return () => {
17443
17502
  var _a;
17444
17503
  return createVNode("div", {
17445
- "class": "cell",
17504
+ "class": ["cell", props2.column.type],
17446
17505
  "ref": refRoot,
17447
17506
  "title": props2.title
17448
17507
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
@@ -18272,7 +18331,6 @@ class TableRender {
18272
18331
  var _a, _b;
18273
18332
  const cellStyle = [resolveFixedColumnStyle(column), ...formatPropAsArray(this.props.cellStyle, [column, index, row, rowIndex, this])];
18274
18333
  const tdCtxClass = {
18275
- cell: true,
18276
18334
  "expand-cell": column.type === "expand"
18277
18335
  };
18278
18336
  const cellKey = `__CELL_${rowIndex}_${index}`;
@@ -18880,7 +18938,6 @@ const useInit = (props2, targetColumns) => {
18880
18938
  hasChecked = true;
18881
18939
  }
18882
18940
  });
18883
- reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL, hasChecked && !hasUnchecked);
18884
18941
  reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, hasChecked && hasUnchecked);
18885
18942
  };
18886
18943
  const isSelectionEnable = () => props2.columns.some((col) => col.type === "selection");
@@ -18893,12 +18950,15 @@ const useInit = (props2, targetColumns) => {
18893
18950
  const isChecked = typeof checked === "boolean" ? checked : !isSelectionAll();
18894
18951
  reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL, isChecked);
18895
18952
  reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, false);
18896
- indexData.forEach((row) => {
18953
+ indexData.forEach((row, index) => {
18897
18954
  var _a2;
18898
- const rowId = row[TABLE_ROW_ATTRIBUTE.ROW_UID];
18899
- const target = Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isSelected: isChecked });
18900
- reactiveSchema.rowActions.set(rowId, target);
18955
+ if (isRowSelectEnable(props2, { row, index, isCheckAll: false })) {
18956
+ const rowId = row[TABLE_ROW_ATTRIBUTE.ROW_UID];
18957
+ const target = Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isSelected: isChecked });
18958
+ reactiveSchema.rowActions.set(rowId, target);
18959
+ }
18901
18960
  });
18961
+ updateSelectionAll();
18902
18962
  updateIndexData(isChecked);
18903
18963
  asyncSelection(null, checked, true);
18904
18964
  };
@@ -18929,10 +18989,10 @@ const useInit = (props2, targetColumns) => {
18929
18989
  }
18930
18990
  return thenFn(row);
18931
18991
  };
18932
- const resolveSelection = (row, _rowId) => resolveSelectionRow(row, () => {
18992
+ const resolveSelection = (row, _rowId, index) => resolveSelectionRow(row, () => {
18933
18993
  var _a2;
18934
18994
  const rowId = _rowId === void 0 ? row[TABLE_ROW_ATTRIBUTE.ROW_UID] : _rowId;
18935
- if (isSelectionAll()) {
18995
+ if (isRowSelectEnable(props2, { row, index, isCheckAll: false }) && isSelectionAll()) {
18936
18996
  return true;
18937
18997
  }
18938
18998
  if (reactiveSchema.rowActions.has(rowId)) {
@@ -18953,22 +19013,30 @@ const useInit = (props2, targetColumns) => {
18953
19013
  [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
18954
19014
  [TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
18955
19015
  [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false,
18956
- [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, rowId),
19016
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, rowId, index),
18957
19017
  [TABLE_ROW_ATTRIBUTE.ROW_SOURCE_DATA]: __spreadValues({}, item),
18958
19018
  [TABLE_ROW_ATTRIBUTE.ROW_SKIP_CFG]: cfg
18959
19019
  });
18960
19020
  }));
18961
19021
  initSelectionAllByData();
18962
19022
  };
19023
+ const isRowChecked = (isRowCheckEnable, selectedAll, item, index) => {
19024
+ const isChecked = resolveSelection(item, item[TABLE_ROW_ATTRIBUTE.ROW_UID], index);
19025
+ if (isRowCheckEnable) {
19026
+ return typeof selectedAll === "boolean" ? selectedAll : isChecked;
19027
+ }
19028
+ return isChecked;
19029
+ };
18963
19030
  const updateIndexData = (selectedAll) => {
18964
19031
  let preRowId = null;
18965
19032
  const skipConfig = {};
18966
19033
  indexData.forEach((item, index) => {
18967
19034
  const rowId = item[TABLE_ROW_ATTRIBUTE.ROW_UID];
18968
19035
  const cfg = neepColspanOrRowspan.value ? getSkipConfig(item, rowId, index, skipConfig, preRowId) : {};
19036
+ const isRowCheckEnable = isRowSelectEnable(props2, { row: item, index, isCheckAll: false });
18969
19037
  Object.assign(item, {
18970
19038
  [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: isRowExpand(item[TABLE_ROW_ATTRIBUTE.ROW_UID]),
18971
- [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: typeof selectedAll === "boolean" ? selectedAll : resolveSelection(item, item[TABLE_ROW_ATTRIBUTE.ROW_UID]),
19039
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: isRowChecked(isRowCheckEnable, selectedAll, item, index),
18972
19040
  [TABLE_ROW_ATTRIBUTE.ROW_SKIP_CFG]: cfg
18973
19041
  });
18974
19042
  preRowId = item[TABLE_ROW_ATTRIBUTE.ROW_UID];
@@ -19558,26 +19626,60 @@ const tagProps = () => ({
19558
19626
  collapseTags: {
19559
19627
  type: Boolean,
19560
19628
  default: false
19629
+ },
19630
+ tagOverflowTips: {
19631
+ type: Object,
19632
+ default: () => ({})
19561
19633
  }
19562
19634
  });
19563
19635
  var TagRender = defineComponent({
19564
19636
  name: "TagRender",
19637
+ directives: {
19638
+ bkTooltips: tooltips
19639
+ },
19565
19640
  props: {
19566
19641
  node: PropTypes.object,
19567
19642
  displayKey: PropTypes.string,
19568
19643
  tpl: {
19569
19644
  type: Function
19645
+ },
19646
+ hasTips: {
19647
+ type: Boolean,
19648
+ default: false
19649
+ },
19650
+ tagOverflowTips: {
19651
+ type: Object,
19652
+ default: () => ({})
19570
19653
  }
19571
19654
  },
19655
+ setup(props2) {
19656
+ const tagRef = ref();
19657
+ const isOverflow = ref(false);
19658
+ const overflowTips = computed(() => __spreadValues({
19659
+ boundary: "window",
19660
+ theme: "light",
19661
+ distance: 12,
19662
+ content: props2.node[props2.displayKey],
19663
+ disabled: props2.hasTips || !isOverflow.value
19664
+ }, props2.tagOverflowTips));
19665
+ onMounted(() => {
19666
+ isOverflow.value = checkOverflow(tagRef.value);
19667
+ });
19668
+ return {
19669
+ overflowTips,
19670
+ tagRef
19671
+ };
19672
+ },
19572
19673
  render() {
19573
19674
  if (this.tpl) {
19574
19675
  return this.tpl(this.node, h$1, this);
19575
19676
  }
19576
- return createVNode("div", {
19577
- "class": "tag"
19677
+ return withDirectives(createVNode("div", {
19678
+ "class": "tag",
19679
+ "ref": "tagRef"
19578
19680
  }, [createVNode("span", {
19579
19681
  "class": "text"
19580
- }, [this.node[this.displayKey]])]);
19682
+ }, [this.node[this.displayKey]])]), [[resolveDirective("bk-tooltips"), this.overflowTips]]);
19581
19683
  }
19582
19684
  });
19583
19685
  var Component$d = defineComponent({
@@ -20049,7 +20151,7 @@ var Component$d = defineComponent({
20049
20151
  case "NumpadEnter":
20050
20152
  if (!props2.allowCreate && popoverProps.isShow || props2.allowCreate && state.focusItemIndex >= 0 && popoverProps.isShow) {
20051
20153
  handleTagSelected(pageState.curPageList[state.focusItemIndex], "select", e);
20052
- } else if (props2.allowCreate) {
20154
+ } else if (props2.allowCreate && curInputValue.value.trim()) {
20053
20155
  handleTagSelected(curInputValue.value, "custom", e);
20054
20156
  }
20055
20157
  e.preventDefault();
@@ -20289,7 +20391,9 @@ var Component$d = defineComponent({
20289
20391
  }, [createVNode(TagRender, {
20290
20392
  "node": item,
20291
20393
  "tpl": this.tagTpl,
20292
- "displayKey": this.displayKey
20394
+ "displayKey": this.displayKey,
20395
+ "hasTips": !!this.tooltipKey,
20396
+ "tagOverflowTips": this.tagOverflowTips
20293
20397
  }, null), this.showTagClose ? createVNode(error, {
20294
20398
  "class": "remove-tag",
20295
20399
  "onClick": this.handleTagRemove.bind(this, item, index)
@@ -20466,7 +20570,7 @@ const tabPanelProps = {
20466
20570
  visible: PropTypes.bool.def(true),
20467
20571
  disabled: PropTypes.bool,
20468
20572
  sortable: PropTypes.bool,
20469
- renderDirective: renderDirectiveType,
20573
+ renderDirective: renderDirectiveType(),
20470
20574
  panel: PropTypes.string || PropTypes.func
20471
20575
  };
20472
20576
  var TabNav = defineComponent({
@@ -20597,12 +20701,12 @@ var TabNav = defineComponent({
20597
20701
  tabLabel
20598
20702
  } = item;
20599
20703
  const getNavItemClass = () => {
20600
- const classNames = ["bk-tab-header-item"];
20704
+ const classNames = [resolveClassName("tab-header-item")];
20601
20705
  if (disabled) {
20602
- classNames.push("bk-tab-header--disabled");
20706
+ classNames.push(resolveClassName("tab-header--disabled"));
20603
20707
  }
20604
20708
  if (active === name) {
20605
- classNames.push("bk-tab-header--active");
20709
+ classNames.push(resolveClassName("tab-header--active"));
20606
20710
  }
20607
20711
  return classNames.join(" ");
20608
20712
  };
@@ -20632,7 +20736,7 @@ var TabNav = defineComponent({
20632
20736
  },
20633
20737
  "class": getNavItemClass()
20634
20738
  }, [createVNode("div", null, [tabLabel]), getValue(item.closable, closable) && createVNode(close$1, {
20635
- "class": "bk-tab-header-item-close",
20739
+ "class": resolveClassName("tab-header-item-close"),
20636
20740
  "onClick": () => this.handleTabRemove(index, item)
20637
20741
  }, null)]);
20638
20742
  });
@@ -20651,9 +20755,9 @@ var TabNav = defineComponent({
20651
20755
  }
20652
20756
  if (list.length) {
20653
20757
  return createVNode("div", {
20654
- "class": "bk-tab-header-operation"
20758
+ "class": resolveClassName("tab-header-operation")
20655
20759
  }, [list.map((item, index) => createVNode("div", {
20656
- "class": "bk-tab-header-item",
20760
+ "class": resolveClassName("tab-header-item"),
20657
20761
  "key": index
20658
20762
  }, [item]))]);
20659
20763
  }
@@ -20663,11 +20767,11 @@ var TabNav = defineComponent({
20663
20767
  "style": {
20664
20768
  lineHeight: `${labelHeight}px`
20665
20769
  },
20666
- "class": "bk-tab-header"
20770
+ "class": resolveClassName("tab-header")
20667
20771
  }, [createVNode("div", {
20668
- "class": "bk-tab-header-nav"
20772
+ "class": resolveClassName("tab-header-nav")
20669
20773
  }, [renderNavs()]), renderSlot2(), typeof this.$slots.setting === "function" && createVNode("div", {
20670
- "class": "bk-tab-header-setting"
20774
+ "class": resolveClassName("tab-header-setting")
20671
20775
  }, [this.$slots.setting()])]);
20672
20776
  }
20673
20777
  });
@@ -20842,7 +20946,7 @@ var Tab = defineComponent({
20842
20946
  return createVNode("div", {
20843
20947
  "class": getTabBoxClass()
20844
20948
  }, [getTabHeader(), createVNode("div", {
20845
- "class": "bk-tab-content"
20949
+ "class": resolveClassName("tab-content")
20846
20950
  }, [(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)])]);
20847
20951
  }
20848
20952
  });
@@ -20868,7 +20972,7 @@ var TabPanel = defineComponent({
20868
20972
  };
20869
20973
  return withDirectives(createVNode("div", {
20870
20974
  "ref": "content",
20871
- "class": "bk-tab-panel"
20975
+ "class": resolveClassName("tab-panel")
20872
20976
  }, [getContent()]), [[vShow, active]]);
20873
20977
  }
20874
20978
  });