bmp-layout 0.0.12 → 0.0.13

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/bmp-layout.es.js CHANGED
@@ -2,7 +2,7 @@ import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed,
2
2
  import { createPinia, defineStore } from "pinia";
3
3
  import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
4
4
  import { cloneDeep, omit } from "lodash-es";
5
- import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar, ElMessageBox, ElBreadcrumb, ElBreadcrumbItem, ElDrawer, ElMessage, ElConfigProvider, ElNotification, ElAffix } from "element-plus";
5
+ import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar, ElMessageBox, ElBreadcrumb, ElBreadcrumbItem, ElDrawer, ElMessage, ElConfigProvider, ElCard, ElImageViewer, ElNotification, ElUpload, ElLink, ElButton, ElPagination, ElDialog, ElAlert, ElAffix } from "element-plus";
6
6
  import { createRouter, createWebHashHistory, useRoute, useRouter } from "vue-router";
7
7
  import "vue-i18n";
8
8
  import { useClipboard, useWindowSize } from "@vueuse/core";
@@ -9443,8 +9443,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "PageCard" }, {
9443
9443
  const { getPrefixCls: getPrefixCls2 } = useDesign();
9444
9444
  const prefixCls2 = getPrefixCls2("page-card");
9445
9445
  return (_ctx, _cache) => {
9446
- const _component_ElCard = resolveComponent("ElCard");
9447
- return openBlock(), createBlock(_component_ElCard, {
9446
+ return openBlock(), createBlock(unref(ElCard), {
9448
9447
  "body-style": __props.bodyStyle,
9449
9448
  header: __props.title,
9450
9449
  class: normalizeClass([unref(prefixCls2), "m-16px"])
@@ -9457,7 +9456,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "PageCard" }, {
9457
9456
  };
9458
9457
  }
9459
9458
  });
9460
- const PageCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-6e83bf5c"]]);
9459
+ const PageCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-32ef0d97"]]);
9461
9460
  const _hoisted_1$5 = { class: "ml-2px" };
9462
9461
  const _hoisted_2$5 = { class: "flex items-center" };
9463
9462
  const _sfc_main$b = /* @__PURE__ */ Object.assign({ name: "PageHeader" }, {
@@ -9568,8 +9567,7 @@ const _sfc_main$a = /* @__PURE__ */ Object.assign({ name: "ImageViewer" }, {
9568
9567
  show.value = false;
9569
9568
  };
9570
9569
  return (_ctx, _cache) => {
9571
- const _component_ElImageViewer = resolveComponent("ElImageViewer");
9572
- return unref(show) ? (openBlock(), createBlock(_component_ElImageViewer, mergeProps({ key: 0 }, unref(getBindValue), { onClose: close }), null, 16)) : createCommentVNode("", true);
9570
+ return unref(show) ? (openBlock(), createBlock(unref(ElImageViewer), mergeProps({ key: 0 }, unref(getBindValue), { onClose: close }), null, 16)) : createCommentVNode("", true);
9573
9571
  };
9574
9572
  }
9575
9573
  });
@@ -9779,9 +9777,9 @@ const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
9779
9777
  emits: ["update:modelValue"],
9780
9778
  setup(__props, { emit: __emit }) {
9781
9779
  useCssVars((_ctx) => ({
9782
- "2c28791a": __props.width,
9783
- "3f17b053": __props.height,
9784
- "64641dea": __props.borderradius
9780
+ "3d8ea9da": __props.width,
9781
+ "2c0dbd7a": __props.height,
9782
+ "00ef71d1": __props.borderradius
9785
9783
  }));
9786
9784
  const props = __props;
9787
9785
  const { t: t2 } = useI18n("layout");
@@ -9820,10 +9818,8 @@ const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
9820
9818
  message.notifyError("图片上传失败,请您重新上传!");
9821
9819
  };
9822
9820
  return (_ctx, _cache) => {
9823
- const _component_Icon = resolveComponent("Icon");
9824
- const _component_el_upload = resolveComponent("el-upload");
9825
9821
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
9826
- createVNode(_component_el_upload, {
9822
+ createVNode(unref(ElUpload), {
9827
9823
  id: unref(uuid),
9828
9824
  accept: __props.fileType.join(","),
9829
9825
  "before-upload": beforeUpload,
@@ -9851,7 +9847,7 @@ const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
9851
9847
  class: "handle-icon",
9852
9848
  onClick: _cache[0] || (_cache[0] = ($event) => imagePreview(__props.modelValue))
9853
9849
  }, [
9854
- createVNode(_component_Icon, { icon: "ant-design:zoom-in-outlined" }),
9850
+ createVNode(unref(_sfc_main$v), { icon: "ant-design:zoom-in-outlined" }),
9855
9851
  __props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(unref(t2)("action.detail")), 1)) : createCommentVNode("", true)
9856
9852
  ]),
9857
9853
  __props.showDelete && !__props.disabled ? (openBlock(), createElementBlock("div", {
@@ -9859,13 +9855,13 @@ const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
9859
9855
  class: "handle-icon",
9860
9856
  onClick: deleteImg
9861
9857
  }, [
9862
- createVNode(_component_Icon, { icon: "ant-design:delete-outlined" }),
9858
+ createVNode(unref(_sfc_main$v), { icon: "ant-design:delete-outlined" }),
9863
9859
  __props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(unref(t2)("action.del")), 1)) : createCommentVNode("", true)
9864
9860
  ])) : createCommentVNode("", true)
9865
9861
  ])
