@cmstops/pro-compo 0.3.44 → 0.3.46

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 (259) hide show
  1. package/dist/index.css +23 -15
  2. package/dist/index.min.css +1 -1
  3. package/es/appCenter/component.js +30 -1
  4. package/es/appCenter/script/api.js +8 -1
  5. package/es/appCenter/style/index.css +17 -14
  6. package/es/appCenter/style/index.less +33 -15
  7. package/es/docHistory/component.js +1 -0
  8. package/es/docPreview/component.js +46 -40
  9. package/es/hooks/useAttachement.js +2 -0
  10. package/es/hooks/useLocalStorage.js +31 -0
  11. package/es/hooks/useUpload.js +6 -2
  12. package/es/index.css +23 -15
  13. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +3 -3
  14. package/es/selectResourceModal/component.js +188 -43
  15. package/es/selectResourceModal/components/ListFilter/index.js +13 -1
  16. package/es/selectResourceModal/components/ListSelected/index.js +2 -0
  17. package/es/selectResourceModal/components/ListTabs/index.js +62 -0
  18. package/es/selectResourceModal/scripts/useResourceSelect.js +25 -0
  19. package/es/selectResourceModal/style/index.css +6 -1
  20. package/es/selectResourceModal/style/listSelected.less +7 -1
  21. package/es/utils/typeMap.js +1 -2
  22. package/lib/appCenter/component.js +29 -0
  23. package/lib/appCenter/script/api.js +8 -0
  24. package/lib/appCenter/style/index.css +17 -14
  25. package/lib/appCenter/style/index.less +33 -15
  26. package/lib/docHistory/component.js +1 -0
  27. package/lib/docPreview/component.js +45 -39
  28. package/lib/hooks/useAttachement.js +2 -0
  29. package/lib/hooks/useLocalStorage.js +34 -0
  30. package/lib/hooks/useUpload.js +5 -1
  31. package/lib/index.css +23 -15
  32. package/lib/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +2 -2
  33. package/lib/selectResourceModal/component.js +186 -41
  34. package/lib/selectResourceModal/components/ListFilter/index.js +13 -1
  35. package/lib/selectResourceModal/components/ListSelected/index.js +2 -0
  36. package/lib/selectResourceModal/components/ListTabs/index.js +63 -0
  37. package/lib/selectResourceModal/scripts/useResourceSelect.js +27 -0
  38. package/lib/selectResourceModal/style/index.css +6 -1
  39. package/lib/selectResourceModal/style/listSelected.less +7 -1
  40. package/lib/utils/typeMap.js +1 -2
  41. package/package.json +1 -1
  42. package/es/appCenter/component.d.ts +0 -0
  43. package/es/appCenter/index.d.ts +0 -2
  44. package/es/appCenter/script/api.d.ts +0 -10
  45. package/es/appCenter/script/apps.d.ts +0 -14
  46. package/es/appCenter/script/permissionMap.d.ts +0 -6
  47. package/es/appCenter/script/routeMap.d.ts +0 -4
  48. package/es/appCenter/style/index.d.ts +0 -1
  49. package/es/baseFilter/component.d.ts +0 -0
  50. package/es/baseFilter/components/FilterGroup.d.ts +0 -0
  51. package/es/baseFilter/components/filterItem.d.ts +0 -0
  52. package/es/baseFilter/index.d.ts +0 -2
  53. package/es/baseFilter/style/index.d.ts +0 -1
  54. package/es/baseFilter/useCalcWidth.d.ts +0 -16
  55. package/es/colorPalette/component.d.ts +0 -0
  56. package/es/colorPalette/components/colorPicker.d.ts +0 -0
  57. package/es/colorPalette/index.d.ts +0 -2
  58. package/es/colorPalette/style/index.d.ts +0 -1
  59. package/es/components.d.ts +0 -5
  60. package/es/config.d.ts +0 -4
  61. package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
  62. package/es/contentDetailList/component.d.ts +0 -0
  63. package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
  64. package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
  65. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
  66. package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
  67. package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
  68. package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
  69. package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
  70. package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
  71. package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
  72. package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
  73. package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
  74. package/es/contentDetailList/components/Content/index.d.ts +0 -0
  75. package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
  76. package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
  77. package/es/contentDetailList/components/Doc/index.d.ts +0 -0
  78. package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
  79. package/es/contentDetailList/components/Records/index.d.ts +0 -0
  80. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
  81. package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
  82. package/es/contentDetailList/index.d.ts +0 -2
  83. package/es/contentDetailList/script/api.d.ts +0 -6
  84. package/es/contentDetailList/style/index.d.ts +0 -1
  85. package/es/contentModal/component.d.ts +0 -0
  86. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  87. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  88. package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
  89. package/es/contentModal/components/ContentList/index.d.ts +0 -0
  90. package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
  91. package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
  92. package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
  93. package/es/contentModal/components/LiveList/index.d.ts +0 -0
  94. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
  95. package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
  96. package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
  97. package/es/contentModal/components/MpContentList/index.d.ts +0 -0
  98. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  99. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  100. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  101. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  102. package/es/contentModal/index.d.ts +0 -2
  103. package/es/contentModal/script/api.d.ts +0 -14
  104. package/es/contentModal/style/index.d.ts +0 -1
  105. package/es/dataTags/component.d.ts +0 -0
  106. package/es/dataTags/index.d.ts +0 -2
  107. package/es/dataTags/style/index.d.ts +0 -1
  108. package/es/docHistory/component.d.ts +0 -0
  109. package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
  110. package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
  111. package/es/docHistory/index.d.ts +0 -2
  112. package/es/docHistory/scripts/diff.d.ts +0 -1
  113. package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
  114. package/es/docHistory/style/index.d.ts +0 -1
  115. package/es/docPreview/component.d.ts +0 -0
  116. package/es/docPreview/components/PreviewIframe.d.ts +0 -0
  117. package/es/docPreview/index.d.ts +0 -2
  118. package/es/docPreview/scripts/api.d.ts +0 -1
  119. package/es/docPreview/scripts/hook.d.ts +0 -20
  120. package/es/docPreview/style/index.d.ts +0 -1
  121. package/es/editMetaInfo/component.d.ts +0 -0
  122. package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
  123. package/es/editMetaInfo/index.d.ts +0 -2
  124. package/es/editMetaInfo/script/api.d.ts +0 -6
  125. package/es/editMetaInfo/script/restaurants.d.ts +0 -4
  126. package/es/editMetaInfo/style/index.d.ts +0 -1
  127. package/es/emptyData/component.d.ts +0 -0
  128. package/es/emptyData/index.d.ts +0 -2
  129. package/es/emptyData/style/index.d.ts +0 -1
  130. package/es/emptyData/svg/add.d.ts +0 -0
  131. package/es/hooks/assets.d.ts +0 -1
  132. package/es/hooks/batch.d.ts +0 -8
  133. package/es/hooks/dialogVisible.d.ts +0 -8
  134. package/es/hooks/source.d.ts +0 -9
  135. package/es/hooks/toggle.d.ts +0 -6
  136. package/es/hooks/useAttachement.d.ts +0 -25
  137. package/es/hooks/useLocalStorage.d.ts +0 -8
  138. package/es/hooks/useMediaContext.d.ts +0 -12
  139. package/es/hooks/usePopper.d.ts +0 -8
  140. package/es/hooks/useSelection.d.ts +0 -23
  141. package/es/hooks/useUpload.d.ts +0 -16
  142. package/es/hooks/user.d.ts +0 -9
  143. package/es/imageCrop/component.d.ts +0 -0
  144. package/es/imageCrop/index.d.ts +0 -2
  145. package/es/imageCrop/script/api.d.ts +0 -1
  146. package/es/imageCrop/style/index.d.ts +0 -1
  147. package/es/index.d.ts +0 -29
  148. package/es/mediaFilter/component.d.ts +0 -0
  149. package/es/mediaFilter/components/DocFilter.d.ts +0 -0
  150. package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
  151. package/es/mediaFilter/components/FilterItem.d.ts +0 -0
  152. package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
  153. package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
  154. package/es/mediaFilter/index.d.ts +0 -3
  155. package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
  156. package/es/mediaFilter/script/types.d.ts +0 -16
  157. package/es/mediaFilter/style/index.d.ts +0 -1
  158. package/es/mediaView/component.d.ts +0 -0
  159. package/es/mediaView/index.d.ts +0 -2
  160. package/es/mediaView/style/index.d.ts +0 -1
  161. package/es/messageBox/component.d.ts +0 -0
  162. package/es/messageBox/index.d.ts +0 -2
  163. package/es/messageBox/list.d.ts +0 -0
  164. package/es/messageBox/script/api.d.ts +0 -6
  165. package/es/messageBox/style/index.d.ts +0 -1
  166. package/es/previousVersion/component.d.ts +0 -0
  167. package/es/previousVersion/index.d.ts +0 -2
  168. package/es/previousVersion/script/api.d.ts +0 -15
  169. package/es/previousVersion/script/tool.d.ts +0 -6
  170. package/es/previousVersion/style/index.d.ts +0 -1
  171. package/es/resourceGridList/component.d.ts +0 -0
  172. package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
  173. package/es/resourceGridList/index.d.ts +0 -2
  174. package/es/resourceGridList/style/index.d.ts +0 -1
  175. package/es/resourceModal/component.d.ts +0 -0
  176. package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
  177. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
  178. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
  179. package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
  180. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
  181. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
  182. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
  183. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
  184. package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
  185. package/es/resourceModal/index.d.ts +0 -2
  186. package/es/resourceModal/script/api.d.ts +0 -25
  187. package/es/resourceModal/script/mediaSelection.d.ts +0 -14
  188. package/es/resourceModal/style/index.d.ts +0 -1
  189. package/es/selectAvatarList/component.d.ts +0 -0
  190. package/es/selectAvatarList/index.d.ts +0 -2
  191. package/es/selectAvatarList/style/index.d.ts +0 -1
  192. package/es/selectGategory/component.d.ts +0 -0
  193. package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
  194. package/es/selectGategory/index.d.ts +0 -2
  195. package/es/selectGategory/script/api.d.ts +0 -6
  196. package/es/selectGategory/style/index.d.ts +0 -1
  197. package/es/selectResourceModal/component.d.ts +0 -0
  198. package/es/selectResourceModal/components/ListCardWrapper/index.d.ts +0 -0
  199. package/es/selectResourceModal/components/ListContent/index.d.ts +0 -0
  200. package/es/selectResourceModal/components/ListContentLocal/components/Upload.d.ts +0 -0
  201. package/es/selectResourceModal/components/ListContentLocal/index.d.ts +0 -0
  202. package/es/selectResourceModal/components/ListFilter/index.d.ts +0 -0
  203. package/es/selectResourceModal/components/ListFilter/scripts/api.d.ts +0 -1
  204. package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
  205. package/es/selectResourceModal/components/Main/index.d.ts +0 -0
  206. package/es/selectResourceModal/components/Main/index.js +0 -215
  207. package/es/selectResourceModal/index.d.ts +0 -2
  208. package/es/selectResourceModal/style/index.d.ts +0 -1
  209. package/es/selectThumb/component.d.ts +0 -0
  210. package/es/selectThumb/components/card.d.ts +0 -0
  211. package/es/selectThumb/components/colorPalette.d.ts +0 -0
  212. package/es/selectThumb/components/colorPicker.d.ts +0 -0
  213. package/es/selectThumb/index.d.ts +0 -2
  214. package/es/selectThumb/style/index.d.ts +0 -1
  215. package/es/thumbCard/component.d.ts +0 -0
  216. package/es/thumbCard/index.d.ts +0 -2
  217. package/es/thumbCard/style/index.d.ts +0 -1
  218. package/es/typeIcons/component.d.ts +0 -0
  219. package/es/typeIcons/index.d.ts +0 -2
  220. package/es/typeIcons/style/index.d.ts +0 -1
  221. package/es/uploadBefore/component.d.ts +0 -0
  222. package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
  223. package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
  224. package/es/uploadBefore/index.d.ts +0 -2
  225. package/es/uploadBefore/script/api.d.ts +0 -16
  226. package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
  227. package/es/uploadBefore/script/fileUpload.d.ts +0 -7
  228. package/es/uploadBefore/script/uploadHooks.d.ts +0 -55
  229. package/es/uploadBefore/style/index.d.ts +0 -1
  230. package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
  231. package/es/uploadStep/component.d.ts +0 -0
  232. package/es/uploadStep/index.d.ts +0 -2
  233. package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
  234. package/es/uploadStep/style/index.d.ts +0 -1
  235. package/es/userAvater/component.d.ts +0 -0
  236. package/es/userAvater/index.d.ts +0 -2
  237. package/es/userAvater/script/api.d.ts +0 -8
  238. package/es/userAvater/style/index.d.ts +0 -1
  239. package/es/userDirector/component.d.ts +0 -0
  240. package/es/userDirector/components/userTree.d.ts +0 -0
  241. package/es/userDirector/index.d.ts +0 -2
  242. package/es/userDirector/script/api.d.ts +0 -10
  243. package/es/userDirector/style/index.d.ts +0 -1
  244. package/es/utils/auth.d.ts +0 -5
  245. package/es/utils/date.d.ts +0 -3
  246. package/es/utils/doc.d.ts +0 -76
  247. package/es/utils/filter.d.ts +0 -9
  248. package/es/utils/index.d.ts +0 -17
  249. package/es/utils/request.d.ts +0 -9
  250. package/es/utils/transcodeMedia.d.ts +0 -13
  251. package/es/utils/tusUpload.d.ts +0 -16
  252. package/es/utils/typeMap.d.ts +0 -186
  253. package/es/utils/uploadCatalog.d.ts +0 -1
  254. package/es/videoThumb/component.d.ts +0 -0
  255. package/es/videoThumb/index.d.ts +0 -2
  256. package/es/videoThumb/scripts/api.d.ts +0 -9
  257. package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -7
  258. package/es/videoThumb/style/index.d.ts +0 -1
  259. package/lib/selectResourceModal/components/Main/index.js +0 -216
