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
@@ -172,7 +172,13 @@ var icons = {
172
172
  const CLOUND_PRE = "/cloudStorage/read";
173
173
  const _sfc_main = {
174
174
  name: "BmUpload",
175
- components: { PlusOutlined: iconsVue.PlusOutlined, OverTooltips, UploadOutlined: iconsVue.UploadOutlined, LoadingOutlined: iconsVue.LoadingOutlined },
175
+ components: {
176
+ PlusOutlined: iconsVue.PlusOutlined,
177
+ OverTooltips,
178
+ UploadOutlined: iconsVue.UploadOutlined,
179
+ LoadingOutlined: iconsVue.LoadingOutlined,
180
+ InboxOutlined: iconsVue.InboxOutlined
181
+ },
176
182
  props: {
177
183
  uploadProps: {
178
184
  type: Object,
@@ -270,7 +276,9 @@ const _sfc_main = {
270
276
  picClass: "",
271
277
  alignCenter: false,
272
278
  canNotViewAccept: ".rar,.zip",
273
- myBtn: false
279
+ myBtn: false,
280
+ showFileName: false,
281
+ drag: false
274
282
  },
275
283
  uploadConfigs: {
276
284
  multiple: false,
@@ -314,6 +322,9 @@ const _sfc_main = {
314
322
  status: ""
315
323
  };
316
324
  setTimeout(function() {
325
+ if (methods.fileIsDelete(file)) {
326
+ return;
327
+ }
317
328
  state.fileList[file.uid].isDoneDeloy = true;
318
329
  }, 1e3);
319
330
  methods.customUploadRequest(file);
@@ -590,50 +601,66 @@ const _hoisted_15 = ["onClick"];
590
601
  const _hoisted_16 = ["onClick"];
591
602
  const _hoisted_17 = {
592
603
  key: 0,
604
+ class: "bm-upload__picture__name"
605
+ };
606
+ const _hoisted_18 = {
607
+ key: 1,
608
+ class: "bm-upload__button__wrapper"
609
+ };
610
+ const _hoisted_19 = { key: 0 };
611
+ const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
612
+ const _hoisted_21 = {
613
+ key: 0,
614
+ class: "bm-upload__tips"
615
+ };
616
+ const _hoisted_22 = {
617
+ key: 1,
593
618
  style: { "font-size": "24px", "color": "#9393a3" }
594
619
  };
595
- const _hoisted_18 = { class: "ant-upload-text bm-upload__text" };
596
- const _hoisted_19 = {
620
+ const _hoisted_23 = { class: "ant-upload-text bm-upload__text" };
621
+ const _hoisted_24 = {
597
622
  key: 0,
598
623
  class: "bm-upload__tips"
599
624
  };
600
- const _hoisted_20 = { key: 1 };
601
- const _hoisted_21 = {
625
+ const _hoisted_25 = { key: 2 };
626
+ const _hoisted_26 = {
602
627
  key: 0,
603
628
  class: "bm-upload__tips"
604
629
  };
605
- const _hoisted_22 = {
630
+ const _hoisted_27 = {
606
631
  key: 2,
607
632
  class: "bm-upload__file-list"
608
633
  };
609
- const _hoisted_23 = { class: "bm-upload__file__detail" };
610
- const _hoisted_24 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
634
+ const _hoisted_28 = { class: "bm-upload__file__detail" };
635
+ const _hoisted_29 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
611
636
  /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__attachment" })
612
637
  ], -1);
613
- const _hoisted_25 = { class: "bm-upload__file__name" };
614
- const _hoisted_26 = { class: "bm-upload__file__progress-tools" };
615
- const _hoisted_27 = ["onClick"];
616
- const _hoisted_28 = ["onClick"];
617
- const _hoisted_29 = {
638
+ const _hoisted_30 = { class: "bm-upload__file__name" };
639
+ const _hoisted_31 = { class: "bm-upload__file__progress-tools" };
640
+ const _hoisted_32 = ["onClick"];
641
+ const _hoisted_33 = ["onClick"];
642
+ const _hoisted_34 = {
618
643
  key: 0,
619
644
  class: "bm-upload__progress"
620
645
  };
621
- const _hoisted_30 = { style: { "padding-top": "20px" } };
622
- const _hoisted_31 = ["src"];
623
- const _hoisted_32 = ["title", "src"];
646
+ const _hoisted_35 = { style: { "padding-top": "20px" } };
647
+ const _hoisted_36 = ["src"];
648
+ const _hoisted_37 = ["title", "src"];
624
649
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
625
650
  const _component_a_progress = vue.resolveComponent("a-progress");
626
651
  const _component_a_image = vue.resolveComponent("a-image");
627
652
  const _component_LoadingOutlined = vue.resolveComponent("LoadingOutlined");
653
+ const _component_OverTooltips = vue.resolveComponent("OverTooltips");
654
+ const _component_InboxOutlined = vue.resolveComponent("InboxOutlined");
628
655
  const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
629
656
  const _component_UploadOutlined = vue.resolveComponent("UploadOutlined");
630
657
  const _component_a_button = vue.resolveComponent("a-button");
631
- const _component_a_upload = vue.resolveComponent("a-upload");
632
- const _component_OverTooltips = vue.resolveComponent("OverTooltips");
633
658
  const _component_a_modal = vue.resolveComponent("a-modal");
634
659
  return vue.openBlock(), vue.createElementBlock("div", {
635
660
  class: vue.normalizeClass(["bm-upload", {
636
661
  "bm-upload--text": _ctx.uploadConfigs.listType === "text",
662
+ "bm-upload--drag": _ctx.extraConfigs.drag,
663
+ "bm-upload--picture-card": _ctx.uploadConfigs.listType === "picture-card",
637
664
  "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
638
665
  }])
639
666
  }, [
@@ -643,181 +670,197 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
643
670
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
644
671
  return vue.openBlock(), vue.createElementBlock("div", {
645
672
  key: item,
646
- class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
673
+ class: "bm-upload__picture_wrapper"
647
674
  }, [
648
- vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
649
- item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
650
- _hoisted_2,
651
- vue.createVNode(_component_a_progress, {
652
- type: "line",
653
- "stroke-width": 2,
654
- "show-info": false,
655
- "stroke-color": _ctx.uploadBarColor,
656
- percent: item.uid?.progress
657
- }, null, 8, ["stroke-color", "percent"])
658
- ])) : vue.createCommentVNode("v-if", true),
659
- vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
660
- item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
661
- !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
662
- key: 0,
663
- class: "bm-upload__picture-result",
664
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
665
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
666
- onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
667
- }, [
668
- ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
675
+ vue.createElementVNode("div", {
676
+ class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
677
+ }, [
678
+ vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
679
+ item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
680
+ _hoisted_2,
681
+ vue.createVNode(_component_a_progress, {
682
+ type: "line",
683
+ "stroke-width": 2,
684
+ "show-info": false,
685
+ "stroke-color": _ctx.uploadBarColor,
686
+ percent: item.uid?.progress
687
+ }, null, 8, ["stroke-color", "percent"])
688
+ ])) : vue.createCommentVNode("v-if", true),
689
+ vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
690
+ item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
691
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
669
692
  key: 0,
670
- class: "bm-upload__picture-result__image",
671
- src: $setup.icons.pdf,
672
- alt: "\u56FE\u7247"
673
- }, null, 8, _hoisted_4)) : [
674
- "xlsx",
675
- "XLSX",
676
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
677
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
678
- key: 1,
679
- class: "bm-upload__picture-result__image",
680
- src: $setup.icons.excel,
681
- alt: "\u56FE\u7247"
682
- }, null, 8, _hoisted_5)) : [
683
- "ppt",
684
- "PPT",
685
- "application/vnd.ms-powerpoint",
686
- "pptx",
687
- "PPTX",
688
- "application/vnd.openxmlformats-officedocument.presentationml.presentation"
689
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
690
- key: 2,
691
- class: "bm-upload__picture-result__image",
692
- src: $setup.icons.ppt,
693
- alt: "\u56FE\u7247"
694
- }, null, 8, _hoisted_6)) : [
695
- "doc",
696
- "DOC",
697
- "application/msword",
698
- "docx",
699
- "DOCX",
700
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
701
- ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
702
- key: 3,
703
- class: "bm-upload__picture-result__image",
704
- src: $setup.icons.doc,
705
- alt: "\u56FE\u7247"
706
- }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 4 }, [
707
- item.url ? (vue.openBlock(), vue.createBlock(_component_a_image, {
693
+ class: "bm-upload__picture-result",
694
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
695
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
696
+ onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
697
+ }, [
698
+ ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
708
699
  key: 0,
709
700
  class: "bm-upload__picture-result__image",
710
- src: item.url,
701
+ src: $setup.icons.pdf,
711
702
  alt: "\u56FE\u7247"
712
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_LoadingOutlined, { key: 1 }))
713
- ], 64)) : (vue.openBlock(), vue.createElementBlock("img", {
714
- key: 5,
715
- class: "bm-upload__picture-result__image",
716
- src: $setup.icons.others,
717
- alt: "\u56FE\u7247"
718
- }, null, 8, _hoisted_8)),
719
- _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", {
720
- key: 6,
721
- class: vue.normalizeClass(["bm-upload__picture-result__cover", {
722
- isPicture: _ctx.pictureFileTypes.includes(item.type)
723
- }])
724
- }, [
725
- !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
726
- key: 0,
727
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
728
- onClick: ($event) => _ctx.viewOnePicture(item)
729
- }, null, 8, _hoisted_9)) : vue.createCommentVNode("v-if", true),
730
- !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
703
+ }, null, 8, _hoisted_4)) : [
704
+ "xlsx",
705
+ "XLSX",
706
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
707
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
731
708
  key: 1,
709
+ class: "bm-upload__picture-result__image",
710
+ src: $setup.icons.excel,
711
+ alt: "\u56FE\u7247"
712
+ }, null, 8, _hoisted_5)) : [
713
+ "ppt",
714
+ "PPT",
715
+ "application/vnd.ms-powerpoint",
716
+ "pptx",
717
+ "PPTX",
718
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
719
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
720
+ key: 2,
721
+ class: "bm-upload__picture-result__image",
722
+ src: $setup.icons.ppt,
723
+ alt: "\u56FE\u7247"
724
+ }, null, 8, _hoisted_6)) : [
725
+ "doc",
726
+ "DOC",
727
+ "application/msword",
728
+ "docx",
729
+ "DOCX",
730
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
731
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
732
+ key: 3,
733
+ class: "bm-upload__picture-result__image",
734
+ src: $setup.icons.doc,
735
+ alt: "\u56FE\u7247"
736
+ }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 4 }, [
737
+ item.url ? (vue.openBlock(), vue.createBlock(_component_a_image, {
738
+ key: 0,
739
+ class: "bm-upload__picture-result__image",
740
+ src: item.url,
741
+ alt: "\u56FE\u7247"
742
+ }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_LoadingOutlined, { key: 1 }))
743
+ ], 64)) : (vue.openBlock(), vue.createElementBlock("img", {
744
+ key: 5,
745
+ class: "bm-upload__picture-result__image",
746
+ src: $setup.icons.others,
747
+ alt: "\u56FE\u7247"
748
+ }, null, 8, _hoisted_8)),
749
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", {
750
+ key: 6,
751
+ class: vue.normalizeClass(["bm-upload__picture-result__cover", {
752
+ isPicture: _ctx.pictureFileTypes.includes(item.type)
753
+ }])
754
+ }, [
755
+ !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
756
+ key: 0,
757
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
758
+ onClick: ($event) => _ctx.viewOnePicture(item)
759
+ }, null, 8, _hoisted_9)) : vue.createCommentVNode("v-if", true),
760
+ !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
761
+ key: 1,
762
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
763
+ onClick: ($event) => _ctx.deleteFile(item.uid)
764
+ }, null, 8, _hoisted_10)) : vue.createCommentVNode("v-if", true)
765
+ ], 2)) : vue.createCommentVNode("v-if", true)
766
+ ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
767
+ key: 1,
768
+ file: item
769
+ })
770
+ ], 64)) : vue.createCommentVNode("v-if", true),
771
+ vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
772
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
773
+ key: 2,
774
+ class: "bm-upload__picture-error",
775
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
776
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
777
+ onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
778
+ }, [
779
+ _hoisted_12,
780
+ _hoisted_13,
781
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
782
+ vue.createElementVNode("div", {
783
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
784
+ onClick: (e) => _ctx.reUpload(e, item.uid)
785
+ }, null, 8, _hoisted_15),
786
+ vue.createElementVNode("div", {
732
787
  class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
733
788
  onClick: ($event) => _ctx.deleteFile(item.uid)
734
- }, null, 8, _hoisted_10)) : vue.createCommentVNode("v-if", true)
735
- ], 2)) : vue.createCommentVNode("v-if", true)
736
- ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
737
- key: 1,
738
- file: item
739
- })
740
- ], 64)) : vue.createCommentVNode("v-if", true),
741
- vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
742
- item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
743
- key: 2,
744
- class: "bm-upload__picture-error",
745
- onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
746
- onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
747
- onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
748
- }, [
749
- _hoisted_12,
750
- _hoisted_13,
751
- _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
752
- vue.createElementVNode("div", {
753
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
754
- onClick: (e) => _ctx.reUpload(e, item.uid)
755
- }, null, 8, _hoisted_15),
756
- vue.createElementVNode("div", {
757
- class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
758
- onClick: ($event) => _ctx.deleteFile(item.uid)
759
- }, null, 8, _hoisted_16)
760
- ])) : vue.createCommentVNode("v-if", true)
761
- ], 40, _hoisted_11)) : vue.createCommentVNode("v-if", true)
762
- ], 2);
789
+ }, null, 8, _hoisted_16)
790
+ ])) : vue.createCommentVNode("v-if", true)
791
+ ], 40, _hoisted_11)) : vue.createCommentVNode("v-if", true)
792
+ ], 2),
793
+ vue.createCommentVNode(" \u6587\u4EF6\u540D "),
794
+ _ctx.extraConfigs.showFileName && item.name ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
795
+ vue.createVNode(_component_OverTooltips, {
796
+ title: item.name
797
+ }, null, 8, ["title"])
798
+ ])) : vue.createCommentVNode("v-if", true)
799
+ ]);
763
800
  }), 128)),