9866
9862
  ], 64)) : (openBlock(), createElementBlock("div", _hoisted_5$3, [
9867
9863
  renderSlot(_ctx.$slots, "empty", {}, () => [
9868
- createVNode(_component_Icon, {
9864
+ createVNode(unref(_sfc_main$v), {
9869
9865
  icon: "ep:plus",
9870
9866
  size: 20
9871
9867
  }),
@@ -9882,7 +9878,7 @@ const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
9882
9878
  };
9883
9879
  }
9884
9880
  });
9885
- const UploadImg = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-4732196b"]]);
9881
+ const UploadImg = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-4a1df97a"]]);
9886
9882
  const _hoisted_1$3 = { class: "upload-box" };
9887
9883
  const _hoisted_2$3 = { class: "upload-empty" };
9888
9884
  const _hoisted_3$3 = ["src"];
@@ -9962,9 +9958,9 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
9962
9958
  emits: ["update:modelValue"],
9963
9959
  setup(__props, { emit: __emit }) {
9964
9960
  useCssVars((_ctx) => ({
9965
- "2c8d873e": __props.borderradius,
9966
- "3b662646": __props.width,
9967
- "178fa8a7": __props.height
9961
+ "1238a60c": __props.borderradius,
9962
+ "c60c1990": __props.width,
9963
+ "2f150c16": __props.height
9968
9964
  }));
9969
9965
  const message = useMessage();
9970
9966
  const imagePreview = (imgUrl) => {
@@ -10059,10 +10055,8 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
10059
10055
  });
10060
10056
  };
10061
10057
  return (_ctx, _cache) => {
10062
- const _component_Icon = resolveComponent("Icon");
10063
- const _component_el_upload = resolveComponent("el-upload");
10064
10058
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
10065
- createVNode(_component_el_upload, {
10059
+ createVNode(unref(ElUpload), {
10066
10060
  "file-list": unref(fileList),
10067
10061
  "onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => isRef(fileList) ? fileList.value = $event : null),
10068
10062
  accept: __props.fileType.join(","),
@@ -10092,7 +10086,7 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
10092
10086
  class: "handle-icon",
10093
10087
  onClick: ($event) => imagePreview(file.url)
10094
10088
  }, [
10095
- createVNode(_component_Icon, { icon: "ant-design:zoom-in-outlined" }),
10089
+ createVNode(unref(_sfc_main$v), { icon: "ant-design:zoom-in-outlined" }),
10096
10090
  __props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_5$2, "查看")) : createCommentVNode("", true)
10097
10091
  ], 8, _hoisted_4$3),
10098
10092
  !__props.disabled ? (openBlock(), createElementBlock("div", {
@@ -10100,7 +10094,7 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
10100
10094
  class: "handle-icon",
10101
10095
  onClick: ($event) => handleRemove(file)
10102
10096
  }, [
10103
- createVNode(_component_Icon, { icon: "ant-design:delete-outlined" }),
10097
+ createVNode(unref(_sfc_main$v), { icon: "ant-design:delete-outlined" }),
10104
10098
  __props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_7, "删除")) : createCommentVNode("", true)
10105
10099
  ], 8, _hoisted_6$1)) : createCommentVNode("", true)
10106
10100
  ])
