bm-admin-ui 1.0.30-alpha → 1.0.32-alpha

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.
@@ -1396,7 +1396,7 @@ const _sfc_main = {
1396
1396
  fileList: {},
1397
1397
  onepViewImageHover: {},
1398
1398
  previewVisible: false,
1399
- onepViewImage: "",
1399
+ onepViewImage: {},
1400
1400
  extraConfigs: {
1401
1401
  maxSize: 5,
1402
1402
  maxCount: 5,
@@ -1408,7 +1408,6 @@ const _sfc_main = {
1408
1408
  picClass: "",
1409
1409
  alignCenter: false,
1410
1410
  canNotViewAccept: ".rar,.zip",
1411
- fileDetail: true,
1412
1411
  myBtn: false
1413
1412
  },
1414
1413
  uploadConfigs: {
@@ -1447,7 +1446,22 @@ const _sfc_main = {
1447
1446
  }, 1e3);
1448
1447
  methods.customUploadRequest(file);
1449
1448
  }
1450
- }
1449
+ },
1450
+ pictureFileTypes: [
1451
+ "img",
1452
+ "image",
1453
+ "png",
1454
+ "PNG",
1455
+ "image/png",
1456
+ "jpg",
1457
+ "JPG",
1458
+ "jpeg",
1459
+ "JPEG",
1460
+ "image/jpeg",
1461
+ "gif",
1462
+ "GIF",
1463
+ "image/gif"
1464
+ ]
1451
1465
  });