@@ -1,8 +1,32 @@
1
1
  "use strict";
2
2
  var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
- var index = require("./components/Main/index.js");
4
+ var index$5 = require("../emptyData/index.js");
5
+ var index = require("./components/ListTabs/index.js");
6
+ var index$1 = require("./components/ListFilter/index.js");
7
+ var index$2 = require("./components/ListContent/index.js");
8
+ var index$4 = require("./components/ListSelected/index.js");
9
+ var index$3 = require("./components/ListContentLocal/index.js");
10
+ var useAttachement = require("../hooks/useAttachement.js");
11
+ var config = require("../config.js");
12
+ var useResourceSelect = require("./scripts/useResourceSelect.js");
5
13
  const _hoisted_1 = { class: "resource-select-wrap" };
14
+ const _hoisted_2 = { class: "resource-select-main" };
15
+ const _hoisted_3 = {
16
+ key: 0,
17
+ class: "resource-select-container"
18
+ };
19
+ const _hoisted_4 = {
20
+ key: 0,
21
+ class: "resource-select-filter"
22
+ };
23
+ const _hoisted_5 = { class: "resource-select-content" };
24
+ const _hoisted_6 = { class: "resource-select-footer" };
25
+ const _hoisted_7 = { class: "footer-left" };
26
+ const _hoisted_8 = {
27
+ key: 0,
28
+ class: "footer-right"
29
+ };
6
30
  const _sfc_main = vue.defineComponent({
7
31
  ...{ name: "selectResourceModal" },
8
32
  __name: "component",
@@ -18,55 +42,176 @@ const _sfc_main = vue.defineComponent({
18
42
  setup(__props, { emit: __emit }) {
19
43
  const props = __props;
20
44
  const emits = __emit;
21
- const wrapMode = vue.ref(props.wrap || "modal");
22
- const handleClose = () => {
45
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
46
+ const wrapProps = vue.computed(() => {
47
+ if (props.wrap === "drawer") {
48
+ return {
49
+ class: "resource-select-drawer",
50
+ header: false,
51
+ width: "1024px",
52
+ footer: false
53
+ };
54
+ }
55
+ return {
56
+ bodyClass: "resource-select-modal-body",
57
+ width: "986px",
58
+ closable: false,
59
+ hideTitle: false,
60
+ footer: false
61
+ };
62
+ });
63
+ const activeKey = vue.ref("all");
64
+ vue.provide("userInfo", vue.computed(() => props.userInfo));
65
+ vue.provide("baseAPI", BASE_API);
66
+ const {
67
+ list,
68
+ total,
69
+ limit,
70
+ pageIdx,
71
+ loading,
72
+ changeKey,
73
+ changeFilter,
74
+ changePage,
75
+ changeSize
76
+ } = useAttachement["default"]({ key: "all", BASE_API });
77
+ const {
78
+ selected,
79
+ selectedKeys,
80
+ disableSelect,
81
+ handleSelect,
82
+ handleClear
83
+ } = useResourceSelect.useResourceSelect(props);
84
+ function handleClose() {
85
+ handleClear();
23
86
  emits("update:visible", false);
24
- };
87
+ }
25
88
  const handleSubmit = (data) => {
26
89
  emits("submit", JSON.parse(JSON.stringify(data)));
27
90
  };
91
+ const handleSelectOne = (params) => {
92
+ if (Array.isArray(params))
93
+ handleSubmit(params);
94
+ else
95
+ handleSubmit([params]);
96
+ handleClose();
97
+ };
98
+ function handleConfirm() {
99
+ handleSelectOne(selected.value);
100
+ }
101
+ function handleToUpload() {
102
+ changeKey("local");
103
+ activeKey.value = "local";
104
+ }
105
+ vue.watch(
106
+ () => props.visible,
107
+ () => {
108
+ if (props.visible) {
109
+ activeKey.value = "all";
110
+ changeKey("all");
111
+ }
112
+ }
113
+ );
28
114
  return (_ctx, _cache) => {
29
115
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
30
- wrapMode.value === "drawer" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
31
- key: 0,
32
- visible: _ctx.visible,
33
- width: "1024px",
34
- header: false,
35
- footer: false,
36
- class: "resource-select-drawer"
37
- }, {
38
- default: vue.withCtx(() => [
39
- vue.createVNode(index, {
40
- BASE_API: _ctx.BASE_API,
41
- userInfo: _ctx.userInfo,
42
- maxcount: _ctx.maxcount,
43
- filterOptions: _ctx.filterOptions,
44
- onClose: handleClose,
45
- onSubmit: handleSubmit
46
- }, null, 8, ["BASE_API", "userInfo", "maxcount", "filterOptions"])
47
- ]),
48
- _: 1
49
- }, 8, ["visible"])) : wrapMode.value === "modal" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
50
- key: 1,
51
- visible: _ctx.visible,
52
- width: "986px",
53
- "body-class": "resource-select-modal-body",
54
- "hide-title": false,
55
- closable: false,
56
- footer: false
57
- }, {
116
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.wrap === "drawer" ? vue.unref(webVue.Drawer) : vue.unref(webVue.Modal)), vue.mergeProps({ visible: _ctx.visible }, wrapProps.value), {
58
117
  default: vue.withCtx(() => [
59
- vue.createVNode(index, {
60
- BASE_API: _ctx.BASE_API,
61
- userInfo: _ctx.userInfo,
62
- maxcount: _ctx.maxcount,
63
- filterOptions: _ctx.filterOptions,
64
- onClose: handleClose,
65
- onSubmit: handleSubmit
66
- }, null, 8, ["BASE_API", "userInfo", "maxcount", "filterOptions"])
118
+ vue.createElementVNode("div", _hoisted_2, [
119
+ _ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
120
+ vue.createCommentVNode(" \u5934\u90E8 "),
121
+ vue.createVNode(index, {
122
+ "model-value": activeKey.value,
123
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
124
+ onChange: vue.unref(changeKey),
125
+ onClose: handleClose
126
+ }, null, 8, ["model-value", "onChange"]),
127
+ vue.createCommentVNode(" \u7B5B\u9009 "),
128
+ activeKey.value !== "local" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
129
+ vue.createVNode(index$1, {
130
+ "disable-upload-by": !["all", "remind"].includes(activeKey.value),
131
+ filterOptions: _ctx.filterOptions,
132
+ onChange: vue.unref(changeFilter),
133
+ onUpload: handleToUpload
134
+ }, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
135
+ ])) : vue.createCommentVNode("v-if", true),
136
+ vue.createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
137
+ vue.createElementVNode("div", _hoisted_5, [
138
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
139
+ "outer-style": { height: "100%" },
140
+ style: { "height": "100%", "overflow": "auto" }
141
+ }, {
142
+ default: vue.withCtx(() => [
143
+ vue.withDirectives(vue.createVNode(index$2, {
144
+ loading: vue.unref(loading),
145
+ list: vue.unref(list),
146
+ disable: vue.unref(disableSelect),
147
+ "select-keys": vue.unref(selectedKeys),
148
+ onSelect: vue.unref(handleSelect),
149
+ onSelectOne: handleSelectOne
150
+ }, null, 8, ["loading", "list", "disable", "select-keys", "onSelect"]), [
151
+ [vue.vShow, activeKey.value !== "local"]
152
+ ]),
153
+ vue.withDirectives(vue.createVNode(index$3, {
154
+ disable: vue.unref(disableSelect),
155
+ "select-keys": vue.unref(selectedKeys),
156
+ onSelect: vue.unref(handleSelect),
157
+ onSelectOne: handleSelectOne
158
+ }, null, 8, ["disable", "select-keys", "onSelect"]), [
159
+ [vue.vShow, activeKey.value === "local"]
160
+ ])
161
+ ]),
162
+ _: 1
163
+ })
164
+ ]),
165
+ vue.createCommentVNode(" \u5E95\u90E8 "),
166
+ vue.createElementVNode("div", _hoisted_6, [
167
+ vue.createElementVNode("div", _hoisted_7, [
168
+ activeKey.value !== "local" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Pagination), {
169
+ key: 0,
170
+ current: vue.unref(pageIdx),
171
+ "onUpdate:current": _cache[1] || (_cache[1] = ($event) => vue.isRef(pageIdx) ? pageIdx.value = $event : null),
172
+ total: vue.unref(total),
173
+ "page-size": vue.unref(limit),
174
+ "show-total": "",
175
+ "show-page-size": "",
176
+ "base-size": 3,
177
+ "buffer-size": 1,
178
+ onChange: _cache[2] || (_cache[2] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
179
+ onPageSizeChange: vue.unref(changeSize)
180
+ }, null, 8, ["current", "total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
181
+ ]),
182
+ vue.unref(selected).length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
183
+ vue.createVNode(index$4, {
184
+ maxcount: _ctx.maxcount,
185
+ selected: vue.unref(selected),
186
+ onRemove: vue.unref(handleSelect),
187
+ onClear: vue.unref(handleClear)
188
+ }, null, 8, ["maxcount", "selected", "onRemove", "onClear"]),
189
+ vue.createVNode(vue.unref(webVue.Button), { onClick: handleClose }, {
190
+ default: vue.withCtx(() => [
191
+ vue.createTextVNode("\u53D6\u6D88")
192
+ ]),
193
+ _: 1
194
+ }),
195
+ vue.createVNode(vue.unref(webVue.Button), {
196
+ type: "primary",
197
+ onClick: handleConfirm
198
+ }, {
199
+ default: vue.withCtx(() => [
200
+ vue.createTextVNode("\u786E\u5B9A")
201
+ ]),
202
+ _: 1
203
+ })
204
+ ])) : vue.createCommentVNode("v-if", true)
205
+ ])
206
+ ])) : (vue.openBlock(), vue.createBlock(vue.unref(index$5), {
207
+ key: 1,
208
+ type: "empty",
209
+ customTip: "\u6682\u65E0\u6743\u9650"
210
+ }))
211
+ ])
67
212
  ]),
