bkui-vue 0.0.1-beta.164 → 0.0.1-beta.165

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.
package/dist/index.esm.js CHANGED
@@ -27639,7 +27639,7 @@ var Component$6 = defineComponent({
27639
27639
  checkAnyLevel: PropTypes.bool.def(false),
27640
27640
  isRemote: PropTypes.bool.def(false),
27641
27641
  remoteMethod: PropTypes.func,
27642
- showCompleteName: PropTypes.bool.def(false),
27642
+ showCompleteName: PropTypes.bool.def(true),
27643
27643
  idKey: PropTypes.string.def("id"),
27644
27644
  nameKey: PropTypes.string.def("name"),
27645
27645
  childrenKey: PropTypes.string.def("children"),
@@ -27675,11 +27675,12 @@ var Component$6 = defineComponent({
27675
27675
  }
27676
27676
  });
27677
27677
  const popover3 = ref(null);
27678
+ const getShowText = (node) => props2.showCompleteName ? node.pathNames.join(separator2) : node.pathNames[node.pathNames.length - 1];
27678
27679
  const updateValue = (val) => {
27679
27680
  var _a;
27680
27681
  if (multiple) {
27681
27682
  selectedTags.value = store.value.getCheckedNodes().map((node) => ({
27682
- text: node.pathNames.join(separator2),
27683
+ text: getShowText(node),
27683
27684
  key: node.id
27684
27685
  }));
27685
27686
  return;
@@ -27691,7 +27692,7 @@ var Component$6 = defineComponent({
27691
27692
  const node = store.value.getNodeByValue(val);
27692
27693
  if (!node)
27693
27694
  return;
27694
- selectedText.value = node.pathNames.join(separator2);
27695
+ selectedText.value = getShowText(node);
27695
27696
  }
27696
27697
  };
27697
27698
  const handleClear = (e) => {