1452
1466
  const methods = {
1453
1467
  updateUploadProgress(file, progress) {
@@ -1486,18 +1500,18 @@ const _sfc_main = {
1486
1500
  if (methods.fileIsDelete(file)) {
1487
1501
  return;
1488
1502
  }
1489
- emit("successFile", data);
1490
1503
  state.fileList[file.uid].status = "success";
1491
1504
  let uri = data?.url;
1492
- let item = state.extraConfigs.fileDetail ? {
1505
+ let item = {
1493
1506
  name: file.name,
1494
1507
  size: file.size,
1495
1508
  type: file.type,
1496
1509
  uid: file.uid,
1497
1510
  url: uri
1498
- } : uri;
1511
+ };
1499
1512
  state.uploadedList.push(item);
1500
1513
  state.fileList[file.uid].url = uri;
1514
+ emit("successFile", data);
1501
1515
  emit("success", state.uploadedList);
1502
1516
  emit("update", state.uploadedList);
1503
1517
  },
@@ -1511,10 +1525,13 @@ const _sfc_main = {
1511
1525
  emit("error", error);
1512
1526
  },
1513
1527
  async deleteFile(uid) {
1514
- const index = state.uploadedList.findIndex((ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url);
1515
- emit("deleteFile", state.fileList[uid]);
1516
- state.uploadedList.splice(index, 1);
1528
+ let targetFile = state.fileList[uid];
1517
1529
  delete state.fileList[uid];
1530
+ const index = state.uploadedList.findIndex((ele) => ele.url === targetFile.url);
1531
+ if (index !== -1) {
1532
+ state.uploadedList.splice(index, 1);
1533
+ }
1534
+ emit("deleteFile", targetFile);
1518
1535
  emit("delete", state.uploadedList);
1519
1536
  emit("update", state.uploadedList);
1520
1537
  },
@@ -1525,24 +1542,9 @@ const _sfc_main = {
1525
1542
  state.onepViewImageHover[uid] = false;
1526
1543
  },
1527
1544
  viewOnePicture(item) {
1528
- if ([
1529
- "img",
1530
- "image",
1531
- "png",
1532
- "PNG",
1533
- "image/png",
1534
- "jpg",
1535
- "JPG",
1536
- "jpeg",
1537
- "JPEG",
1538
- "image/jpeg",
1539
- "gif",
1540
- "GIF",
1541
- "image/gif"
1542
- ].includes(item.type.toLowerCase())) {
1545
+ if (state.pictureFileTypes.includes(item.type.toLowerCase())) {
1543
1546
  state.previewVisible = true;
1544
1547
  state.onepViewImage = item;
1545
- return;
1546
1548
  }
1547
1549
  emit("previewFile", item);
1548
1550
  },
@@ -1686,57 +1688,53 @@ const _hoisted_5 = ["src"];
1686
1688
  const _hoisted_6 = ["src"];
1687
1689
  const _hoisted_7 = ["src"];
1688
1690
  const _hoisted_8 = ["src"];
1689
- const _hoisted_9 = ["src"];
1690
- const _hoisted_10 = {
1691
- key: 6,
1692
- class: "bm-upload__picture-result__cover"
1693
- };
1694
- const _hoisted_11 = ["onClick"];
1695
- const _hoisted_12 = ["onClick"];
1696
- const _hoisted_13 = ["onMouseenter", "onMouseleave"];
1697
- const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-error__image" }, null, -1);
1698
- const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("div", null, "\u4E0A\u4F20\u9519\u8BEF", -1);
1699
- const _hoisted_16 = {
1691
+ const _hoisted_9 = ["onClick"];
1692
+ const _hoisted_10 = ["onClick"];
1693
+ const _hoisted_11 = ["onMouseenter", "onMouseleave"];
1694
+ const _hoisted_12 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-error__image" }, null, -1);
1695
+ const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("div", null, "\u4E0A\u4F20\u9519\u8BEF", -1);
1696
+ const _hoisted_14 = {
1700
1697
  key: 0,
1701
1698
  class: "bm-upload__picture-result__cover"
1702
1699
  };
1703
- const _hoisted_17 = ["onClick"];
1704
- const _hoisted_18 = ["onClick"];
1705
- const _hoisted_19 = {
1700
+ const _hoisted_15 = ["onClick"];
1701
+ const _hoisted_16 = ["onClick"];
1702
+ const _hoisted_17 = {
1706
1703
  key: 0,
1707
1704
  style: { "font-size": "24px", "color": "#9393a3" }
1708
1705
  };
1709
- const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
1710
- const _hoisted_21 = {
1706
+ const _hoisted_18 = { class: "ant-upload-text bm-upload__text" };
1707
+ const _hoisted_19 = {
1711
1708
  key: 0,
1712
1709
  class: "bm-upload__tips"
1713
1710
  };
1714
- const _hoisted_22 = { key: 1 };
1715
- const _hoisted_23 = {
1711
+ const _hoisted_20 = { key: 1 };
1712
+ const _hoisted_21 = {
1716
1713
  key: 0,
1717
1714
  class: "bm-upload__tips"
1718
1715
  };
1719
- const _hoisted_24 = {
1716
+ const _hoisted_22 = {
1720
1717
  key: 2,
1721
1718
  class: "bm-upload__file-list"
1722
1719
  };
1723
- const _hoisted_25 = { class: "bm-upload__file__detail" };
1724
- const _hoisted_26 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
1720
+ const _hoisted_23 = { class: "bm-upload__file__detail" };
1721
+ const _hoisted_24 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
1725
1722
  /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__attachment" })
1726
1723
  ], -1);
1727
- const _hoisted_27 = { class: "bm-upload__file__name" };
1728
- const _hoisted_28 = { class: "bm-upload__file__progress-tools" };
1729
- const _hoisted_29 = ["onClick"];
1730
- const _hoisted_30 = ["onClick"];
1731
- const _hoisted_31 = {
1724
+ const _hoisted_25 = { class: "bm-upload__file__name" };
1725
+ const _hoisted_26 = { class: "bm-upload__file__progress-tools" };
1726
+ const _hoisted_27 = ["onClick"];
1727
+ const _hoisted_28 = ["onClick"];
1728
+ const _hoisted_29 = {
1732
1729
  key: 0,
1733
1730
  class: "bm-upload__progress"
1734
1731
  };
1735
- const _hoisted_32 = { style: { "padding-top": "20px" } };
1736
- const _hoisted_33 = ["src"];
1737
- const _hoisted_34 = ["title", "src"];
1732
+ const _hoisted_30 = { style: { "padding-top": "20px" } };
1733
+ const _hoisted_31 = ["src"];
1734
+ const _hoisted_32 = ["title", "src"];
1738
1735
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1739
1736
  const _component_a_progress = vue.resolveComponent("a-progress");
1737
+ const _component_a_image = vue.resolveComponent("a-image");
1740
1738
  const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
1741
1739
  const _component_UploadOutlined = vue.resolveComponent("UploadOutlined");
1742
1740
  const _component_a_button = vue.resolveComponent("a-button");
@@ -1749,145 +1747,141 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1749
1747
  "bm-upload--picture-card--has-tips": !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) && !_ctx.extraConfigs.myBtn && _ctx.uploadConfigs.listType === "picture-card" && _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips
1750
1748
  }])
1751
1749
  }, [
1752
- _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.fileList, (item) => {
1753
- return vue.openBlock(), vue.createElementBlock("div", {
1754
- key: item,
1755
- class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
1756
- }, [
1757
- vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
1758
- item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
1759
- _hoisted_2,
1760
- vue.createVNode(_component_a_progress, {
1761
- type: "line",
1762
- "stroke-width": 2,
1763
- "show-info": false,
1764
- "stroke-color": _ctx.uploadBarColor,
1765
- percent: item.uid?.progress
1766
- }, null, 8, ["stroke-color", "percent"])
1767
- ])) : vue.createCommentVNode("v-if", true),
1768
- vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
1769
- item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1770
- !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
1771
- key: 0,
1772
- class: "bm-upload__picture-result",
1773
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1774
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1775
- onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
1776
- }, [
1777
- ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1750
+ _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1751
+ vue.createCommentVNode(" \u4E0D\u8981\u4F7F\u7528 a-image-preview-group \u5305\u88F9\uFF0C\u4E0D\u7136\u4F1A\u51FA\u73B0\u91CD\u590D\u56FE\u7247\u548C\u7A7A\u767D\u56FE\u7247 "),
1752
+ vue.createCommentVNode(" <a-image-preview-group> "),
1753
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
1754
+ return vue.openBlock(), vue.createElementBlock("div", {
1755
+ key: item,
1756
+ class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
1757
+ }, [
1758
+ vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
1759
+ item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
1760
+ _hoisted_2,
1761
+ vue.createVNode(_component_a_progress, {
1762
+ type: "line",
1763
+ "stroke-width": 2,
1764
+ "show-info": false,
1765
+ "stroke-color": _ctx.uploadBarColor,
1766
+ percent: item.uid?.progress
1767
+ }, null, 8, ["stroke-color", "percent"])
1768
+ ])) : vue.createCommentVNode("v-if", true),
1769
+ vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
1770
+ item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1771
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
1778
1772
  key: 0,
1779
- class: "bm-upload__picture-result__image",
1780
- src: $setup.icons.pdf,
1781
- alt: "avatar"
1782
- }, null, 8, _hoisted_4)) : [
1783
- "xlsx",
1784
- "XLSX",
1785
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
1786
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1787
- key: 1,
1788
- class: "bm-upload__picture-result__image",
1789
- src: $setup.icons.excel,
1790
- alt: "avatar"
1791
- }, null, 8, _hoisted_5)) : [
1792
- "ppt",
1793
- "PPT",
1794
- "application/vnd.ms-powerpoint",
1795
- "pptx",
1796
- "PPTX",
1797
- "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1798
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1799
- key: 2,
1800
- class: "bm-upload__picture-result__image",
1801
- src: $setup.icons.ppt,
1802
- alt: "avatar"
1803
- }, null, 8, _hoisted_6)) : [
1804
- "doc",
1805
- "DOC",
1806
- "application/msword",
1807
- "docx",
1808
- "DOCX",
1809
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
1810
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1811
- key: 3,
1812
- class: "bm-upload__picture-result__image",
1813
- src: $setup.icons.doc,
1814
- alt: "avatar"
1815
- }, null, 8, _hoisted_7)) : [
1816
- "img",
1817
- "image",
1818
- "png",
1819
- "PNG",
1820
- "image/png",
1821
- "jpg",
1822
- "JPG",
1823
- "jpeg",
1824
- "JPEG",
1825
- "image/jpeg",
1826
- "gif",
1827
- "GIF",
1828
- "image/gif"
1829
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1830
- key: 4,
1831
- class: "bm-upload__picture-result__image",
1832
- src: item.url,
1833
- alt: "avatar"
1834
- }, null, 8, _hoisted_8)) : (vue.openBlock(), vue.createElementBlock("img", {
1835
- key: 5,
1836
- class: "bm-upload__picture-result__image",
1837
- src: $setup.icons.others,
1838
- alt: "avatar"
1839
- }, null, 8, _hoisted_9)),
1840
- _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
1841
- !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
1773
+ class: "bm-upload__picture-result",
1774
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1775
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1776
+ onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
1777
+ }, [
1778
+ ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1842
1779
  key: 0,
1843
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
1844
- onClick: ($event) => _ctx.viewOnePicture(item)
1845
- }, null, 8, _hoisted_11)) : vue.createCommentVNode("v-if", true),
1846
- !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
1780
+ class: "bm-upload__picture-result__image",
1781
+ src: $setup.icons.pdf,
1782
+ alt: "\u56FE\u7247"
1783
+ }, null, 8, _hoisted_4)) : [
1784
+ "xlsx",
1785
+ "XLSX",
1786
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
1787
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1847
1788
  key: 1,
1789
+ class: "bm-upload__picture-result__image",
1790
+ src: $setup.icons.excel,
1791
+ alt: "\u56FE\u7247"
1792
+ }, null, 8, _hoisted_5)) : [
1793
+ "ppt",
1794
+ "PPT",
1795
+ "application/vnd.ms-powerpoint",
1796
+ "pptx",
1797
+ "PPTX",
1798
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1799
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1800
+ key: 2,
1801
+ class: "bm-upload__picture-result__image",
1802
+ src: $setup.icons.ppt,
1803
+ alt: "\u56FE\u7247"
1804
+ }, null, 8, _hoisted_6)) : [
1805
+ "doc",
1806
+ "DOC",
1807
+ "application/msword",
1808
+ "docx",
1809
+ "DOCX",
1810
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
1811
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1812
+ key: 3,
1813
+ class: "bm-upload__picture-result__image",
1814
+ src: $setup.icons.doc,
1815
+ alt: "\u56FE\u7247"
1816
+ }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (vue.openBlock(), vue.createBlock(_component_a_image, {
1817
+ key: 4,
1818
+ class: "bm-upload__picture-result__image",
1819
+ src: item.url,
1820
+ alt: "\u56FE\u7247"
1821
+ }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("img", {
1822
+ key: 5,
1823
+ class: "bm-upload__picture-result__image",
1824
+ src: $setup.icons.others,
1825
+ alt: "\u56FE\u7247"
1826
+ }, null, 8, _hoisted_8)),
1827
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", {
1828
+ key: 6,
1829
+ class: vue.normalizeClass(["bm-upload__picture-result__cover", {
1830
+ isPicture: _ctx.pictureFileTypes.includes(item.type)
1831
+ }])
1832
+ }, [
1833
+ !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
1834
+ key: 0,
1835
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
1836
+ onClick: ($event) => _ctx.viewOnePicture(item)
1837
+ }, null, 8, _hoisted_9)) : vue.createCommentVNode("v-if", true),
1838
+ !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
1839
+ key: 1,
1840
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
1841
+ onClick: ($event) => _ctx.deleteFile(item.uid)
1842
+ }, null, 8, _hoisted_10)) : vue.createCommentVNode("v-if", true)
1843
+ ], 2)) : vue.createCommentVNode("v-if", true)
1844
+ ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
1845
+ key: 1,
1846
+ file: item
1847
+ })
1848
+ ], 2112)) : vue.createCommentVNode("v-if", true),
1849
+ vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
1850
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
1851
+ key: 2,
1852
+ class: "bm-upload__picture-error",
1853
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1854
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1855
+ onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
1856
+ }, [
1857
+ _hoisted_12,
1858
+ _hoisted_13,
1859
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
1860
+ vue.createElementVNode("div", {
1861
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
1862
+ onClick: (e) => _ctx.reUpload(e, item.uid)
1863
+ }, null, 8, _hoisted_15),
1864
+ vue.createElementVNode("div", {
1848
1865
  class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
1849
1866
  onClick: ($event) => _ctx.deleteFile(item.uid)
1850
- }, null, 8, _hoisted_12)) : vue.createCommentVNode("v-if", true)
1867
+ }, null, 8, _hoisted_16)
1851
1868
  ])) : vue.createCommentVNode("v-if", true)
