bkui-vue 0.0.1-beta.148 → 0.0.1-beta.149

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
@@ -9776,7 +9776,7 @@ const propsCollapse = {
9776
9776
  const CollapsePanelEventProps = {
9777
9777
  itemClick: {
9778
9778
  type: Function,
9779
- default: () => ({})
9779
+ default: null
9780
9780
  }
9781
9781
  };
9782
9782
  const propsCollapsePanel = __spreadValues({
@@ -9902,13 +9902,16 @@ var CollapsePanel = defineComponent({
9902
9902
  const data2 = {
9903
9903
  name
9904
9904
  };
9905
- itemClick(data2);
9906
9905
  isActive.value = !isActive.value;
9907
9906
  emit("change", data2);
9908
9907
  emit("update:modelValue", isActive.value);
9909
- handleItemClick({
9910
- name
9911
- });
9908
+ if (typeof itemClick === "function") {
9909
+ itemClick(data2);
9910
+ } else if (typeof handleItemClick === "function") {
9911
+ handleItemClick({
9912
+ name
9913
+ });
9914
+ }
9912
9915
  }
9913
9916
  const transition = ref(collapseMotion$1(emit));
9914
9917
  function getContent() {
@@ -10032,15 +10035,19 @@ var Collapse = defineComponent({
10032
10035
  }, item);
10033
10036
  }));
10034
10037
  const renderItems = () => collapseData.value.map((item, index) => {
10038
+ var _a, _b, _c;
10035
10039
  const name = item[props2.idFiled] || index;
10036
10040
  let title = item[props2.titleField];
10037
10041
  if (slots.title) {
10038
10042
  if (typeof slots.title === "function") {
10039
- title = slots.title(item);
10043
+ title = slots.title(item, index);
10040
10044
  } else {
10041
10045
  title = slots.title;
10042
10046
  }
10043
10047
  }
10048
+ if (slots.default) {
10049
+ title = (_a = slots.default) == null ? void 0 : _a.call(slots, item, index);
10050
+ }
10044
10051
  return createVNode(CollapsePanel, {
10045
10052
  "key": index,
10046
10053
  "item-click": handleItemClick,
@@ -10048,7 +10055,7 @@ var Collapse = defineComponent({
10048
10055
  "name": name,
10049
10056
  "isFormList": true,
10050
10057
  "title": title,
10051
- "content": item[props2.contentField]
10058
+ "content": (_c = (_b = slots.content) == null ? void 0 : _b.call(slots, item, index)) != null ? _c : item[props2.contentField]
10052
10059
  }, null);
10053
10060
  });
10054
10061
  return () => createVNode("div", {
@@ -10165,7 +10172,7 @@ var Component$t = defineComponent({
10165
10172
  "name": this.animateType
10166
10173
  }, {
10167
10174
  default: () => {
10168
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
10175
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
10169
10176
  return [this.isShow ? createVNode("div", {
10170
10177
  "class": bodyClass
10171
10178
  }, [createVNode("div", {
@@ -10175,7 +10182,9 @@ var Component$t = defineComponent({
10175
10182
  "style": [this.dialogType === "show" ? "padding-bottom: 20px" : "", __spreadValues({}, maxHeight)]
10176
10183
  }, [(_f = (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)) != null ? _f : ""]), this.dialogType === "show" ? "" : createVNode("div", {
10177
10184
  "class": "bk-modal-footer"
10178
- }, [(_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : ""])]) : ""];
10185
+ }, [(_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : ""]), createVNode("div", {
10186
+ "class": ["bk-modal-close", this.closeIcon ? "" : "close-icon"]
10187
+ }, [(_l = (_k = (_j = this.$slots).close) == null ? void 0 : _k.call(_j)) != null ? _l : ""])]) : ""];
10179
10188
  }
10180
10189
  })]);
10181
10190
  }
@@ -10341,10 +10350,7 @@ var Dialog = defineComponent({
10341
10350
  }, [createVNode("span", {
10342
10351
  "class": "bk-dialog-title",
10343
10352
  "style": `text-align: ${this.headerAlign}`
10344
- }, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title]), createVNode("span", {
10345
- "class": ["bk-dialog-close", this.closeIcon ? "" : "close-icon"],
10346
- "onClick": this.handleClose
10347
- }, [createTextVNode("+")])])];
10353
+ }, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title])])];
10348
10354
  },
10349
10355
  default: () => {
10350
10356
  var _a, _b, _c;
@@ -10396,7 +10402,11 @@ var Dialog = defineComponent({
10396
10402
  }, {
10397
10403
  default: () => [this.confirmText]
10398
10404
  })]) : ""]);
10399
- }
10405
+ },
10406
+ close: () => createVNode("span", {
10407
+ "class": "bk-dialog-close",
10408
+ "onClick": this.handleClose
10409
+ }, [createTextVNode("+")])
10400
10410
  };
10401
10411
  const className = `bk-dialog-wrapper ${this.scrollable ? "scroll-able" : ""} ${this.multiInstance ? "multi-instance" : ""}`;
10402
10412
  return createVNode(BkModal, mergeProps(this.$props, {