bkui-vue 0.0.1-beta.151 → 0.0.1-beta.152

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
@@ -9204,7 +9204,8 @@ const inputType = {
9204
9204
  precision: PropTypes.number.def(0).validate((val) => val >= 0 && val < 20),
9205
9205
  modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
9206
9206
  size: PropTypes.size(),
9207
- rows: PropTypes.number
9207
+ rows: PropTypes.number,
9208
+ selectReadonly: PropTypes.bool.def(false)
9208
9209
  };
9209
9210
  let EVENTS$2;
9210
9211
  (function(EVENTS2) {
@@ -9267,7 +9268,7 @@ var Component$w = defineComponent({
9267
9268
  const inputCls = computed(() => classes({
9268
9269
  [`${inputClsPrefix.value}--${props2.size}`]: !!props2.size,
9269
9270
  "is-focused": isFocused.value,
9270
- "is-readonly": props2.readonly,
9271
+ "is-readonly": props2.readonly && !props2.selectReadonly,
9271
9272
  "is-disabled": props2.disabled,
9272
9273
  "is-simplicity": props2.behavior === "simplicity",
9273
9274
  [`${cls}`]: !!cls
@@ -14283,7 +14284,10 @@ var Component$i = defineComponent({
14283
14284
  scrollLoading: PropTypes.bool.def(false),
14284
14285
  allowCreate: PropTypes.bool.def(false),
14285
14286
  popoverOptions: PropTypes.object.def({}),
14286
- customContent: PropTypes.bool.def(false)
14287
+ customContent: PropTypes.bool.def(false),
14288
+ list: PropTypes.array.def([]),
14289
+ idKey: PropTypes.string.def("value"),
14290
+ displayKey: PropTypes.string.def("label")
14287
14291
  },
14288
14292
  emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end", "focus", "blur"],
14289
14293
  setup(props2, {
@@ -14413,8 +14417,8 @@ var Component$i = defineComponent({
14413
14417
  var _a;
14414
14418
  if (val === modelValue.value)
14415
14419
  return;
14416
- emit("change", val);
14417
- emit("update:modelValue", val);
14420
+ emit("change", val, modelValue.value);
14421
+ emit("update:modelValue", val, modelValue.value);
14418
14422
  (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
14419
14423
  };
14420
14424
  const handleTogglePopover = () => {
@@ -14714,6 +14718,7 @@ var Component$i = defineComponent({
14714
14718
  "modelValue": this.isInput ? this.searchKey : this.selectedLabel.join(","),
14715
14719
  "placeholder": this.isInput ? this.selectedLabel.join(",") || this.placeholder : this.placeholder,
14716
14720
  "readonly": !this.isInput,
14721
+ "selectReadonly": true,
14717
14722
  "disabled": this.isDisabled,
14718
14723
  "behavior": this.behavior,
14719
14724
  "size": this.size,
@@ -14763,7 +14768,10 @@ var Component$i = defineComponent({
14763
14768
  "class": "bk-select-option",
14764
14769
  "onMouseenter": this.handleSelectedAllOptionMouseEnter,
14765
14770
  "onClick": this.handleToggleAll
14766
- }, [this.selectAllText]), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), this.scrollLoading && createVNode("li", {
14771
+ }, [this.selectAllText]), this.list.map((item) => createVNode(BkOption, {
14772
+ "value": item[this.idKey],
14773
+ "label": item[this.displayKey]
14774
+ }, null)), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), this.scrollLoading && createVNode("li", {
14767
14775
  "class": "bk-select-options-loading"
14768
14776
  }, [createVNode(BkLoading, {
14769
14777
  "class": "spinner mr5",