764
801
  vue.createCommentVNode(" </a-image-preview-group> ")
765
802
  ], 64)) : vue.createCommentVNode("v-if", true),
766
- !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (vue.openBlock(), vue.createBlock(_component_a_upload, vue.mergeProps({ key: 1 }, _ctx.uploadConfigs, {
767
- disabled: $setup.uploadDisabled,
768
- class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
769
- onReject: _ctx.handleReject
770
- }), {
771
- default: vue.withCtx(() => [
772
- _ctx.extraConfigs.myBtn ? vue.renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
773
- _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
774
- vue.createVNode(_component_PlusOutlined),
775
- vue.createElementVNode("div", _hoisted_18, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
776
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
777
- ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
778
- vue.createVNode(_component_a_button, {
779
- class: vue.normalizeClass(_ctx.extraConfigs.btnClass),
780
- disabled: $setup.uploadDisabled
781
- }, {
782
- default: vue.withCtx(() => [
783
- vue.createVNode(_component_UploadOutlined),
784
- vue.createTextVNode(" " + vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
785
- ]),
786
- _: 1
787
- }, 8, ["class", "disabled"]),
788
- _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
789
- ])) : vue.createCommentVNode("v-if", true)
790
- ], 64))
791
- ]),
792
- _: 3
793
- }, 16, ["disabled", "class", "onReject"])) : vue.createCommentVNode("v-if", true),
794
- _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
803
+ !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
804
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.extraConfigs.drag ? "a-upload-dragger" : "a-upload"), vue.mergeProps(_ctx.uploadConfigs, {
805
+ disabled: $setup.uploadDisabled,
806
+ class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
807
+ onReject: _ctx.handleReject
808
+ }), {
809
+ default: vue.withCtx(() => [
810
+ _ctx.extraConfigs.myBtn ? vue.renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
811
+ _ctx.extraConfigs.drag ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
812
+ vue.createVNode(_component_InboxOutlined, { class: "bm-upload__drag-icon" }),
813
+ vue.createElementVNode("div", _hoisted_20, vue.toDisplayString(_ctx.uploadConfigs.text || "\u70B9\u51FB\u4E0A\u4F20/\u62D6\u62FD\u4E0A\u4F20"), 1),
814
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
815
+ ])) : _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
816
+ vue.createVNode(_component_PlusOutlined),
817
+ vue.createElementVNode("div", _hoisted_23, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
818
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
819
+ ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25, [
820
+ vue.createVNode(_component_a_button, {
821
+ class: vue.normalizeClass(_ctx.extraConfigs.btnClass),
822
+ disabled: $setup.uploadDisabled
823
+ }, {
824
+ default: vue.withCtx(() => [
825
+ vue.createVNode(_component_UploadOutlined),
826
+ vue.createTextVNode(" " + vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
827
+ ]),
828
+ _: 1
829
+ }, 8, ["class", "disabled"]),
830
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
831
+ ])) : vue.createCommentVNode("v-if", true)
832
+ ], 64))
833
+ ]),
834
+ _: 3
835
+ }, 16, ["disabled", "class", "onReject"]))
836
+ ])) : vue.createCommentVNode("v-if", true),
837
+ _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
795
838
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
796
839
  return vue.openBlock(), vue.createElementBlock("div", {
797
840
  key: item,
798
841
  class: "bm-upload__file"
799
842
  }, [
800
843
  !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
801
- vue.createElementVNode("div", _hoisted_23, [
802
- _hoisted_24,
803
- vue.createElementVNode("div", _hoisted_25, [
844
+ vue.createElementVNode("div", _hoisted_28, [
845
+ _hoisted_29,
846
+ vue.createElementVNode("div", _hoisted_30, [
804
847
  vue.createVNode(_component_OverTooltips, {
805
848
  title: item.name
806
849
  }, null, 8, ["title"])
807
850
  ]),
808
- vue.createElementVNode("div", _hoisted_26, [
851
+ vue.createElementVNode("div", _hoisted_31, [
809
852
  item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
810
853
  key: 0,
811
854
  class: "bm-upload__error-reload",
812
855
  onClick: (e) => _ctx.reUpload(e, item.uid)
813
- }, null, 8, _hoisted_27)) : vue.createCommentVNode("v-if", true),
856
+ }, null, 8, _hoisted_32)) : vue.createCommentVNode("v-if", true),
814
857
  vue.createElementVNode("div", {
815
858
  class: "bm-upload__trash",
816
859
  onClick: ($event) => _ctx.deleteFile(item.uid)
817
- }, null, 8, _hoisted_28)
860
+ }, null, 8, _hoisted_33)
818
861
  ])
819
862
  ]),