@@ -10108,7 +10102,7 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
10108
10102
  default: withCtx(() => [
10109
10103
  createElementVNode("div", _hoisted_2$3, [
10110
10104
  renderSlot(_ctx.$slots, "empty", {}, () => [
10111
- createVNode(_component_Icon, {
10105
+ createVNode(unref(_sfc_main$v), {
10112
10106
  icon: "ep:plus",
10113
10107
  size: 20
10114
10108
  }),
@@ -10125,7 +10119,7 @@ const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
10125
10119
  };
10126
10120
  }
10127
10121
  });
10128
- const UploadImgs = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2e18c223"]]);
10122
+ const UploadImgs = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-92b67a34"]]);
10129
10123
  const _hoisted_1$2 = { class: "mt-10px line-height-20px color-[var(--el-upload-tip-color)] text-12px" };
10130
10124
  const _hoisted_2$2 = { class: "flex items-center" };
10131
10125
  const _hoisted_3$2 = { class: "ml-10px" };
@@ -10289,14 +10283,10 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10289
10283
  emit("update:modelValue", result);
10290
10284
  };
10291
10285
  return (_ctx, _cache) => {
10292
- const _component_Icon = resolveComponent("Icon");
10293
- const _component_el_button = resolveComponent("el-button");
10294
- const _component_el_link = resolveComponent("el-link");
10295
- const _component_el_upload = resolveComponent("el-upload");
10296
10286
  return openBlock(), createElementBlock("div", {
10297
10287
  class: normalizeClass(["upload-file", _ctx.$attrs.class])
10298
10288
  }, [
10299
- !__props.disabled ? (openBlock(), createBlock(_component_el_upload, {
10289
+ !__props.disabled ? (openBlock(), createBlock(unref(ElUpload), {
10300
10290
  key: 0,
10301
10291
  ref_key: "uploadRef",
10302
10292
  ref: uploadRef,
@@ -10322,7 +10312,7 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10322
10312
  createElementVNode("div", _hoisted_2$2, [
10323
10313
  createElementVNode("span", null, toDisplayString(row.file.name), 1),
10324
10314
  createElementVNode("div", _hoisted_3$2, [
10325
- createVNode(_component_el_link, {
10315
+ createVNode(unref(ElLink), {
10326
10316
  href: row.file.url,
10327
10317
  underline: "never",
10328
10318
  download: "",
@@ -10337,7 +10327,7 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10337
10327
  }, 1032, ["href"])
10338
10328
  ]),
10339
10329
  createElementVNode("div", _hoisted_4$2, [
10340
- createVNode(_component_el_link, {
10330
+ createVNode(unref(ElLink), {
10341
10331
  type: "danger",
10342
10332
  onClick: ($event) => handleRemove(row.file)
10343
10333
  }, {
@@ -10351,9 +10341,9 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10351
10341
  ])
10352
10342
  ]),
10353
10343
  default: withCtx(() => [
10354
- createVNode(_component_el_button, { type: "primary" }, {
10344
+ createVNode(unref(ElButton), { type: "primary" }, {
10355
10345
  default: withCtx(() => [
10356
- createVNode(_component_Icon, { icon: "ant-design:upload-outlined" }),
10346
+ createVNode(unref(_sfc_main$v), { icon: "ant-design:upload-outlined" }),
10357
10347
  _cache[1] || (_cache[1] = createTextVNode(" 选取文件 ", -1))
10358
10348
  ]),
10359
10349
  _: 1,
@@ -10379,7 +10369,7 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10379
10369
  }, [
10380
10370
  createElementVNode("span", null, toDisplayString(file.name), 1),
10381
10371
  createElementVNode("div", _hoisted_5$1, [
10382
- createVNode(_component_el_link, {
10372
+ createVNode(unref(ElLink), {
10383
10373
  href: file.url,
10384
10374
  underline: "never",
10385
10375
  download: "",
@@ -10399,7 +10389,7 @@ const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritA
10399
10389
  };
10400
10390
  }
10401
10391
  });
10402
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-e4a1a66c"]]);
10392
+ const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-f625d304"]]);
10403
10393
  const _sfc_main$6 = /* @__PURE__ */ Object.assign({ name: "Badge" }, {
10404
10394
  __name: "Badge",
10405
10395
  props: {
@@ -10432,8 +10422,7 @@ const _sfc_main$6 = /* @__PURE__ */ Object.assign({ name: "Badge" }, {
10432
10422
  const { getPrefixCls: getPrefixCls2 } = useDesign();
10433
10423
  const prefixCls2 = getPrefixCls2("badge");
10434
10424
  return (_ctx, _cache) => {
10435
- const _component_el_badge = resolveComponent("el-badge");
10436
- return openBlock(), createBlock(_component_el_badge, mergeProps(props, { class: unref(prefixCls2) }), {
10425
+ return openBlock(), createBlock(unref(ElBadge), mergeProps(props, { class: unref(prefixCls2) }), {
10437
10426
  default: withCtx(() => [
10438
10427
  renderSlot(_ctx.$slots, "default")
10439
10428
  ]),
@@ -10503,8 +10492,7 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({ name: "Pagination" }, {
10503
10492
  emit("pagination", { page: val, limit: pageSize.value });
10504
10493
  };
10505
10494
  return (_ctx, _cache) => {
10506
- const _component_el_pagination = resolveComponent("el-pagination");
10507
- return withDirectives((openBlock(), createBlock(_component_el_pagination, {
10495
+ return withDirectives((openBlock(), createBlock(unref(ElPagination), {
10508
10496
  "current-page": currentPage.value,
10509
10497
  "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => currentPage.value = $event),
10510
10498
  "page-size": pageSize.value,
@@ -10604,9 +10592,7 @@ const _sfc_main$4 = /* @__PURE__ */ Object.assign({ name: "Dialog" }, {
10604
10592
  };
10605
10593
  return (_ctx, _cache) => {
10606
10594
  const _component_Icon = resolveComponent("Icon");
10607
- const _component_ElScrollbar = resolveComponent("ElScrollbar");
10608
- const _component_ElDialog = resolveComponent("ElDialog");
10609
- return openBlock(), createBlock(_component_ElDialog, mergeProps(unref(getBindValue), {
10595
+ return openBlock(), createBlock(unref(ElDialog), mergeProps(unref(getBindValue), {
10610
10596
  "close-on-click-modal": true,
10611
10597
  fullscreen: __props.fullscreen,
10612
10598
  width: unref(dialogWidth),
@@ -10636,7 +10622,7 @@ const _sfc_main$4 = /* @__PURE__ */ Object.assign({ name: "Dialog" }, {
10636
10622
  ])
10637
10623
  ]),
10638
10624
  default: withCtx(() => [
10639
- __props.scroll ? (openBlock(), createBlock(_component_ElScrollbar, {
10625
+ __props.scroll ? (openBlock(), createBlock(unref(ElScrollbar), {
10640
10626
  key: 0,
10641
10627
  style: normalizeStyle(unref(dialogStyle)),
10642
10628
  always: __props.scrollbarAlways
@@ -10695,8 +10681,7 @@ const _sfc_main$3 = /* @__PURE__ */ Object.assign({ name: "Alert" }, {
10695
10681
  const prefixCls2 = getPrefixCls2("alert");
10696
10682
  const props = __props;
10697
10683
  return (_ctx, _cache) => {
10698
- const _component_el_alert = resolveComponent("el-alert");
10699
- return openBlock(), createBlock(_component_el_alert, mergeProps(props, { class: unref(prefixCls2) }), null, 16, ["class"]);
10684
+ return openBlock(), createBlock(unref(ElAlert), mergeProps(props, { class: unref(prefixCls2) }), null, 16, ["class"]);
10700
10685
  };
10701
10686
  }
10702
10687
  });
@@ -11262,7 +11247,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
11262
11247
  },
11263
11248
  setup(__props) {
11264
11249
  return (_ctx, _cache) => {
11265
- const _component_Icon = resolveComponent("Icon");
11266
11250
  return openBlock(), createElementBlock("div", _hoisted_1, [
11267
11251
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
11268
11252
  return openBlock(), createElementBlock("div", {
@@ -11276,7 +11260,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
11276
11260
  createElementVNode("div", _hoisted_2, [
11277
11261
  createElementVNode("div", _hoisted_3, [
11278
11262
  createElementVNode("div", _hoisted_4, [
11279
- __props.active > index ? (openBlock(), createBlock(_component_Icon, {
11263
+ __props.active > index ? (openBlock(), createBlock(unref(_sfc_main$v), {
11280
11264
  key: 0,
11281
11265
  icon: "ant-design:check-outlined",
11282
11266
  color: "#fff"
@@ -11295,7 +11279,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
11295
11279
  };
11296
11280
  }
11297
11281
  });
11298
- const Steps = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7d66ca39"]]);
11282
+ const Steps = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eb3cf40f"]]);
11299
11283
  function useLayout() {
11300
11284
  const collapsed = ref(false);
11301
11285
  const toggleCollapsed = () => {