bkui-vue 0.0.1-beta.444 → 0.0.1-beta.445

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
@@ -14844,7 +14844,10 @@ function toLowerCase(value = "") {
14844
14844
  var BkOption = defineComponent({
14845
14845
  name: "Option",
14846
14846
  props: {
14847
- value: PropTypes.any,
14847
+ value: {
14848
+ type: [String, Number, Object],
14849
+ require: true
14850
+ },
14848
14851
  label: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
14849
14852
  disabled: PropTypes.bool.def(false)
14850
14853
  },
@@ -16094,7 +16097,10 @@ var SelectTagInput = defineComponent({
16094
16097
  [resolveClassName("select-tag--default")]: true,
16095
16098
  "is-disabled": this.disabled,
16096
16099
  "collapse-tag": this.collapseTags,
16097
- "has-prefix": !!prefix
16100
+ "has-prefix": !!prefix && (prefix == null ? void 0 : prefix.every((item) => {
16101
+ var _a2;
16102
+ return !!((_a2 = item.children) == null ? void 0 : _a2.length);
16103
+ }))
16098
16104
  });
16099
16105
  const tagWrapperClass = classes({
16100
16106
  [resolveClassName("select-tag-wrapper")]: true
@@ -16205,6 +16211,7 @@ var Component$k = defineComponent({
16205
16211
  scrollHeight,
16206
16212
  list,
16207
16213
  displayKey,
16214
+ idKey,
16208
16215
  collapseTags,
16209
16216
  autoHeight,
16210
16217
  popoverOptions,
@@ -16265,6 +16272,10 @@ var Component$k = defineComponent({
16265
16272
  return pre;
16266
16273
  }, {}));
16267
16274
  const activeOptionValue = ref();
16275
+ const listMap = computed(() => list.value.reduce((pre, item) => {
16276
+ pre[item[idKey.value]] = item[displayKey.value];
16277
+ return pre;
16278
+ }, {}));
16268
16279
  watch(modelValue, () => {
16269
16280
  var _a;
16270
16281
  handleSetSelectedData();
@@ -16285,7 +16296,7 @@ var Component$k = defineComponent({
16285
16296
  const isDisabled = computed(() => disabled.value || loading2.value);
16286
16297
  const selectedLabel = computed(() => selected.value.map((item) => {
16287
16298
  var _a, _b;
16288
- return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(item.value)) == null ? void 0 : _b.label) || item.label;
16299
+ return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(item.value)) == null ? void 0 : _b.label) || item.label || listMap.value[item.value];
16289
16300
  }));
16290
16301
  const isAllSelected = computed(() => {
16291
16302
  const normalSelectedValues = options.value.reduce((pre, option) => {
@@ -16536,7 +16547,7 @@ var Component$k = defineComponent({
16536
16547
  }
16537
16548
  }
16538
16549
  }
16539
- return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(tmpValue)) == null ? void 0 : _b.label) || cacheSelectedMap.value[tmpValue] || tmpValue;
16550
+ return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(tmpValue)) == null ? void 0 : _b.label) || cacheSelectedMap.value[tmpValue] || listMap.value[tmpValue] || tmpValue;
16540
16551
  };
16541
16552
  const handleSetSelectedData = () => {
16542
16553
  if (Array.isArray(modelValue.value)) {