@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,16 +0,0 @@
1
- import * as TUS from 'tus-js-client';
2
- /**
3
- * @description 通过 TUS 实现大文件分片上传
4
- * @param file 要上传的文件
5
- * @param progressCallback 上传进度回调函数
6
- * @returns
7
- */
8
- export declare function uploadByTUS(file: File, progressCallback?: (b: number, t: number) => void): Promise<TUS.Upload>;
9
- export declare class TusUploadTask {
10
- file: any;
11
- upload: any;
12
- platformKey?: string;
13
- constructor(file: any, platformKey?: string);
14
- start(callback: (bytesUploaded: any, bytesTotal: any) => any): Promise<unknown>;
15
- abort(): any;
16
- }
@@ -1,186 +0,0 @@
1
- export declare const docType: {
2
- blank: string;
3
- atlas: string;
4
- video: string;
5
- video_album: string;
6
- imagetext: string;
7
- link: string;
8
- wechat: string;
9
- live: string;
10
- ad: string;
11
- h5: string;
12
- special_v3: string;
13
- activity: string;
14
- booklink: string;
15
- svideo: string;
16
- audio: string;
17
- audio_album: string;
18
- vote_activity: string;
19
- vote: string;
20
- cloud_form: string;
21
- };
22
- export declare const catalogMap: {
23
- doc: string;
24
- video: string;
25
- project: string;
26
- audio: string;
27
- image: string;
28
- pdf: string;
29
- officeexcel: string;
30
- officeppt: string;
31
- officedoc: string;
32
- rar: string;
33
- zip: string;
34
- txt: string;
35
- html: string;
36
- exe: string;
37
- other: string;
38
- contentList: string;
39
- column: string;
40
- link: string;
41
- banners: string;
42
- group: string;
43
- mpGroup: string;
44
- mpList: string;
45
- mpAccount: string;
46
- mpTopic: string;
47
- mpContent: string;
48
- };
49
- export declare const target_type_map: {
50
- 3: string;
51
- 4: string;
52
- 5: string;
53
- 6: string;
54
- 7: string;
55
- 8: string;
56
- 9: string;
57
- 10: string;
58
- 13: string;
59
- 14: any;
60
- 15: string;
61
- 16: string;
62
- 17: string;
63
- 18: string;
64
- };
65
- export declare const key_target_type_map: any;
66
- export declare const approveFlowStatusMap: {
67
- 1: string;
68
- 2: string;
69
- 3: string;
70
- 4: string;
71
- 5: string;
72
- 6: string;
73
- 7: string;
74
- 8: string;
75
- };
76
- export declare const groupPieceType: any;
77
- export declare const componentsColumns: any;
78
- export declare const compoColumnsWithKeyMap: {
79
- top: string;
80
- banner: string;
81
- newsletters: string;
82
- svideo: string;
83
- function: string;
84
- special: string;
85
- news_letter: string;
86
- focus: string;
87
- horizon_slide: string;
88
- radio: string;
89
- tv: string;
90
- mp_account: string;
91
- column: string;
92
- image: string;
93
- timeline: string;
94
- rank: string;
95
- group_list: string;
96
- };
97
- export declare const compoColumnsMap: () => any;
98
- export declare const contentList_list_type_map: {
99
- 1: string;
100
- 2: string;
101
- 3: string;
102
- 4: string;
103
- 5: string;
104
- 6: string;
105
- 7: string;
106
- };
107
- export declare const contentList_relation_type_map: {
108
- 0: string;
109
- 1: string;
110
- 2: string;
111
- 3: string;
112
- 4: string;
113
- 10: string;
114
- };
115
- export declare const contentList_layout_map: any;
116
- export declare const mp_type_map: any;
117
- export declare const mpTypeOptions: () => {
118
- value: string;
119
- label: any;
120
- }[];
121
- export declare const kongo_source_map: {
122
- app: string;
123
- url: string;
124
- document: string;
125
- category_list: string;
126
- service: string;
127
- political: string;
128
- applet: string;
129
- };
130
- export declare const calcApprovingUser: (data: any) => any;
131
- export declare const calcApprovingDependent: (data: any) => string;
132
- export declare const ilive_type_map: {
133
- 1: string;
134
- 2: string;
135
- 3: string;
136
- };
137
- export declare const local_live_doc_type: any;
138
- export declare const local_live_doc_status: {
139
- value: number;
140
- label: string;
141
- bgColor: string;
142
- }[];
143
- export declare const matrixPublishStateMap: {
144
- '-1': string;
145
- 0: string;
146
- 1: string;
147
- 2: string;
148
- 3: string;
149
- 4: string;
150
- };
151
- export declare const matrixPublishFormalStateMap: {
152
- '-1': string;
153
- 0: string;
154
- 1: string;
155
- 2: string;
156
- 3: string;
157
- 4: string;
158
- 5: string;
159
- 6: string;
160
- 7: string;
161
- 8: string;
162
- 9: string;
163
- 10: string;
164
- 11: string;
165
- 12: string;
166
- 13: string;
167
- };
168
- export declare const RESOURCE_SOURCE_DICT: {
169
- ai: string;
170
- live_rec: string;
171
- backend: string;
172
- };
173
- export declare const RESOURCE_CATALOG_DICT: {
174
- image: string;
175
- video: string;
176
- audio: string;
177
- other: string;
178
- };
179
- export declare const RESOURCE_SOURCE_OPTIONS: {
180
- value: string;
181
- label: string;
182
- }[];
183
- export declare const RESOURCE_CATALOG_OPTIONS: {
184
- value: string;
185
- label: string;
186
- }[];
@@ -1 +0,0 @@
1
- export declare function checkType(file: any, param: any): any;
File without changes
@@ -1,2 +0,0 @@
1
- declare const videoThumb: any;
2
- export default videoThumb;
@@ -1,9 +0,0 @@
1
- declare type EditThumbParams = {
2
- url: string;
3
- count: number;
4
- start: number;
5
- end: number;
6
- search: string;
7
- };
8
- export declare function editthumb(BASE_URL: string, params: EditThumbParams): import("axios").AxiosPromise<any>;
9
- export {};
@@ -1,7 +0,0 @@
1
- export declare function getHMSF(time: string): string;
2
- export declare function useVideoThumbs(): {
3
- thumbs: import("vue").Ref<any[]>;
4
- curThumb: import("vue").Ref<string | undefined>;
5
- getVideoThumbs: (BASE_API: string, url: string, duration: number) => Promise<void>;
6
- handleSelectThumb: (idx: number) => void;
7
- };
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,216 +0,0 @@
1
- "use strict";
2
- var vue = require("vue");
3
- var webVue = require("@arco-design/web-vue");
4
- var icon = require("@arco-design/web-vue/es/icon");
5
- var index$4 = require("../../../emptyData/index.js");
6
- var index = require("../ListFilter/index.js");
7
- var index$1 = require("../ListContent/index.js");
8
- var index$3 = require("../ListSelected/index.js");
9
- var index$2 = require("../ListContentLocal/index.js");
10
- var useAttachement = require("../../../hooks/useAttachement.js");
11
- var config = require("../../../config.js");
12
- const _hoisted_1 = { class: "resource-select-main" };
13
- const _hoisted_2 = {
14
- key: 0,
15
- class: "resource-select-container"
16
- };
17
- const _hoisted_3 = { class: "resource-select-header" };
18
- const _hoisted_4 = {
19
- key: 0,
20
- class: "resource-select-filter"
21
- };
22
- const _hoisted_5 = { class: "resource-select-content" };
23
- const _hoisted_6 = { class: "resource-select-footer" };
24
- const _hoisted_7 = { class: "footer-left" };
25
- const _hoisted_8 = {
26
- key: 0,
27
- class: "footer-right"
28
- };
29
- const _sfc_main = vue.defineComponent({
30
- __name: "index",
31
- props: {
32
- BASE_API: {},
33
- userInfo: {},
34
- maxcount: {},
35
- filterOptions: {}
36
- },
37
- emits: ["close", "submit"],
38
- setup(__props, { emit: __emit }) {
39
- const props = __props;
40
- const emits = __emit;
41
- const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
42
- const activeKey = vue.ref("all");
43
- vue.provide("userInfo", vue.computed(() => props.userInfo));
44
- vue.provide("baseAPI", BASE_API);
45
- const {
46
- list,
47
- total,
48
- limit,
49
- loading,
50
- changeKey,
51
- changeFilter,
52
- changePage,
53
- changeSize
54
- } = useAttachement["default"]({ key: "all", BASE_API });
55
- const selected = vue.ref([]);
56
- const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
57
- const disableSelect = vue.computed(() => props.maxcount && selected.value.length >= props.maxcount);
58
- function handleSelect(params) {
59
- const { id } = params;
60
- const index2 = selected.value.findIndex((item) => item.id === id);
61
- if (index2 > -1)
62
- selected.value.splice(index2, 1);
63
- else
64
- selected.value.push(params);
65
- }
66
- function handleClear() {
67
- selected.value = [];
68
- }
69
- function handleClose() {
70
- handleClear();
71
- emits("close");
72
- }
73
- const handleSelectOne = (params) => {
74
- if (Array.isArray(params))
75
- emits("submit", params);
76
- else
77
- emits("submit", [params]);
78
- handleClose();
79
- };
80
- function handleConfirm() {
81
- handleSelectOne(selected.value);
82
- }
83
- function handleToUpload() {
84
- changeKey("local");
85
- activeKey.value = "local";
86
- }
87
- return (_ctx, _cache) => {
88
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
89
- _ctx.userInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
90
- vue.createCommentVNode(" \u5934\u90E8 "),
91
- vue.createElementVNode("div", _hoisted_3, [
92
- vue.createVNode(vue.unref(webVue.Tabs), {
93
- "active-key": activeKey.value,
94
- "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
95
- onChange: vue.unref(changeKey)
96
- }, {
97
- extra: vue.withCtx(() => [
98
- vue.createVNode(vue.unref(webVue.Button), {
99
- type: "secondary",
100
- shape: "round",
101
- onClick: handleClose
102
- }, {
103
- icon: vue.withCtx(() => [
104
- vue.createVNode(vue.unref(icon.IconClose))
105
- ]),
106
- _: 1
107
- })
108
- ]),
109
- default: vue.withCtx(() => [
110
- vue.createVNode(vue.unref(webVue.TabPane), {
111
- key: "all",
112
- title: "\u5168\u90E8\u7D20\u6750"
113
- }),
114
- vue.createVNode(vue.unref(webVue.TabPane), {
115
- key: "my",
116
- title: "\u6211\u7684\u7D20\u6750"
117
- }),
118
- vue.createVNode(vue.unref(webVue.TabPane), {
119
- key: "remind",
120
- title: "\u63D0\u9192\u6211\u7684"
121
- }),
122
- vue.createVNode(vue.unref(webVue.TabPane), {
123
- key: "local",
124
- title: "\u672C\u5730\u7D20\u6750"
125
- })
126
- ]),
127
- _: 1
128
- }, 8, ["active-key", "onChange"])
129
- ]),
130
- vue.createCommentVNode(" \u7B5B\u9009 "),
131
- activeKey.value !== "local" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
132
- vue.createVNode(index, {
133
- "disable-upload-by": !["all", "remind"].includes(activeKey.value),
134
- filterOptions: _ctx.filterOptions,
135
- onChange: vue.unref(changeFilter),
136
- onUpload: handleToUpload
137
- }, null, 8, ["disable-upload-by", "filterOptions", "onChange"])
138
- ])) : vue.createCommentVNode("v-if", true),
139
- vue.createCommentVNode(" \u5217\u8868\u90E8\u5206 "),
140
- vue.createElementVNode("div", _hoisted_5, [
141
- vue.createVNode(vue.unref(webVue.Scrollbar), {
142
- "outer-style": { height: "100%" },
143
- style: { "height": "100%", "overflow": "auto" }
144
- }, {
145
- default: vue.withCtx(() => [
146
- vue.withDirectives(vue.createVNode(index$1, {
147
- loading: vue.unref(loading),
148
- list: vue.unref(list),
149
- disable: disableSelect.value,
150
- "select-keys": selectedKeys.value,
151
- onSelect: handleSelect,
152
- onSelectOne: handleSelectOne
153
- }, null, 8, ["loading", "list", "disable", "select-keys"]), [
154
- [vue.vShow, activeKey.value !== "local"]
155
- ]),
156
- vue.withDirectives(vue.createVNode(index$2, {
157
- disable: disableSelect.value,
158
- "select-keys": selectedKeys.value,
159
- onSelect: handleSelect,
160
- onSelectOne: handleSelectOne
161
- }, null, 8, ["disable", "select-keys"]), [
162
- [vue.vShow, activeKey.value === "local"]
163
- ])
164
- ]),
165
- _: 1
166
- })
167
- ]),
168
- vue.createCommentVNode(" \u5E95\u90E8 "),
169
- vue.createElementVNode("div", _hoisted_6, [
170
- vue.createElementVNode("div", _hoisted_7, [
171
- activeKey.value !== "local" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Pagination), {
172
- key: 0,
173
- total: vue.unref(total),
174
- "page-size": vue.unref(limit),
175
- "show-total": "",
176
- "show-page-size": "",
177
- "base-size": 3,
178
- "buffer-size": 1,
179
- onChange: _cache[1] || (_cache[1] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
180
- onPageSizeChange: vue.unref(changeSize)
181
- }, null, 8, ["total", "page-size", "onPageSizeChange"])) : vue.createCommentVNode("v-if", true)
182
- ]),
183
- selected.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
184
- vue.createVNode(index$3, {
185
- maxcount: _ctx.maxcount,
186
- selected: selected.value,
187
- onRemove: handleSelect,
188
- onClear: handleClear
189
- }, null, 8, ["maxcount", "selected"]),
190
- vue.createVNode(vue.unref(webVue.Button), { onClick: handleClose }, {
191
- default: vue.withCtx(() => [
192
- vue.createTextVNode("\u53D6\u6D88")
193
- ]),
194
- _: 1
195
- }),
196
- vue.createVNode(vue.unref(webVue.Button), {
197
- type: "primary",
198
- onClick: handleConfirm
199
- }, {
200
- default: vue.withCtx(() => [
201
- vue.createTextVNode("\u786E\u5B9A")
202
- ]),
203
- _: 1
204
- })
205
- ])) : vue.createCommentVNode("v-if", true)
206
- ])
207
- ])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4), {
208
- key: 1,
209
- type: "empty",
210
- customTip: "\u6682\u65E0\u6743\u9650"
211
- }))
212
- ]);
213
- };
214
- }
215
- });
216
- module.exports = _sfc_main;