bm-admin-ui 1.0.40-alpha → 1.0.42-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.
Files changed (123) hide show
  1. package/es/components/attachment/index.d.ts +70 -0
  2. package/es/components/attachment/index.js +273 -0
  3. package/es/components/attachment/src/attachment.vue.d.ts +69 -0
  4. package/es/components/breadcrumb/index.d.ts +162 -0
  5. package/es/components/breadcrumb/index.js +158 -0
  6. package/es/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
  7. package/es/components/button/index.d.ts +303 -1
  8. package/es/components/editor/index.d.ts +305 -0
  9. package/es/components/editor/index.js +12549 -0
  10. package/es/components/editor/src/editor.vue.d.ts +304 -0
  11. package/es/components/editor/src/props.d.ts +31 -0
  12. package/es/components/feedback/index.d.ts +1028 -2
  13. package/es/components/float-table/__test__/index.test.d.ts +1 -0
  14. package/es/components/float-table/index.d.ts +68 -1
  15. package/es/components/flow-designer/index.d.ts +5 -1
  16. package/es/components/form-create/index.js +59 -27
  17. package/es/components/form-designer/index.js +42 -9
  18. package/es/components/index.d.ts +3 -0
  19. package/es/components/index.js +3 -0
  20. package/es/components/input-tags-display/index.d.ts +138 -1
  21. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
  22. package/es/components/over-tooltips/index.d.ts +33 -1
  23. package/es/components/search-filter/index.d.ts +233 -1
  24. package/es/components/search-filter/src/search-filter.vue.d.ts +3 -3
  25. package/es/components/select-all/index.d.ts +752 -1
  26. package/es/components/select-all/src/selectAll.vue.d.ts +5 -5
  27. package/es/components/shops-filter/index.d.ts +97 -1
  28. package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  29. package/es/components/staffs-selector/index.d.ts +1095 -1
  30. package/es/components/staffs-selector/index.js +535 -505
  31. package/es/components/staffs-selector/src/action.d.ts +66 -0
  32. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
  33. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
  34. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
  35. package/es/components/timeline/index.d.ts +111 -2
  36. package/es/components/upload/index.d.ts +139 -2
  37. package/es/components/upload/index.js +212 -169
  38. package/es/components/upload/src/props.d.ts +50 -0
  39. package/es/components/upload/src/upload.vue.d.ts +44 -11
  40. package/es/utils/with-install.d.ts +7 -1
  41. package/es/utils/with-install.js +1 -0
  42. package/index.esm.js +81686 -71590
  43. package/index.js +81685 -71586
  44. package/lib/components/attachment/index.d.ts +70 -0
  45. package/lib/components/attachment/index.js +278 -0
  46. package/lib/components/attachment/src/attachment.vue.d.ts +69 -0
  47. package/lib/components/breadcrumb/index.d.ts +162 -0
  48. package/lib/components/breadcrumb/index.js +168 -0
  49. package/lib/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
  50. package/lib/components/button/index.d.ts +303 -1
  51. package/lib/components/editor/index.d.ts +305 -0
  52. package/lib/components/editor/index.js +12554 -0
  53. package/lib/components/editor/src/editor.vue.d.ts +304 -0
  54. package/lib/components/editor/src/props.d.ts +31 -0
  55. package/lib/components/feedback/index.d.ts +1028 -2
  56. package/lib/components/float-table/__test__/index.test.d.ts +1 -0
  57. package/lib/components/float-table/index.d.ts +68 -1
  58. package/lib/components/flow-designer/index.d.ts +5 -1
  59. package/lib/components/form-create/index.js +59 -27
  60. package/lib/components/form-designer/index.js +42 -9
  61. package/lib/components/index.d.ts +3 -0
  62. package/lib/components/index.js +21 -0
  63. package/lib/components/input-tags-display/index.d.ts +138 -1
  64. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
  65. package/lib/components/over-tooltips/index.d.ts +33 -1
  66. package/lib/components/search-filter/index.d.ts +233 -1
  67. package/lib/components/search-filter/src/search-filter.vue.d.ts +3 -3
  68. package/lib/components/select-all/index.d.ts +752 -1
  69. package/lib/components/select-all/src/selectAll.vue.d.ts +5 -5
  70. package/lib/components/shops-filter/index.d.ts +97 -1
  71. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  72. package/lib/components/staffs-selector/index.d.ts +1095 -1
  73. package/lib/components/staffs-selector/index.js +536 -506
  74. package/lib/components/staffs-selector/src/action.d.ts +66 -0
  75. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
  76. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
  77. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
  78. package/lib/components/timeline/index.d.ts +111 -2
  79. package/lib/components/upload/index.d.ts +139 -2
  80. package/lib/components/upload/index.js +210 -167
  81. package/lib/components/upload/src/props.d.ts +50 -0
  82. package/lib/components/upload/src/upload.vue.d.ts +44 -11
  83. package/lib/utils/with-install.d.ts +7 -1
  84. package/lib/utils/with-install.js +1 -0
  85. package/package.json +1 -1
  86. package/theme-chalk/attachment.css +1 -0
  87. package/theme-chalk/breadcrumb.css +1 -0
  88. package/theme-chalk/editor.css +16 -0
  89. package/theme-chalk/index.css +16 -1
  90. package/theme-chalk/staffs-selector.css +1 -1
  91. package/theme-chalk/upload.css +1 -1
  92. package/types/components/attachment/index.d.ts +70 -0
  93. package/types/components/attachment/src/attachment.vue.d.ts +69 -0
  94. package/types/components/breadcrumb/index.d.ts +162 -0
  95. package/types/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
  96. package/types/components/button/index.d.ts +303 -1
  97. package/types/components/editor/index.d.ts +305 -0
  98. package/types/components/editor/src/editor.vue.d.ts +304 -0
  99. package/types/components/editor/src/props.d.ts +31 -0
  100. package/types/components/feedback/index.d.ts +1028 -2
  101. package/types/components/float-table/__test__/index.test.d.ts +1 -0
  102. package/types/components/float-table/index.d.ts +68 -1
  103. package/types/components/flow-designer/index.d.ts +5 -1
  104. package/types/components/index.d.ts +3 -0
  105. package/types/components/input-tags-display/index.d.ts +138 -1
  106. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
  107. package/types/components/over-tooltips/index.d.ts +33 -1
  108. package/types/components/search-filter/index.d.ts +233 -1
  109. package/types/components/search-filter/src/search-filter.vue.d.ts +3 -3
  110. package/types/components/select-all/index.d.ts +752 -1
  111. package/types/components/select-all/src/selectAll.vue.d.ts +5 -5
  112. package/types/components/shops-filter/index.d.ts +97 -1
  113. package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  114. package/types/components/staffs-selector/index.d.ts +1095 -1
  115. package/types/components/staffs-selector/src/action.d.ts +66 -0
  116. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
  117. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
  118. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
  119. package/types/components/timeline/index.d.ts +111 -2
  120. package/types/components/upload/index.d.ts +139 -2
  121. package/types/components/upload/src/props.d.ts +50 -0
  122. package/types/components/upload/src/upload.vue.d.ts +44 -11
  123. package/types/utils/with-install.d.ts +7 -1