820
- !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
863
+ !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_34, [
821
864
  vue.createVNode(_component_a_progress, {
822
865
  type: "line",
823
866
  "stroke-width": 2,
@@ -840,18 +883,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
840
883
  onCancel: _ctx.handleClosePictureView
841
884
  }, {
842
885
  default: vue.withCtx(() => [
843
- vue.createElementVNode("div", _hoisted_30, [
886
+ vue.createElementVNode("div", _hoisted_35, [
844
887
  _ctx.pictureFileTypes.includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
845
888
  key: 0,
846
889
  style: { "width": "100%" },
847
890
  src: _ctx.onepViewImage.url,
848
891
  alt: ""
849
- }, null, 8, _hoisted_31)) : (vue.openBlock(), vue.createElementBlock("iframe", {
892
+ }, null, 8, _hoisted_36)) : (vue.openBlock(), vue.createElementBlock("iframe", {
850
893
  key: 1,
851
894
  title: _ctx.onepViewImage.type,
852
895
  style: { "width": "100%", "min-height": "600px" },
853
896
  src: _ctx.onepViewImage.url
854
- }, null, 8, _hoisted_32))
897
+ }, null, 8, _hoisted_37))
855
898
  ])
856
899
  ]),
857
900
  _: 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 {};
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withInstall = void 0;
4
4
  const withInstall = (comp) => {
5
+ ;
5
6
  comp.install = function (app) {
6
7
  app.component(comp.name, comp);
7
8
  };