bkui-vue 0.0.1-beta.182 → 0.0.1-beta.185

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
@@ -10154,7 +10154,8 @@ const propsMixin$1 = {
10154
10154
  renderDirective: PropTypes.commonType(["show", "if"], "renderDirective").def("show"),
10155
10155
  beforeClose: PropTypes.custom(() => true),
10156
10156
  dialogType: PropTypes.commonType(["show", "operation", "confirm", "process"], "dialogType").def("operation"),
10157
- multiInstance: PropTypes.bool.def(true)
10157
+ multiInstance: PropTypes.bool.def(true),
10158
+ infoType: PropTypes.commonType(["success", "warning", "danger", "loading"], "infoType").def()
10158
10159
  };
10159
10160
  var Component$u = defineComponent({
10160
10161
  name: "Modal",
@@ -10408,6 +10409,23 @@ var Dialog = defineComponent({
10408
10409
  };
10409
10410
  },
10410
10411
  render() {
10412
+ const renderIcon = () => {
10413
+ const iconMap = {
10414
+ loading: createVNode(spinner, {
10415
+ "class": "bk-info-icon primary"
10416
+ }, null),
10417
+ warning: createVNode(warn, {
10418
+ "class": "bk-info-icon warning"
10419
+ }, null),
10420
+ success: createVNode(success, {
10421
+ "class": "bk-info-icon success"
10422
+ }, null),
10423
+ danger: createVNode(close$1, {
10424
+ "class": "bk-info-icon danger"
10425
+ }, null)
10426
+ };
10427
+ return iconMap[this.infoType];
10428
+ };
10411
10429
  const dialogSlot = {
10412
10430
  header: () => {
10413
10431
  var _a, _b, _c, _d, _e, _f;
@@ -10416,7 +10434,11 @@ var Dialog = defineComponent({
10416
10434
  "onMousedown": this.moveHandler
10417
10435
  }, [(_c = (_b = (_a = this.$slots).tools) == null ? void 0 : _b.call(_a)) != null ? _c : ""]), createVNode("div", {
10418
10436
  "class": "bk-dialog-header"
10419
- }, [createVNode("span", {
10437
+ }, [createVNode("div", {
10438
+ "class": "bk-header-icon"
10439
+ }, [this.infoType ? renderIcon() : createVNode("slot", {
10440
+ "name": "info-icon"
10441
+ }, null)]), createVNode("span", {
10420
10442
  "class": "bk-dialog-title",
10421
10443
  "style": `text-align: ${this.headerAlign}`
10422
10444
  }, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title])])];
@@ -16984,7 +17006,7 @@ var TableCell = defineComponent({
16984
17006
  }
16985
17007
  });
16986
17008
  onBeforeUnmount(() => {
16987
- observerIns.stop();
17009
+ observerIns == null ? void 0 : observerIns.stop();
16988
17010
  bkEllipsisIns == null ? void 0 : bkEllipsisIns.destroyInstance(refRoot.value);
16989
17011
  });
16990
17012
  return () => {
@@ -20152,27 +20174,28 @@ const InfoBox = (config) => {
20152
20174
  update
20153
20175
  });
20154
20176
  const getContent = () => {
20155
- const children = [];
20156
- if (modalFuncProps.value.subTitle) {
20157
- switch (typeof modalFuncProps.value.subTitle) {
20158
- case "string":
20159
- children.push(h$1("div", modalFuncProps.value.subTitle));
20160
- break;
20161
- case "function":
20162
- children.push(h$1("div", modalFuncProps.value.subTitle()));
20163
- break;
20164
- default:
20165
- children.push(h$1(modalFuncProps.value.subTitle));
20166
- break;
20167
- }
20177
+ if (!modalFuncProps.value.subTitle) {
20178
+ return "";
20179
+ }
20180
+ switch (typeof modalFuncProps.value.subTitle) {
20181
+ case "function":
20182
+ return modalFuncProps.value.subTitle();
20183
+ default:
20184
+ case "string":
20185
+ return modalFuncProps.value.subTitle;
20168
20186
  }
20169
- return children;
20170
20187
  };
20171
- return () => createVNode(Dialog, __spreadProps(__spreadValues({}, modalFuncProps.value), {
20188
+ return () => createVNode(Dialog, __spreadProps(__spreadValues({
20189
+ headerAlign: "center",
20190
+ footerAlign: "center"
20191
+ }, modalFuncProps.value), {
20172
20192
  isShow: isShow.value,
20173
20193
  onClosed,
20174
20194
  onConfirm
20175
- }), getContent());
20195
+ }), [h$1("div", {
20196
+ class: "bk-info-sub-title",
20197
+ style: `text-Align:${modalFuncProps.value.contentAlign || "center"}`
20198
+ }, getContent())]);
20176
20199
  }
20177
20200
  });
20178
20201
  const app = createApp(dialog2).mount(container2);