@@ -1,6 +1,6 @@
1
1
  import { withInstall } from 'bm-admin-ui/es/utils/with-install';
2
- import { reactive, onBeforeUnmount, ref, watch, nextTick, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeStyle, normalizeClass, createTextVNode, toDisplayString, computed, createElementBlock, Fragment, createCommentVNode, renderList, createVNode, mergeProps } from 'vue';
3
- import { PlusOutlined, UploadOutlined, LoadingOutlined } from '@ant-design/icons-vue';
2
+ import { reactive, onBeforeUnmount, ref, watch, nextTick, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeStyle, normalizeClass, createTextVNode, toDisplayString, computed, createElementBlock, Fragment, createCommentVNode, renderList, createVNode, resolveDynamicComponent, mergeProps } from 'vue';
3
+ import { PlusOutlined, UploadOutlined, LoadingOutlined, InboxOutlined } from '@ant-design/icons-vue';
4
4
 
5
5
  var _export_sfc = (sfc, props) => {
6
6
  const target = sfc.__vccOpts || sfc;
@@ -168,7 +168,13 @@ var icons = {
168
168
  const CLOUND_PRE = "/cloudStorage/read";
169
169
  const _sfc_main = {
170
170
  name: "BmUpload",
171
- components: { PlusOutlined, OverTooltips, UploadOutlined, LoadingOutlined },
171
+ components: {
172
+ PlusOutlined,
173
+ OverTooltips,
174
+ UploadOutlined,
175
+ LoadingOutlined,
176
+ InboxOutlined
177
+ },
172
178
  props: {
173
179
  uploadProps: {
174
180
  type: Object,
@@ -266,7 +272,9 @@ const _sfc_main = {
266
272
  picClass: "",
267
273
  alignCenter: false,
268
274
  canNotViewAccept: ".rar,.zip",
269
- myBtn: false
275
+ myBtn: false,
276
+ showFileName: false,
277
+ drag: false
270
278
  },
271
279
  uploadConfigs: {
272
280
  multiple: false,
@@ -310,6 +318,9 @@ const _sfc_main = {
310
318
  status: ""
311
319
  };
312
320
  setTimeout(function() {
321
+ if (methods.fileIsDelete(file)) {
322
+ return;
323
+ }
313
324
  state.fileList[file.uid].isDoneDeloy = true;
314
325
  }, 1e3);
315
326
  methods.customUploadRequest(file);
@@ -586,50 +597,66 @@ const _hoisted_15 = ["onClick"];
586
597
  const _hoisted_16 = ["onClick"];
587
598
  const _hoisted_17 = {
588
599
  key: 0,
600
+ class: "bm-upload__picture__name"
601
+ };
602
+ const _hoisted_18 = {
603
+ key: 1,
604
+ class: "bm-upload__button__wrapper"
605
+ };
606
+ const _hoisted_19 = { key: 0 };
607
+ const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
608
+ const _hoisted_21 = {
609
+ key: 0,
610
+ class: "bm-upload__tips"
611
+ };
612
+ const _hoisted_22 = {
613
+ key: 1,
589
614
  style: { "font-size": "24px", "color": "#9393a3" }
590
615
  };
591
- const _hoisted_18 = { class: "ant-upload-text bm-upload__text" };
592
- const _hoisted_19 = {
616
+ const _hoisted_23 = { class: "ant-upload-text bm-upload__text" };
617
+ const _hoisted_24 = {
593
618
  key: 0,
594
619
  class: "bm-upload__tips"
595
620
  };
596
- const _hoisted_20 = { key: 1 };
597
- const _hoisted_21 = {
621
+ const _hoisted_25 = { key: 2 };
622
+ const _hoisted_26 = {
598
623
  key: 0,
599
624
  class: "bm-upload__tips"
600
625
  };
601
- const _hoisted_22 = {
626
+ const _hoisted_27 = {
602
627
  key: 2,
603
628
  class: "bm-upload__file-list"
604
629
  };
605
- const _hoisted_23 = { class: "bm-upload__file__detail" };
606
- const _hoisted_24 = /* @__PURE__ */ createElementVNode("div", { class: "bm-upload__file__icon" }, [
630
+ const _hoisted_28 = { class: "bm-upload__file__detail" };
631
+ const _hoisted_29 = /* @__PURE__ */ createElementVNode("div", { class: "bm-upload__file__icon" }, [
607
632
  /* @__PURE__ */ createElementVNode("div", { class: "bm-upload__attachment" })
608
633
  ], -1);
609
- const _hoisted_25 = { class: "bm-upload__file__name" };
610
- const _hoisted_26 = { class: "bm-upload__file__progress-tools" };
611
- const _hoisted_27 = ["onClick"];
612
- const _hoisted_28 = ["onClick"];
613
- const _hoisted_29 = {
634
+ const _hoisted_30 = { class: "bm-upload__file__name" };
635
+ const _hoisted_31 = { class: "bm-upload__file__progress-tools" };
636
+ const _hoisted_32 = ["onClick"];
637
+ const _hoisted_33 = ["onClick"];
638
+ const _hoisted_34 = {
614
639
  key: 0,
615
640
  class: "bm-upload__progress"
616
641
  };
617
- const _hoisted_30 = { style: { "padding-top": "20px" } };
618
- const _hoisted_31 = ["src"];
619
- const _hoisted_32 = ["title", "src"];
642
+ const _hoisted_35 = { style: { "padding-top": "20px" } };
643
+ const _hoisted_36 = ["src"];
644
+ const _hoisted_37 = ["title", "src"];
620
645
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
621
646
  const _component_a_progress = resolveComponent("a-progress");
622
647
  const _component_a_image = resolveComponent("a-image");
623
648
  const _component_LoadingOutlined = resolveComponent("LoadingOutlined");
649
+ const _component_OverTooltips = resolveComponent("OverTooltips");
650
+ const _component_InboxOutlined = resolveComponent("InboxOutlined");
624
651
  const _component_PlusOutlined = resolveComponent("PlusOutlined");
625
652
  const _component_UploadOutlined = resolveComponent("UploadOutlined");
626
653
  const _component_a_button = resolveComponent("a-button");
627
- const _component_a_upload = resolveComponent("a-upload");
628
- const _component_OverTooltips = resolveComponent("OverTooltips");
629
654
  const _component_a_modal = resolveComponent("a-modal");
630
655
  return openBlock(), createElementBlock("div", {
631
656
  class: normalizeClass(["bm-upload", {
632
657
  "bm-upload--text": _ctx.uploadConfigs.listType === "text",
658
+ "bm-upload--drag": _ctx.extraConfigs.drag,
659
+ "bm-upload--picture-card": _ctx.uploadConfigs.listType === "picture-card",
633
660
  "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
634
661
  }])
635
662
  }, [
@@ -639,181 +666,197 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
639
666
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item) => {
640
667
  return openBlock(), createElementBlock("div", {
641
668
  key: item,
642
- class: normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
669
+ class: "bm-upload__picture_wrapper"
643
670
  }, [
644
- createCommentVNode(" \u4E0A\u4F20\u4E2D "),
645
- item.progress < 100 && item.status !== "error" ? (openBlock(), createElementBlock("div", _hoisted_1, [
646
- _hoisted_2,
647
- createVNode(_component_a_progress, {
648
- type: "line",
649
- "stroke-width": 2,
650
- "show-info": false,
651
- "stroke-color": _ctx.uploadBarColor,
652
- percent: item.uid?.progress
653
- }, null, 8, ["stroke-color", "percent"])
654
- ])) : createCommentVNode("v-if", true),
655
- createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
656
- item.progress >= 100 && item.status !== "error" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
657
- !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock("div", {
658
- key: 0,
659
- class: "bm-upload__picture-result",
660
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
661
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
662
- onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
663
- }, [
664
- ["pdf", "PDF", "application/pdf"].includes(item.type) ? (openBlock(), createElementBlock("img", {
671
+ createElementVNode("div", {
672
+ class: normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
673
+ }, [
674
+ createCommentVNode(" \u4E0A\u4F20\u4E2D "),
675
+ item.progress < 100 && item.status !== "error" ? (openBlock(), createElementBlock("div", _hoisted_1, [
676
+ _hoisted_2,
677
+ createVNode(_component_a_progress, {
678
+ type: "line",
679
+ "stroke-width": 2,
680
+ "show-info": false,
681
+ "stroke-color": _ctx.uploadBarColor,
682
+ percent: item.uid?.progress
683
+ }, null, 8, ["stroke-color", "percent"])
684
+ ])) : createCommentVNode("v-if", true),
685
+ createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
686
+ item.progress >= 100 && item.status !== "error" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
687
+ !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock("div", {
665
688
  key: 0,
666
- class: "bm-upload__picture-result__image",
667
- src: $setup.icons.pdf,
668
- alt: "\u56FE\u7247"
669
- }, null, 8, _hoisted_4)) : [
670
- "xlsx",
671
- "XLSX",
672
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
673
- ].includes(item.type) ? (openBlock(), createElementBlock("img", {
674
- key: 1,
675
- class: "bm-upload__picture-result__image",
676
- src: $setup.icons.excel,
677
- alt: "\u56FE\u7247"
678
- }, null, 8, _hoisted_5)) : [
679
- "ppt",
680
- "PPT",
681
- "application/vnd.ms-powerpoint",
682
- "pptx",
683
- "PPTX",
684
- "application/vnd.openxmlformats-officedocument.presentationml.presentation"
685
- ].includes(item.type) ? (openBlock(), createElementBlock("img", {
686
- key: 2,
687
- class: "bm-upload__picture-result__image",
688
- src: $setup.icons.ppt,
689
- alt: "\u56FE\u7247"
690
- }, null, 8, _hoisted_6)) : [
691
- "doc",
692
- "DOC",
693
- "application/msword",
694
- "docx",
695
- "DOCX",
696
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
697
- ].includes(item.type) ? (openBlock(), createElementBlock("img", {
698
- key: 3,
699
- class: "bm-upload__picture-result__image",
700
- src: $setup.icons.doc,
701
- alt: "\u56FE\u7247"
702
- }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
703
- item.url ? (openBlock(), createBlock(_component_a_image, {
689
+ class: "bm-upload__picture-result",
690
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
691
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
692
+ onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
693
+ }, [
694
+ ["pdf", "PDF", "application/pdf"].includes(item.type) ? (openBlock(), createElementBlock("img", {
704
695
  key: 0,
705
696
  class: "bm-upload__picture-result__image",
706
- src: item.url,
697
+ src: $setup.icons.pdf,
707
698
  alt: "\u56FE\u7247"
708
- }, null, 8, ["src"])) : (openBlock(), createBlock(_component_LoadingOutlined, { key: 1 }))
709
- ], 64)) : (openBlock(), createElementBlock("img", {
710
- key: 5,
711
- class: "bm-upload__picture-result__image",
712
- src: $setup.icons.others,
713
- alt: "\u56FE\u7247"
714
- }, null, 8, _hoisted_8)),
715
- _ctx.onepViewImageHover[item.uid] ? (openBlock(), createElementBlock("div", {
716
- key: 6,
717
- class: normalizeClass(["bm-upload__picture-result__cover", {
718
- isPicture: _ctx.pictureFileTypes.includes(item.type)
719
- }])
720
- }, [
721
- !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (openBlock(), createElementBlock("div", {
722
- key: 0,
723
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
724
- onClick: ($event) => _ctx.viewOnePicture(item)
725
- }, null, 8, _hoisted_9)) : createCommentVNode("v-if", true),
726
- !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (openBlock(), createElementBlock("div", {
699
+ }, null, 8, _hoisted_4)) : [
700
+ "xlsx",
701
+ "XLSX",
702
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
703
+ ].includes(item.type) ? (openBlock(), createElementBlock("img", {
727
704
  key: 1,
705
+ class: "bm-upload__picture-result__image",
706
+ src: $setup.icons.excel,
707
+ alt: "\u56FE\u7247"
708
+ }, null, 8, _hoisted_5)) : [
709
+ "ppt",
710
+ "PPT",
711
+ "application/vnd.ms-powerpoint",
712
+ "pptx",
713
+ "PPTX",
714
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
715
+ ].includes(item.type) ? (openBlock(), createElementBlock("img", {
716
+ key: 2,
717
+ class: "bm-upload__picture-result__image",
718
+ src: $setup.icons.ppt,
719
+ alt: "\u56FE\u7247"
720
+ }, null, 8, _hoisted_6)) : [
721
+ "doc",
722
+ "DOC",
723
+ "application/msword",
724
+ "docx",
725
+ "DOCX",
726
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
727
+ ].includes(item.type) ? (openBlock(), createElementBlock("img", {
728
+ key: 3,
729
+ class: "bm-upload__picture-result__image",
730
+ src: $setup.icons.doc,
731
+ alt: "\u56FE\u7247"
732
+ }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
733
+ item.url ? (openBlock(), createBlock(_component_a_image, {
734
+ key: 0,
735
+ class: "bm-upload__picture-result__image",
736
+ src: item.url,
737
+ alt: "\u56FE\u7247"
738
+ }, null, 8, ["src"])) : (openBlock(), createBlock(_component_LoadingOutlined, { key: 1 }))
739
+ ], 64)) : (openBlock(), createElementBlock("img", {
740
+ key: 5,
741
+ class: "bm-upload__picture-result__image",
742
+ src: $setup.icons.others,
743
+ alt: "\u56FE\u7247"
744
+ }, null, 8, _hoisted_8)),
745
+ _ctx.onepViewImageHover[item.uid] ? (openBlock(), createElementBlock("div", {
746
+ key: 6,
747
+ class: normalizeClass(["bm-upload__picture-result__cover", {
748
+ isPicture: _ctx.pictureFileTypes.includes(item.type)
749
+ }])
750
+ }, [
751
+ !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (openBlock(), createElementBlock("div", {
752
+ key: 0,
753
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
754
+ onClick: ($event) => _ctx.viewOnePicture(item)
755
+ }, null, 8, _hoisted_9)) : createCommentVNode("v-if", true),
756
+ !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (openBlock(), createElementBlock("div", {
757
+ key: 1,
758
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
759
+ onClick: ($event) => _ctx.deleteFile(item.uid)
760
+ }, null, 8, _hoisted_10)) : createCommentVNode("v-if", true)
761
+ ], 2)) : createCommentVNode("v-if", true)
762
+ ], 40, _hoisted_3)) : renderSlot(_ctx.$slots, "file", {
763
+ key: 1,
764
+ file: item
765
+ })
766
+ ], 64)) : createCommentVNode("v-if", true),
767
+ createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
768
+ item.status === "error" ? (openBlock(), createElementBlock("div", {
769
+ key: 2,
770
+ class: "bm-upload__picture-error",
771
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
772
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
773
+ onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
774
+ }, [
775
+ _hoisted_12,
776
+ _hoisted_13,
777
+ _ctx.onepViewImageHover[item.uid] ? (openBlock(), createElementBlock("div", _hoisted_14, [
778
+ createElementVNode("div", {
779
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
780
+ onClick: (e) => _ctx.reUpload(e, item.uid)
781
+ }, null, 8, _hoisted_15),
782
+ createElementVNode("div", {
728
783
  class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
729
784
  onClick: ($event) => _ctx.deleteFile(item.uid)
730
- }, null, 8, _hoisted_10)) : createCommentVNode("v-if", true)
731
- ], 2)) : createCommentVNode("v-if", true)
732
- ], 40, _hoisted_3)) : renderSlot(_ctx.$slots, "file", {
733
- key: 1,
734
- file: item
735
- })
736
- ], 64)) : createCommentVNode("v-if", true),
737
- createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
738
- item.status === "error" ? (openBlock(), createElementBlock("div", {
739
- key: 2,
740
- class: "bm-upload__picture-error",
741
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
742
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
743
- onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
744
- }, [
745
- _hoisted_12,
746
- _hoisted_13,
747
- _ctx.onepViewImageHover[item.uid] ? (openBlock(), createElementBlock("div", _hoisted_14, [
748
- createElementVNode("div", {
749
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
750
- onClick: (e) => _ctx.reUpload(e, item.uid)
751
- }, null, 8, _hoisted_15),
752
- createElementVNode("div", {
753
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
754
- onClick: ($event) => _ctx.deleteFile(item.uid)
755
- }, null, 8, _hoisted_16)
756
- ])) : createCommentVNode("v-if", true)
757
- ], 40, _hoisted_11)) : createCommentVNode("v-if", true)
758
- ], 2);
785
+ }, null, 8, _hoisted_16)
786
+ ])) : createCommentVNode("v-if", true)
787
+ ], 40, _hoisted_11)) : createCommentVNode("v-if", true)
788
+ ], 2),
789
+ createCommentVNode(" \u6587\u4EF6\u540D "),
790
+ _ctx.extraConfigs.showFileName && item.name ? (openBlock(), createElementBlock("div", _hoisted_17, [
791
+ createVNode(_component_OverTooltips, {
792
+ title: item.name
793
+ }, null, 8, ["title"])
794
+ ])) : createCommentVNode("v-if", true)
795
+ ]);
759
796
  }), 128)),