1852
- ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
1853
- key: 1,
1854
- file: item
1855
- })
1856
- ], 2112)) : vue.createCommentVNode("v-if", true),
1857
- vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
1858
- item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
1859
- key: 2,
1860
- class: "bm-upload__picture-error",
1861
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1862
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1863
- onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
1864
- }, [
1865
- _hoisted_14,
1866
- _hoisted_15,
1867
- _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
1868
- vue.createElementVNode("div", {
1869
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
1870
- onClick: (e) => _ctx.reUpload(e, item.uid)
1871
- }, null, 8, _hoisted_17),
1872
- vue.createElementVNode("div", {
1873
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
1874
- onClick: ($event) => _ctx.deleteFile(item.uid)
1875
- }, null, 8, _hoisted_18)
1876
- ])) : vue.createCommentVNode("v-if", true)
1877
- ], 40, _hoisted_13)) : vue.createCommentVNode("v-if", true)
1878
- ], 2);
1879
- }), 128)) : vue.createCommentVNode("v-if", true),
1869
+ ], 40, _hoisted_11)) : vue.createCommentVNode("v-if", true)
1870
+ ], 2);
1871
+ }), 128)),
1872
+ vue.createCommentVNode(" </a-image-preview-group> ")
1873
+ ], 2112)) : vue.createCommentVNode("v-if", true),
1880
1874
  !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (vue.openBlock(), vue.createBlock(_component_a_upload, vue.mergeProps({ key: 1 }, _ctx.uploadConfigs, {
1881
1875
  class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
1882
1876
  onReject: _ctx.handleReject
1883
1877
  }), {
1884
1878
  default: vue.withCtx(() => [
1885
1879
  _ctx.extraConfigs.myBtn ? vue.renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1886
- _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
1880
+ _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
1887
1881
  vue.createVNode(_component_PlusOutlined),
1888
- vue.createElementVNode("div", _hoisted_20, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
1889
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1890
- ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
1882
+ vue.createElementVNode("div", _hoisted_18, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
1883
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1884
+ ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
1891
1885
  vue.createVNode(_component_a_button, {
1892
1886
  class: vue.normalizeClass(_ctx.extraConfigs.btnClass),
1893
1887
  disabled: $setup.uploadDisabled && !_ctx.extraConfigs?.hideDisabledBtn
@@ -1898,39 +1892,39 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1898
1892
  ]),
1899
1893
  _: 1
1900
1894
  }, 8, ["class", "disabled"]),
1901
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1895
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1902
1896
  ])) : vue.createCommentVNode("v-if", true)
1903
1897
  ], 2112))
