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