760
797
  createCommentVNode(" </a-image-preview-group> ")
761
798
  ], 64)) : createCommentVNode("v-if", true),
762
- !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (openBlock(), createBlock(_component_a_upload, mergeProps({ key: 1 }, _ctx.uploadConfigs, {
763
- disabled: $setup.uploadDisabled,
764
- class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
765
- onReject: _ctx.handleReject
766
- }), {
767
- default: withCtx(() => [
768
- _ctx.extraConfigs.myBtn ? renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
769
- _ctx.uploadConfigs.listType === "picture-card" ? (openBlock(), createElementBlock("div", _hoisted_17, [
770
- createVNode(_component_PlusOutlined),
771
- createElementVNode("div", _hoisted_18, toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
772
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_19, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
773
- ])) : _ctx.uploadConfigs.listType === "text" ? (openBlock(), createElementBlock("div", _hoisted_20, [
774
- createVNode(_component_a_button, {
775
- class: normalizeClass(_ctx.extraConfigs.btnClass),
776
- disabled: $setup.uploadDisabled
777
- }, {
778
- default: withCtx(() => [
779
- createVNode(_component_UploadOutlined),
780
- createTextVNode(" " + toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
781
- ]),
782
- _: 1
783
- }, 8, ["class", "disabled"]),
784
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_21, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
785
- ])) : createCommentVNode("v-if", true)
786
- ], 64))
787
- ]),
788
- _: 3
789
- }, 16, ["disabled", "class", "onReject"])) : createCommentVNode("v-if", true),
790
- _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock("div", _hoisted_22, [
799
+ !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (openBlock(), createElementBlock("div", _hoisted_18, [
800
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.extraConfigs.drag ? "a-upload-dragger" : "a-upload"), mergeProps(_ctx.uploadConfigs, {
801
+ disabled: $setup.uploadDisabled,
802
+ class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
803
+ onReject: _ctx.handleReject
804
+ }), {
805
+ default: withCtx(() => [
806
+ _ctx.extraConfigs.myBtn ? renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
807
+ _ctx.extraConfigs.drag ? (openBlock(), createElementBlock("div", _hoisted_19, [
808
+ createVNode(_component_InboxOutlined, { class: "bm-upload__drag-icon" }),
809
+ createElementVNode("div", _hoisted_20, toDisplayString(_ctx.uploadConfigs.text || "\u70B9\u51FB\u4E0A\u4F20/\u62D6\u62FD\u4E0A\u4F20"), 1),
810
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_21, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
811
+ ])) : _ctx.uploadConfigs.listType === "picture-card" ? (openBlock(), createElementBlock("div", _hoisted_22, [
812
+ createVNode(_component_PlusOutlined),
813
+ createElementVNode("div", _hoisted_23, toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
814
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_24, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
815
+ ])) : _ctx.uploadConfigs.listType === "text" ? (openBlock(), createElementBlock("div", _hoisted_25, [
816
+ createVNode(_component_a_button, {
817
+ class: normalizeClass(_ctx.extraConfigs.btnClass),
818
+ disabled: $setup.uploadDisabled
819
+ }, {
820
+ default: withCtx(() => [
821
+ createVNode(_component_UploadOutlined),
822
+ createTextVNode(" " + toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
823
+ ]),
824
+ _: 1
825
+ }, 8, ["class", "disabled"]),
826
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
827
+ ])) : createCommentVNode("v-if", true)
828
+ ], 64))
829
+ ]),
830
+ _: 3
831
+ }, 16, ["disabled", "class", "onReject"]))
832
+ ])) : createCommentVNode("v-if", true),
833
+ _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock("div", _hoisted_27, [
791
834
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item) => {
792
835
  return openBlock(), createElementBlock("div", {
793
836
  key: item,
794
837
  class: "bm-upload__file"
795
838
  }, [
796
839
  !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
797
- createElementVNode("div", _hoisted_23, [
798
- _hoisted_24,
799
- createElementVNode("div", _hoisted_25, [
840
+ createElementVNode("div", _hoisted_28, [
841
+ _hoisted_29,
842
+ createElementVNode("div", _hoisted_30, [
800
843
  createVNode(_component_OverTooltips, {
801
844
  title: item.name
802
845
  }, null, 8, ["title"])
803
846
  ]),
804
- createElementVNode("div", _hoisted_26, [
847
+ createElementVNode("div", _hoisted_31, [
805
848
  item.status === "error" ? (openBlock(), createElementBlock("div", {
806
849
  key: 0,
807
850
  class: "bm-upload__error-reload",
808
851
  onClick: (e) => _ctx.reUpload(e, item.uid)
809
- }, null, 8, _hoisted_27)) : createCommentVNode("v-if", true),
852
+ }, null, 8, _hoisted_32)) : createCommentVNode("v-if", true),
810
853
  createElementVNode("div", {
811
854
  class: "bm-upload__trash",
812
855
  onClick: ($event) => _ctx.deleteFile(item.uid)
813
- }, null, 8, _hoisted_28)
856
+ }, null, 8, _hoisted_33)
814
857
  ])
815
858
  ]),
816
- !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_29, [
859
+ !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_34, [
817
860
  createVNode(_component_a_progress, {
818
861
  type: "line",
819
862
  "stroke-width": 2,
@@ -836,18 +879,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
836
879
  onCancel: _ctx.handleClosePictureView
837
880
  }, {
838
881
  default: withCtx(() => [
839
- createElementVNode("div", _hoisted_30, [
882
+ createElementVNode("div", _hoisted_35, [
840
883
  _ctx.pictureFileTypes.includes(_ctx.onepViewImage.type) ? (openBlock(), createElementBlock("img", {
841
884
  key: 0,
842
885
  style: { "width": "100%" },
843
886
  src: _ctx.onepViewImage.url,
844
887
  alt: ""
845
- }, null, 8, _hoisted_31)) : (openBlock(), createElementBlock("iframe", {
888
+ }, null, 8, _hoisted_36)) : (openBlock(), createElementBlock("iframe", {
846
889
  key: 1,
847
890
  title: _ctx.onepViewImage.type,
848
891
  style: { "width": "100%", "min-height": "600px" },
849
892
  src: _ctx.onepViewImage.url
850
- }, null, 8, _hoisted_32))
893
+ }, null, 8, _hoisted_37))
851
894
  ])
852
895
  ]),
853
896
  _: 1
@@ -0,0 +1,50 @@
1
+ export interface UploadPropsInner {
2
+ multiple?: boolean;
3
+ showUploadList?: boolean;
4
+ showSlotList?: boolean;
5
+ listType?: 'text' | 'picture-card';
6
+ text?: string;
7
+ accept?: string;
8
+ data?: Record<string, any>;
9
+ name?: string;
10
+ disabled?: boolean;
11
+ }
12
+ export interface ExtraProps {
13
+ maxSize?: number;
14
+ maxCount?: number;
15
+ isAllowDownloadFieldProps?: boolean;
16
+ hideDisabledBtn?: boolean;
17
+ tips?: string;
18
+ showTips?: boolean;
19
+ btnClass?: string;
20
+ picClass?: string;
21
+ alignCenter?: boolean;
22
+ canNotViewAccept?: string;
23
+ myBtn?: boolean;
24
+ showFileName?: boolean;
25
+ drag?: boolean;
26
+ }
27
+ export declare type DefaultList = Array<{
28
+ uid?: string;
29
+ name?: string;
30
+ url?: string;
31
+ type?: string;
32
+ }>;
33
+ export declare type UploadRequest = (file: File, config: Record<string, any>) => Promise<{
34
+ url?: string;
35
+ [prop: string]: any;
36
+ }>;
37
+ export interface CustomErrors {
38
+ maxSize?: string;
39
+ maxCount?: string;
40
+ format?: string;
41
+ }
42
+ export declare type UploadProps = {
43
+ uploadProps: UploadPropsInner;
44
+ extraProps: ExtraProps;
45
+ defaultList: DefaultList;
46
+ uploadRequest: UploadRequest;
47
+ cloudReadUrl: string;
48
+ holdProgress: number;
49
+ customErrors: CustomErrors;
50
+ };
@@ -1,41 +1,72 @@
1
+ import type { PropType } from 'vue';
1
2
  declare const _default: {
2
3
  name: string;
3
4
  components: {
4
5
  PlusOutlined: import("@ant-design/icons-vue/lib/icons/PlusOutlined").PlusOutlinedIconType;
5
- OverTooltips: any;
6
+ OverTooltips: import("../../../utils/with-install").SFCWithInstall<{
7
+ name: string;
8
+ props: {
9
+ title: {
10
+ type: StringConstructor;
11
+ default: undefined;
12
+ };
13
+ labelTitle: {
14
+ type: StringConstructor;
15
+ default: undefined;
16
+ };
17
+ line: {
18
+ type: NumberConstructor;
19
+ default: number;
20
+ };
21
+ width: {
22
+ type: (NumberConstructor | StringConstructor)[];
23
+ default: number;
24
+ };
25
+ showAlways: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ };
30
+ setup(props: any, context: any): {
31
+ mySelf: import("vue").Ref<any>;
32
+ handleVisibleChange: (val: any) => void;
33
+ getPopupContainer: () => HTMLElement;
34
+ mSlots: import("vue").Ref<{}>;
35
+ isShow: import("vue").Ref<boolean>;
36
+ openShow: import("vue").Ref<boolean>;
37
+ };
38
+ }>;
6
39
  UploadOutlined: import("@ant-design/icons-vue/lib/icons/UploadOutlined").UploadOutlinedIconType;
7
40
  LoadingOutlined: import("@ant-design/icons-vue/lib/icons/LoadingOutlined").LoadingOutlinedIconType;
41
+ InboxOutlined: import("@ant-design/icons-vue/lib/icons/InboxOutlined").InboxOutlinedIconType;
8
42
  };
9
43
  props: {
10
44
  uploadProps: {
11
- type: ObjectConstructor;
45
+ type: PropType<import("./props").UploadPropsInner>;
12
46
  default: () => {};
13
47
  };
14
48
  extraProps: {
15
- type: ObjectConstructor;
49
+ type: PropType<import("./props").ExtraProps>;
16
50
  default: () => {};
17
51
  };
18
52
  defaultList: {
19
- type: ArrayConstructor;
53
+ type: PropType<import("./props").DefaultList>;
20
54
  default: () => never[];
21
55
  };
22
56
  uploadRequest: {
23
- type: (file: File, config: Record<string, any>) => Promise<{
24
- [prop: string]: any;
25
- url: string;
26
- }>;
57
+ type: PropType<import("./props").UploadRequest>;
27
58
  default(): () => void;
28
59
  };
29
60
  cloudReadUrl: {
30
- type: StringConstructor;
61
+ type: PropType<string>;
31
62
  default: string;
32
63
  };
33
64
  holdProgress: {
34
- type: NumberConstructor;
65
+ type: PropType<number>;
35
66
  default: number;
36
67
  };
37
68
  customErrors: {
38
- type: ObjectConstructor;
69
+ type: PropType<import("./props").CustomErrors>;
39
70
  default(): undefined;
40
71
  };
41
72
  };
@@ -82,6 +113,8 @@ declare const _default: {
82
113
  alignCenter: boolean;
83
114
  canNotViewAccept: string;
84
115
  myBtn: boolean;
116
+ showFileName: boolean;
117
+ drag: boolean;
85
118
  }>;
86
119
  uploadConfigs: import("vue").Ref<{
87
120
  multiple: boolean;
@@ -1 +1,7 @@
1
- export declare const withInstall: (comp: any) => any;
1
+ import type { Plugin, Component } from 'vue';
2
+ declare type MyComponent = Component & {
3
+ name: string;
4
+ };
5
+ export declare type SFCWithInstall<T> = T & Plugin;
6
+ export declare const withInstall: <T extends MyComponent>(comp: T) => SFCWithInstall<T>;
7
+ export {};