1904
1898
  ]),
1905
1899
  _: 3
1906
1900
  }, 16, ["class", "onReject"])) : vue.createCommentVNode("v-if", true),
1907
- _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, [
1901
+ _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
1908
1902
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
1909
1903
  return vue.openBlock(), vue.createElementBlock("div", {
1910
1904
  key: item,
1911
1905
  class: "bm-upload__file"
1912
1906
  }, [
1913
1907
  !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1914
- vue.createElementVNode("div", _hoisted_25, [
1915
- _hoisted_26,
1916
- vue.createElementVNode("div", _hoisted_27, [
1908
+ vue.createElementVNode("div", _hoisted_23, [
1909
+ _hoisted_24,
1910
+ vue.createElementVNode("div", _hoisted_25, [
1917
1911
  vue.createVNode(_component_OverTooltips, {
1918
1912
  title: item.name
1919
1913
  }, null, 8, ["title"])
1920
1914
  ]),
1921
- vue.createElementVNode("div", _hoisted_28, [
1915
+ vue.createElementVNode("div", _hoisted_26, [
1922
1916
  item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
1923
1917
  key: 0,
1924
1918
  class: "bm-upload__error-reload",
1925
1919
  onClick: (e) => _ctx.reUpload(e, item.uid)
1926
- }, null, 8, _hoisted_29)) : vue.createCommentVNode("v-if", true),
1920
+ }, null, 8, _hoisted_27)) : vue.createCommentVNode("v-if", true),
1927
1921
  vue.createElementVNode("div", {
1928
1922
  class: "bm-upload__trash",
1929
1923
  onClick: ($event) => _ctx.deleteFile(item.uid)
1930
- }, null, 8, _hoisted_30)
1924
+ }, null, 8, _hoisted_28)
1931
1925
  ])
1932
1926
  ]),
1933
- !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_31, [
1927
+ !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
1934
1928
  vue.createVNode(_component_a_progress, {
1935
1929
  type: "line",
1936
1930
  "stroke-width": 2,
@@ -1953,32 +1947,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1953
1947
  onCancel: _ctx.handleClosePictureView
1954
1948
  }, {
1955
1949
  default: vue.withCtx(() => [
1956
- vue.createElementVNode("div", _hoisted_32, [
1957
- [
1958
- "img",
1959
- "image",
1960
- "png",
1961
- "PNG",
1962
- "image/png",
1963
- "jpg",
1964
- "JPG",
1965
- "jpeg",
1966
- "JPEG",
1967
- "image/jpeg",
1968
- "gif",
1969
- "GIF",
1970
- "image/gif"
1971
- ].includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1950
+ vue.createElementVNode("div", _hoisted_30, [
1951
+ _ctx.pictureFileTypes.includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1972
1952
  key: 0,
1973
1953
  style: { "width": "100%" },
1974
1954
  src: _ctx.onepViewImage.url,
1975
1955
  alt: ""
1976
- }, null, 8, _hoisted_33)) : (vue.openBlock(), vue.createElementBlock("iframe", {
1956
+ }, null, 8, _hoisted_31)) : (vue.openBlock(), vue.createElementBlock("iframe", {
1977
1957
  key: 1,
1978
1958
  title: _ctx.onepViewImage.type,
1979
1959
  style: { "width": "100%", "min-height": "600px" },
1980
1960
  src: _ctx.onepViewImage.url
1981
- }, null, 8, _hoisted_34))
1961
+ }, null, 8, _hoisted_32))
1982
1962
  ])
1983
1963
  ]),
1984
1964
  _: 1
@@ -100,7 +100,7 @@ declare const _default: {
100
100
  fileList: import("vue").Ref<{}>;
101
101
  onepViewImageHover: import("vue").Ref<{}>;
102
102
  previewVisible: import("vue").Ref<boolean>;
103
- onepViewImage: import("vue").Ref<string>;
103
+ onepViewImage: import("vue").Ref<{}>;
104
104
  extraConfigs: import("vue").Ref<{
105
105
  maxSize: number;
106
106
  maxCount: number;
@@ -112,7 +112,6 @@ declare const _default: {
112
112
  picClass: string;
113
113
  alignCenter: boolean;
114
114
  canNotViewAccept: string;
115
- fileDetail: boolean;
116
115
  myBtn: boolean;
117
116
  }>;
118
117
  uploadConfigs: import("vue").Ref<{
@@ -131,6 +130,7 @@ declare const _default: {
131
130
  data: any;
132
131
  }) => Promise<void>;
133
132
  }>;
133
+ pictureFileTypes: import("vue").Ref<string[]>;
134
134
  };
135
135
  };
136
136
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.0.30-alpha",
3
+ "version": "1.0.32-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",