68
213
  _: 1
69
- }, 8, ["visible"])) : vue.createCommentVNode("v-if", true)
214
+ }, 16, ["visible"]))
70
215
  ]);
71
216
  };
72
217
  }
@@ -108,14 +108,26 @@ const _sfc_main = vue.defineComponent({
108
108
  if (!result[key])
109
109
  delete result[key];
110
110
  });
111
+ if (!result.catalog)
112
+ result.catalog = "image,video,audio";
111
113
  emits("change", result);
112
114
  },
113
115
  { deep: true, immediate: true }
114
116
  );
117
+ vue.watch(
118
+ () => props.filterOptions,
119
+ () => {
120
+ var _a;
121
+ if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
122
+ filter.value.catalog = props.filterOptions.mediaType;
123
+ }
124
+ },
125
+ { immediate: true }
126
+ );
115
127
  vue.onMounted(() => {
116
128
  var _a;
117
129
  load();
118
- if ((_a = props.filterOptions) == null ? void 0 : _a.mediaType) {
130
+ if (((_a = props.filterOptions) == null ? void 0 : _a.mediaType) && !props.filterOptions.mediaTypeStrict) {
119
131
  filter.value.catalog = props.filterOptions.mediaType;
120
132
  originFilter.catalog = props.filterOptions.mediaType;
121
133
  }
@@ -59,12 +59,14 @@ const _sfc_main = vue.defineComponent({
59
59
  vue.createElementVNode("div", _hoisted_6, [
60
60
  ["image", "video"].includes(item.catalog) ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Image), {
61
61
  key: 0,
62
+ preview: false,
62
63
  width: "100%",
63
64
  height: "100%",
64
65
  src: item.thumb || item.url
65
66
  }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
66
67
  ["audio"].includes(item.catalog) ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Image), {
67
68
  key: 1,
69
+ preview: false,
68
70
  width: "100%",
69
71
  height: "100%",
70
72
  fit: "cover",
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var icon = require("@arco-design/web-vue/es/icon");
4
+ var webVue = require("@arco-design/web-vue");
5
+ const _hoisted_1 = { class: "resource-select-header" };
6
+ const _sfc_main = vue.defineComponent({
7
+ __name: "index",
8
+ props: {
9
+ modelValue: {}
10
+ },
11
+ emits: ["update:model-value", "change", "close"],
12
+ setup(__props, { emit: __emit }) {
13
+ const props = __props;
14
+ const emits = __emit;
15
+ const activeKey = vue.computed({
16
+ get: () => props.modelValue,
17
+ set: (value) => emits("update:model-value", value)
18
+ });
19
+ return (_ctx, _cache) => {
20
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
21
+ vue.createVNode(vue.unref(webVue.Tabs), {
22
+ "active-key": activeKey.value,
23
+ "onUpdate:activeKey": _cache[1] || (_cache[1] = ($event) => activeKey.value = $event),
24
+ onChange: _cache[2] || (_cache[2] = (e) => emits("change", e))
25
+ }, {
26
+ extra: vue.withCtx(() => [
27
+ vue.createVNode(vue.unref(webVue.Button), {
28
+ type: "text",
29
+ shape: "round",
30
+ style: { "color": "black", "transform": "translateX(-8px)" },
31
+ onClick: _cache[0] || (_cache[0] = ($event) => emits("close"))
32
+ }, {
33
+ icon: vue.withCtx(() => [
34
+ vue.createVNode(vue.unref(icon.IconClose))
35
+ ]),
36
+ _: 1
37
+ })
38
+ ]),
39
+ default: vue.withCtx(() => [
40
+ vue.createVNode(vue.unref(webVue.TabPane), {
41
+ key: "all",
42
+ title: "\u5168\u90E8\u7D20\u6750"
43
+ }),
44
+ vue.createVNode(vue.unref(webVue.TabPane), {
45
+ key: "my",
46
+ title: "\u6211\u7684\u7D20\u6750"
47
+ }),
48
+ vue.createVNode(vue.unref(webVue.TabPane), {
49
+ key: "remind",
50
+ title: "\u63D0\u9192\u6211\u7684"
51
+ }),
52
+ vue.createVNode(vue.unref(webVue.TabPane), {
53
+ key: "local",
54
+ title: "\u672C\u5730\u7D20\u6750"
55
+ })
56
+ ]),
57
+ _: 1
58
+ }, 8, ["active-key"])
59
+ ]);
60
+ };
61
+ }
62
+ });
63
+ module.exports = _sfc_main;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var vue = require("vue");
4
+ function useResourceSelect(props) {
5
+ const selected = vue.ref([]);
6
+ const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
7
+ const disableSelect = vue.computed(() => props.maxcount && selected.value.length >= props.maxcount);
8
+ function handleSelect(params) {
9
+ const { id } = params;
10
+ const index = selected.value.findIndex((item) => item.id === id);
11
+ if (index > -1)
12
+ selected.value.splice(index, 1);
13
+ else
14
+ selected.value.push(params);
15
+ }
16
+ function handleClear() {
17
+ selected.value = [];
18
+ }
19
+ return {
20
+ selected,
21
+ selectedKeys,
22
+ disableSelect,
23
+ handleSelect,
24
+ handleClear
25
+ };
26
+ }
27
+ exports.useResourceSelect = useResourceSelect;
@@ -61,7 +61,12 @@
61
61
  overflow-y: scroll;
62
62
  }
63
63
  .list-panel-wrapper .list-selected-record::-webkit-scrollbar {
64
- display: none;
64
+ width: 6px;
65
+ }
66
+ .list-panel-wrapper .list-selected-record::-webkit-scrollbar-thumb {
67
+ background-color: #ececec;
68
+ -webkit-border-radius: 6px;
69
+ opacity: 0.5;
65
70
  }
66
71
  .list-panel-wrapper .list-selected-record .list-selected-item {
67
72
  display: flex;
@@ -48,7 +48,13 @@
48
48
  overflow-y: scroll;
49
49
 
50
50
  &::-webkit-scrollbar {
51
- display: none;
51
+ width: 6px;
52
+ }
53
+
54
+ &::-webkit-scrollbar-thumb {
55
+ background-color: #ececec;
56
+ -webkit-border-radius: 6px;
57
+ opacity: 0.5;
52
58
  }
53
59
 
54
60
  .list-selected-item {
@@ -172,8 +172,7 @@ const RESOURCE_SOURCE_DICT = {
172
172
  const RESOURCE_CATALOG_DICT = {
173
173
  image: "\u56FE\u7247",
174
174
  video: "\u89C6\u9891",
175
- audio: "\u97F3\u9891",
176
- other: "\u5176\u4ED6"
175
+ audio: "\u97F3\u9891"
177
176
  };
178
177
  const RESOURCE_SOURCE_OPTIONS = object2LabelList(RESOURCE_SOURCE_DICT);
179
178
  const RESOURCE_CATALOG_OPTIONS = object2LabelList(RESOURCE_CATALOG_DICT);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.3.44",
3
+ "version": "0.3.46",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",
File without changes
@@ -1,2 +0,0 @@
1
- declare const appCenter: any;
2
- export default appCenter;
@@ -1,10 +0,0 @@
1
- interface Params {
2
- repo_id?: string;
3
- app_id?: number;
4
- [key: string]: any;
5
- }
6
- export declare function getUserRepoActs(BASE_API: string): import("axios").AxiosPromise<any>;
7
- export declare function getPubApps(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
8
- export declare function getResentApp(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
9
- export declare function setResentApp(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
10
- export {};
@@ -1,14 +0,0 @@
1
- declare const _default: {
2
- alias: string;
3
- actions: {
4
- id: number;
5
- key: string;
6
- alias: string;
7
- brief: string;
8
- real: string;
9
- type: number;
10
- icon: string;
11
- target_url: string;
12
- }[];
13
- }[];
14
- export default _default;
@@ -1,6 +0,0 @@
1
- declare type PermissionItem = {
2
- key: string;
3
- real: string | string[];
4
- };
5
- export default function permissionMap(permissions: string[], item: PermissionItem, hideList?: string[]): boolean;
6
- export {};
@@ -1,4 +0,0 @@
1
- export default function routeMap(BASE_API: string, rid: string | null | undefined, listType: string, app?: {
2
- type: number;
3
- setting?: any;
4
- } | null): Promise<void>;
@@ -1 +0,0 @@
1
- import './index.less';
File without changes
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const baseFilter: any;
2
- export default baseFilter;
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,16 +0,0 @@
1
- import { Ref } from 'vue';
2
- /**
3
- * @deprecated 改为其他方式实现
4
- * @param filterItemsRef
5
- * @param dpPannelRef
6
- * @param moreBtnRef
7
- * @returns
8
- */
9
- export default function useCalcWidth(filterItemsRef: Ref<HTMLElement | undefined>, dpPannelRef: Ref<HTMLElement | undefined>, moreBtnRef: Ref<HTMLElement | undefined>): {
10
- pannelArray: Ref<string>;
11
- popperShowFlag: Ref<boolean>;
12
- showPopper: () => void;
13
- initDocWidthListener: () => void;
14
- initPopper: () => void;
15
- checkOverflow: () => void;
16
- };
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const colorPalette: any;
2
- export default colorPalette;
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,5 +0,0 @@
1
- import type { App } from 'vue';
2
- declare const Components: {
3
- install: (app: App) => void;
4
- };
5
- export default Components;
package/es/config.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const DEFAULT_BASE_API: any;
2
- export declare const DEFAULT_BASE_ACCOUNT_HOST: any;
3
- export declare const DEFAULT_UPLOAD_CHUNK_SIZE: number;
4
- export declare const DEFAULT_UPLOAD_URL: string;
@@ -1,36 +0,0 @@
1
- declare const platform: ({
2
- id: number;
3
- key: string;
4
- name: string;
5
- indexUrl: string;
6
- isDataAsync: boolean;
7
- type: string[];
8
- pfIcon?: undefined;
9
- } | {
10
- id: number;
11
- key: string;
12
- name: string;
13
- indexUrl: string;
14
- pfIcon: string;
15
- isDataAsync: boolean;
16
- type: string[];
17
- })[];
18
- export declare function getPlatformInfoById(id: number): any;
19
- export declare const accounts: {
20
- id: number;
21
- createdAt: string;
22
- updatedAt: string;
23
- deletedAt: null;
24
- thirdId: string;
25
- authorId: string;
26
- platformAccountId: string;
27
- avatar: string;
28
- name: string;
29
- platformId: number;
30
- cookie: string;
31
- token: string;
32
- lastRequestAt: number;
33
- lastSyncAt: number;
34
- state: number;
35
- }[];
36
- export default platform;
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- declare const contentDetailList: any;
2
- export default contentDetailList;
@@ -1,6 +0,0 @@
1
- interface Params {
2
- [key: string]: any;
3
- }
4
- export declare function generateDocPreviewLink(BASE_API: string, query?: Params): import("axios").AxiosPromise<any>;
5
- export declare function getDocDetailsNew(BASE_API: string, query?: Params): import("axios").AxiosPromise<any>;
6
- export {};
@@ -1 +0,0 @@
1
- import './index.less';
File without changes