@cmstops/pro-compo 0.1.10 → 0.1.12

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 (261) hide show
  1. package/dist/index.css +1035 -0
  2. package/dist/index.min.css +1 -1
  3. package/es/_virtual/plugin-vue_export-helper.js +7 -0
  4. package/es/config.d.ts +2 -0
  5. package/es/config.js +3 -1
  6. package/es/contentDetailList/component.d.ts +0 -0
  7. package/es/contentDetailList/component.js +89 -0
  8. package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
  9. package/es/contentDetailList/components/Content/CompoItem/index.js +76 -0
  10. package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
  11. package/es/contentDetailList/components/Content/ContentListItem/index.js +99 -0
  12. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
  13. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +71 -0
  14. package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
  15. package/es/contentDetailList/components/Content/DocItem/index.js +199 -0
  16. package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.d.ts +0 -0
  17. package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +184 -0
  18. package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
  19. package/es/contentDetailList/components/Content/KongoNavItem/index.js +131 -0
  20. package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
  21. package/es/contentDetailList/components/Content/LiveItem/index.js +82 -0
  22. package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
  23. package/es/contentDetailList/components/Content/MaccountItem/index.js +84 -0
  24. package/es/contentDetailList/components/Content/MaccountItem/temp/user.js +2 -0
  25. package/es/contentDetailList/components/Content/index.d.ts +0 -0
  26. package/es/contentDetailList/components/Content/index.js +308 -0
  27. package/es/contentDetailList/components/Doc/index.d.ts +0 -0
  28. package/es/contentDetailList/components/Doc/index.js +58 -0
  29. package/es/contentDetailList/index.d.ts +2 -0
  30. package/es/contentDetailList/index.js +7 -0
  31. package/es/contentDetailList/scripts/data.d.ts +254 -0
  32. package/es/contentDetailList/scripts/index.d.ts +58 -0
  33. package/es/contentDetailList/scripts/index.js +137 -0
  34. package/es/contentDetailList/style/ComoItem.less +106 -0
  35. package/es/contentDetailList/style/Content.less +49 -0
  36. package/es/contentDetailList/style/ContentListItem.less +131 -0
  37. package/es/contentDetailList/style/Doc.less +8 -0
  38. package/es/contentDetailList/style/DocItem.less +145 -0
  39. package/es/contentDetailList/style/DocTags.less +63 -0
  40. package/es/contentDetailList/style/KongoNavItem.less +110 -0
  41. package/es/contentDetailList/style/LiveItem.less +115 -0
  42. package/es/contentDetailList/style/MaccountItem.less +114 -0
  43. package/es/contentDetailList/style/css.js +1 -0
  44. package/es/contentDetailList/style/index.css +683 -0
  45. package/es/contentDetailList/style/index.d.ts +1 -0
  46. package/es/contentDetailList/style/index.js +1 -0
  47. package/es/contentDetailList/style/index.less +9 -0
  48. package/es/contentModal/component.js +2 -1
  49. package/es/contentModal/components/CompoList/CompoFilter/index.js +3 -2
  50. package/es/contentModal/components/CompoList/index.js +3 -2
  51. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
  52. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
  53. package/es/contentModal/components/ViewAllColumn/index.js +2 -1
  54. package/es/contentModal/components/storeBox/index.js +2 -1
  55. package/es/emptyData/component.d.ts +0 -0
  56. package/es/emptyData/component.js +48 -0
  57. package/es/emptyData/index.d.ts +2 -0
  58. package/es/emptyData/index.js +7 -0
  59. package/es/emptyData/style/css.js +1 -0
  60. package/es/emptyData/style/index.css +26 -0
  61. package/es/emptyData/style/index.d.ts +1 -0
  62. package/es/emptyData/style/index.js +1 -0
  63. package/es/emptyData/style/index.less +30 -0
  64. package/es/hooks/toggle.d.ts +6 -0
  65. package/es/hooks/toggle.js +9 -0
  66. package/es/hooks/user.js +2 -0
  67. package/es/index.css +1035 -0
  68. package/es/index.d.ts +6 -0
  69. package/es/index.js +6 -0
  70. package/es/index.less +6 -0
  71. package/es/mediaFilter/component.d.ts +0 -0
  72. package/es/mediaFilter/component.js +41 -0
  73. package/es/mediaFilter/components/DocFilter.d.ts +0 -0
  74. package/es/mediaFilter/components/DocFilter.js +248 -0
  75. package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
  76. package/es/mediaFilter/components/FilterGroup.js +184 -0
  77. package/es/mediaFilter/components/FilterItem.d.ts +0 -0
  78. package/es/mediaFilter/components/FilterItem.js +113 -0
  79. package/es/mediaFilter/components/MediaFilter.js +8 -0
  80. package/es/mediaFilter/components/MpAccountFilter.js +8 -0
  81. package/es/mediaFilter/components/MpContentFilter.js +8 -0
  82. package/es/mediaFilter/index.d.ts +2 -0
  83. package/es/mediaFilter/index.js +7 -0
  84. package/es/mediaFilter/script/optionsGetter.d.ts +26 -0
  85. package/es/mediaFilter/script/optionsGetter.js +82 -0
  86. package/es/mediaFilter/style/css.js +1 -0
  87. package/es/mediaFilter/style/index.css +90 -0
  88. package/es/mediaFilter/style/index.d.ts +1 -0
  89. package/es/mediaFilter/style/index.js +1 -0
  90. package/es/mediaFilter/style/index.less +108 -0
  91. package/es/messageBox/list.js +2 -1
  92. package/es/previousVersion/component.js +2 -1
  93. package/es/previousVersion/style/index.less +1 -0
  94. package/es/resourceModal/component.js +2 -1
  95. package/es/resourceModal/components/MediaPreviewer/index.js +2 -1
  96. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
  97. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
  98. package/es/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
  99. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
  100. package/es/resourceModal/components/MediaSelection/index.js +3 -2
  101. package/es/resourceModal/script/filter.d.ts +1 -0
  102. package/es/resourceModal/script/filter.js +15 -2
  103. package/es/selectAvatarList/component.d.ts +0 -0
  104. package/es/selectAvatarList/component.js +77 -0
  105. package/es/selectAvatarList/index.d.ts +2 -0
  106. package/es/selectAvatarList/index.js +7 -0
  107. package/es/selectAvatarList/style/css.js +1 -0
  108. package/es/selectAvatarList/style/index.css +4 -0
  109. package/es/selectAvatarList/style/index.d.ts +1 -0
  110. package/es/selectAvatarList/style/index.js +1 -0
  111. package/es/selectAvatarList/style/index.less +4 -0
  112. package/es/selectGategory/component.js +5 -12
  113. package/es/selectGategory/components/ColumnSelection/index.js +5 -1
  114. package/es/uploadBefore/component.d.ts +0 -0
  115. package/es/uploadBefore/component.js +81 -0
  116. package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
  117. package/es/uploadBefore/components/UploadBefore.js +228 -0
  118. package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
  119. package/es/uploadBefore/components/UploadForClick.js +28 -0
  120. package/es/uploadBefore/index.d.ts +2 -0
  121. package/es/uploadBefore/index.js +7 -0
  122. package/es/uploadBefore/script/api.d.ts +16 -0
  123. package/es/uploadBefore/script/api.js +27 -0
  124. package/es/uploadBefore/script/fileTypeAdapter.d.ts +39 -0
  125. package/es/uploadBefore/script/fileTypeAdapter.js +48 -0
  126. package/es/uploadBefore/script/fileUpload.d.ts +7 -0
  127. package/es/uploadBefore/script/fileUpload.js +39 -0
  128. package/es/uploadBefore/script/uploadHooks.d.ts +55 -0
  129. package/es/uploadBefore/script/uploadHooks.js +33 -0
  130. package/es/uploadBefore/style/css.js +1 -0
  131. package/es/uploadBefore/style/index.css +111 -0
  132. package/es/uploadBefore/style/index.d.ts +1 -0
  133. package/es/uploadBefore/style/index.js +1 -0
  134. package/es/uploadBefore/style/index.less +144 -0
  135. package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
  136. package/es/uploadStep/component.js +139 -4
  137. package/es/uploadStep/script/fileTypeAdapter.d.ts +20 -0
  138. package/es/uploadStep/style/index.css +113 -0
  139. package/es/uploadStep/style/index.less +148 -0
  140. package/es/userDirector/component.d.ts +0 -0
  141. package/es/userDirector/component.js +200 -0
  142. package/es/userDirector/index.d.ts +2 -0
  143. package/es/userDirector/index.js +7 -0
  144. package/es/userDirector/script/api.d.ts +9 -0
  145. package/es/userDirector/script/api.js +32 -0
  146. package/es/userDirector/style/css.js +1 -0
  147. package/es/userDirector/style/index.css +8 -0
  148. package/es/userDirector/style/index.d.ts +1 -0
  149. package/es/userDirector/style/index.js +1 -0
  150. package/es/userDirector/style/index.less +8 -0
  151. package/es/utils/doc.d.ts +18 -16
  152. package/es/utils/doc.js +52 -0
  153. package/es/utils/index.d.ts +8 -0
  154. package/es/utils/index.js +22 -1
  155. package/es/utils/tusUpload.d.ts +8 -0
  156. package/es/utils/tusUpload.js +52 -0
  157. package/lib/_virtual/plugin-vue_export-helper.js +8 -0
  158. package/lib/config.js +4 -0
  159. package/lib/contentDetailList/component.js +90 -0
  160. package/lib/contentDetailList/components/Content/CompoItem/index.js +77 -0
  161. package/lib/contentDetailList/components/Content/ContentListItem/index.js +100 -0
  162. package/lib/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +72 -0
  163. package/lib/contentDetailList/components/Content/DocItem/index.js +200 -0
  164. package/lib/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +185 -0
  165. package/lib/contentDetailList/components/Content/KongoNavItem/index.js +132 -0
  166. package/lib/contentDetailList/components/Content/LiveItem/index.js +83 -0
  167. package/lib/contentDetailList/components/Content/MaccountItem/index.js +85 -0
  168. package/lib/contentDetailList/components/Content/MaccountItem/temp/user.js +3 -0
  169. package/lib/contentDetailList/components/Content/index.js +313 -0
  170. package/lib/contentDetailList/components/Doc/index.js +59 -0
  171. package/lib/contentDetailList/index.js +8 -0
  172. package/lib/contentDetailList/scripts/index.js +153 -0
  173. package/lib/contentDetailList/style/ComoItem.less +106 -0
  174. package/lib/contentDetailList/style/Content.less +49 -0
  175. package/lib/contentDetailList/style/ContentListItem.less +131 -0
  176. package/lib/contentDetailList/style/Doc.less +8 -0
  177. package/lib/contentDetailList/style/DocItem.less +145 -0
  178. package/lib/contentDetailList/style/DocTags.less +63 -0
  179. package/lib/contentDetailList/style/KongoNavItem.less +110 -0
  180. package/lib/contentDetailList/style/LiveItem.less +115 -0
  181. package/lib/contentDetailList/style/MaccountItem.less +114 -0
  182. package/lib/contentDetailList/style/css.js +2 -0
  183. package/lib/contentDetailList/style/index.css +683 -0
  184. package/lib/contentDetailList/style/index.js +2 -0
  185. package/lib/contentDetailList/style/index.less +9 -0
  186. package/lib/contentModal/component.js +2 -1
  187. package/lib/contentModal/components/CompoList/CompoFilter/index.js +3 -2
  188. package/lib/contentModal/components/CompoList/index.js +3 -2
  189. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
  190. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
  191. package/lib/contentModal/components/ViewAllColumn/index.js +2 -1
  192. package/lib/contentModal/components/storeBox/index.js +2 -1
  193. package/lib/emptyData/component.js +49 -0
  194. package/lib/emptyData/index.js +8 -0
  195. package/lib/emptyData/style/css.js +2 -0
  196. package/lib/emptyData/style/index.css +26 -0
  197. package/lib/emptyData/style/index.js +2 -0
  198. package/lib/emptyData/style/index.less +30 -0
  199. package/lib/hooks/toggle.js +11 -0
  200. package/lib/hooks/user.js +2 -0
  201. package/lib/index.css +1035 -0
  202. package/lib/index.js +12 -0
  203. package/lib/index.less +6 -0
  204. package/lib/mediaFilter/component.js +42 -0
  205. package/lib/mediaFilter/components/DocFilter.js +249 -0
  206. package/lib/mediaFilter/components/FilterGroup.js +185 -0
  207. package/lib/mediaFilter/components/FilterItem.js +114 -0
  208. package/lib/mediaFilter/components/MediaFilter.js +9 -0
  209. package/lib/mediaFilter/components/MpAccountFilter.js +9 -0
  210. package/lib/mediaFilter/components/MpContentFilter.js +9 -0
  211. package/lib/mediaFilter/index.js +8 -0
  212. package/lib/mediaFilter/script/optionsGetter.js +88 -0
  213. package/lib/mediaFilter/style/css.js +2 -0
  214. package/lib/mediaFilter/style/index.css +90 -0
  215. package/lib/mediaFilter/style/index.js +2 -0
  216. package/lib/mediaFilter/style/index.less +108 -0
  217. package/lib/messageBox/list.js +2 -1
  218. package/lib/previousVersion/component.js +2 -1
  219. package/lib/previousVersion/style/index.less +1 -0
  220. package/lib/resourceModal/component.js +2 -1
  221. package/lib/resourceModal/components/MediaPreviewer/index.js +2 -1
  222. package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
  223. package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
  224. package/lib/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
  225. package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
  226. package/lib/resourceModal/components/MediaSelection/index.js +3 -2
  227. package/lib/resourceModal/script/filter.js +14 -0
  228. package/lib/selectAvatarList/component.js +78 -0
  229. package/lib/selectAvatarList/index.js +8 -0
  230. package/lib/selectAvatarList/style/css.js +2 -0
  231. package/lib/selectAvatarList/style/index.css +4 -0
  232. package/lib/selectAvatarList/style/index.js +2 -0
  233. package/lib/selectAvatarList/style/index.less +4 -0
  234. package/lib/selectGategory/component.js +4 -11
  235. package/lib/selectGategory/components/ColumnSelection/index.js +5 -1
  236. package/lib/uploadBefore/component.js +82 -0
  237. package/lib/uploadBefore/components/UploadBefore.js +229 -0
  238. package/lib/uploadBefore/components/UploadForClick.js +29 -0
  239. package/lib/uploadBefore/index.js +8 -0
  240. package/lib/uploadBefore/script/api.js +32 -0
  241. package/lib/uploadBefore/script/fileTypeAdapter.js +53 -0
  242. package/lib/uploadBefore/script/fileUpload.js +42 -0
  243. package/lib/uploadBefore/script/uploadHooks.js +36 -0
  244. package/lib/uploadBefore/style/css.js +2 -0
  245. package/lib/uploadBefore/style/index.css +111 -0
  246. package/lib/uploadBefore/style/index.js +2 -0
  247. package/lib/uploadBefore/style/index.less +144 -0
  248. package/lib/uploadStep/component.js +138 -3
  249. package/lib/uploadStep/style/index.css +113 -0
  250. package/lib/uploadStep/style/index.less +148 -0
  251. package/lib/userDirector/component.js +201 -0
  252. package/lib/userDirector/index.js +8 -0
  253. package/lib/userDirector/script/api.js +38 -0
  254. package/lib/userDirector/style/css.js +2 -0
  255. package/lib/userDirector/style/index.css +8 -0
  256. package/lib/userDirector/style/index.js +2 -0
  257. package/lib/userDirector/style/index.less +8 -0
  258. package/lib/utils/doc.js +59 -0
  259. package/lib/utils/index.js +23 -0
  260. package/lib/utils/tusUpload.js +75 -0
  261. package/package.json +8 -1
package/es/index.d.ts CHANGED
@@ -8,3 +8,9 @@ export { default as contentModal } from './contentModal';
8
8
  export { default as resourceModal } from './resourceModal';
9
9
  export { default as previousVersion } from './previousVersion';
10
10
  export { default as selectGategory } from './selectGategory';
11
+ export { default as uploadBefore } from './uploadBefore';
12
+ export { default as contentDetailList } from './contentDetailList';
13
+ export { default as emptyData } from './emptyData';
14
+ export { default as mediaFilter } from './mediaFilter';
15
+ export { default as selectAvatarList } from './selectAvatarList';
16
+ export { default as userDirector } from './userDirector';
package/es/index.js CHANGED
@@ -8,3 +8,9 @@ export { default as contentModal } from "./contentModal/index.js";
8
8
  export { default as resourceModal } from "./resourceModal/index.js";
9
9
  export { default as previousVersion } from "./previousVersion/index.js";
10
10
  export { default as selectGategory } from "./selectGategory/index.js";
11
+ export { default as uploadBefore } from "./uploadBefore/index.js";
12
+ export { default as contentDetailList } from "./contentDetailList/index.js";
13
+ export { default as emptyData } from "./emptyData/index.js";
14
+ export { default as mediaFilter } from "./mediaFilter/index.js";
15
+ export { default as selectAvatarList } from "./selectAvatarList/index.js";
16
+ export { default as userDirector } from "./userDirector/index.js";
package/es/index.less CHANGED
@@ -8,3 +8,9 @@
8
8
  @import './resourceModal/style/index.less';
9
9
  @import './previousVersion/style/index.less';
10
10
  @import './selectGategory/style/index.less';
11
+ @import './uploadBefore/style/index.less';
12
+ @import './contentDetailList/style/index.less';
13
+ @import './emptyData/style/index.less';
14
+ @import './mediaFilter/style/index.less';
15
+ @import './selectAvatarList/style/index.less';
16
+ @import './userDirector/style/index.less';
File without changes
@@ -0,0 +1,41 @@
1
+ import { defineComponent, openBlock, createElementBlock, createBlock, createCommentVNode } from "vue";
2
+ import { DEFAULT_BASE_API } from "../config.js";
3
+ import _sfc_main$1 from "./components/DocFilter.js";
4
+ import MedFilter from "./components/MediaFilter.js";
5
+ import MpaFilter from "./components/MpAccountFilter.js";
6
+ import MpcFilter from "./components/MpContentFilter.js";
7
+ const _hoisted_1 = { class: "filter-wrp" };
8
+ const _sfc_main = defineComponent({
9
+ ...{ name: "mediaFilter" },
10
+ __name: "component",
11
+ props: {
12
+ filterType: {},
13
+ docFilterKeys: {},
14
+ docFilterType: {},
15
+ BASE_API: {}
16
+ },
17
+ emits: ["search", "change"],
18
+ setup(__props, { emit: __emit }) {
19
+ const props = __props;
20
+ const emits = __emit;
21
+ props.BASE_API || DEFAULT_BASE_API;
22
+ function handleFilterChange(params) {
23
+ emits("change", params);
24
+ }
25
+ function handleFilterSearch(params) {
26
+ emits("search", params);
27
+ }
28
+ return (_ctx, _cache) => {
29
+ return openBlock(), createElementBlock("div", _hoisted_1, [
30
+ _ctx.filterType === "DOC" ? (openBlock(), createBlock(_sfc_main$1, {
31
+ key: 0,
32
+ "filter-keys": _ctx.docFilterKeys,
33
+ "filter-type": _ctx.docFilterType,
34
+ onSearch: handleFilterSearch,
35
+ onChange: handleFilterChange
36
+ }, null, 8, ["filter-keys", "filter-type"])) : _ctx.filterType === "MEDIA" ? (openBlock(), createBlock(MedFilter, { key: 1 })) : _ctx.filterType === "MP_ACOUNT" ? (openBlock(), createBlock(MpaFilter, { key: 2 })) : _ctx.filterType === "MP_CONTENT" ? (openBlock(), createBlock(MpcFilter, { key: 3 })) : createCommentVNode("v-if", true)
37
+ ]);
38
+ };
39
+ }
40
+ });
41
+ export { _sfc_main as default };
File without changes
@@ -0,0 +1,248 @@
1
+ import { defineComponent, ref, computed, watch, openBlock, createBlock, withCtx, createVNode, unref, createElementBlock, Fragment, renderList, createCommentVNode, withModifiers, createTextVNode, normalizeClass, createElementVNode, toDisplayString, renderSlot } from "vue";
2
+ import { InputSearch, RangePicker, Select, Option, Button, Dropdown, Dgroup, Doption } from "@arco-design/web-vue";
3
+ import { IconRefresh, IconCheck } from "@arco-design/web-vue/es/icon";
4
+ import { typeOptions, stateOptions, docThumbTypeMap } from "../../utils/doc.js";
5
+ import { useHighLevelSearch, getProvalTypeOptions, getApprovalStateOptions } from "../script/optionsGetter.js";
6
+ import _sfc_main$1 from "./FilterGroup.js";
7
+ import _sfc_main$2 from "./FilterItem.js";
8
+ const _hoisted_1 = { class: "label" };
9
+ const _hoisted_2 = { class: "label" };
10
+ const _sfc_main = defineComponent({
11
+ __name: "DocFilter",
12
+ props: {
13
+ filterKeys: { default: () => ["keywords", "doc_type"] },
14
+ filterType: { default: "APV" }
15
+ },
16
+ emits: ["search", "change"],
17
+ setup(__props, { emit: __emit }) {
18
+ const props = __props;
19
+ const emits = __emit;
20
+ const { highLevelSearchOptions, showHighLevelSearch, sortOptions } = useHighLevelSearch(props.filterType);
21
+ const filter = ref({
22
+ keywords: "",
23
+ doc_type: "",
24
+ doc_state: "",
25
+ doc_thumb: "",
26
+ pub_time: "",
27
+ doc_banner: "",
28
+ apv_state: "",
29
+ apv_type: "",
30
+ order: highLevelSearchOptions.value.length > 0 ? highLevelSearchOptions.value[0].value : "",
31
+ sort: -1,
32
+ meta: {}
33
+ });
34
+ if (props.filterType === "MINE") {
35
+ choseMeta(filter.value.order);
36
+ }
37
+ const bannerOptions = [
38
+ { value: "", label: "\u5168\u90E8" },
39
+ { value: "0", label: "\u65E0\u72EC\u7ACB\u8F6E\u64AD" },
40
+ { value: "1", label: "\u6709\u72EC\u7ACB\u8F6E\u64AD" }
41
+ ];
42
+ const selectorsLeft = [
43
+ { key: "doc_type", label: "\u7A3F\u4EF6\u7C7B\u578B", pos: "left", options: typeOptions() },
44
+ { key: "doc_state", label: "\u7A3F\u4EF6\u72B6\u6001", pos: "left", options: stateOptions() },
45
+ { key: "doc_thumb", label: "\u5C01\u9762\u7C7B\u578B", pos: "left", options: docThumbTypeMap() },
46
+ { key: "pub_time", label: "\u53D1\u5E03\u65F6\u95F4", pos: "left", isDatePicker: true },
47
+ { key: "doc_banner", label: "\u72EC\u7ACB\u8F6E\u64AD", pos: "left", options: bannerOptions },
48
+ { key: "apv_type", label: "\u5BA1\u6279\u7C7B\u578B", pos: "left", options: getProvalTypeOptions() },
49
+ { key: "apv_state", label: "\u5BA1\u6838\u72B6\u6001", pos: "left", options: getApprovalStateOptions() }
50
+ ];
51
+ const calculateRules = computed(() => {
52
+ return selectorsLeft.filter((item) => {
53
+ if (props.filterKeys.includes(item.key))
54
+ return true;
55
+ return false;
56
+ });
57
+ });
58
+ const showReset = computed(() => {
59
+ return calculateRules.value.some((item) => {
60
+ return filter.value[item.key] !== "";
61
+ });
62
+ });
63
+ function reset() {
64
+ const excludeColumn = ["order", "sort", "meta", "keywords"];
65
+ Object.keys(filter.value).forEach((key) => {
66
+ if (excludeColumn.includes(key))
67
+ return;
68
+ filter.value[key] = "";
69
+ });
70
+ }
71
+ function handleSearch() {
72
+ emits("search", filter.value);
73
+ }
74
+ watch(
75
+ () => filter.value,
76
+ (n) => {
77
+ const ret = {};
78
+ calculateRules.value.forEach((item) => {
79
+ ret[item.key] = n[item.key];
80
+ });
81
+ ret.keywords = n.keywords;
82
+ ret.highSearch = {
83
+ order: n.order,
84
+ sort: n.sort,
85
+ meta: n.meta
86
+ };
87
+ emits("change", ret);
88
+ },
89
+ { deep: true }
90
+ );
91
+ const currentChose = computed(() => {
92
+ return highLevelSearchOptions.value.find(
93
+ (item) => item.value === filter.value.order
94
+ );
95
+ });
96
+ function choseOrder(e) {
97
+ filter.value.order = e;
98
+ if (props.filterType === "MINE")
99
+ choseMeta(e);
100
+ }
101
+ function choseMeta(e) {
102
+ const v = highLevelSearchOptions.value.find((item) => item.value === e);
103
+ if (!v)
104
+ return;
105
+ filter.value.meta = {
106
+ from: `${v.key}_from`,
107
+ to: `${v.key}_to`
108
+ };
109
+ }
110
+ function choseSort(e) {
111
+ filter.value.sort = e;
112
+ }
113
+ return (_ctx, _cache) => {
114
+ return openBlock(), createBlock(_sfc_main$1, null, {
115
+ search: withCtx(() => [
116
+ createVNode(unref(InputSearch), {
117
+ modelValue: filter.value.keywords,
118
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.keywords = $event),
119
+ "allow-clear": "",
120
+ size: "medium",
121
+ placeholder: "\u8BF7\u8F93\u5165\u6807\u9898\u5173\u952E\u5B57",
122
+ onSearch: handleSearch
123
+ }, null, 8, ["modelValue"])
124
+ ]),
125
+ left: withCtx(() => [
126
+ (openBlock(true), createElementBlock(Fragment, null, renderList(calculateRules.value, (item) => {
127
+ return openBlock(), createBlock(_sfc_main$2, {
128
+ key: item.key,
129
+ value: filter.value[item.key],
130
+ "onUpdate:value": ($event) => filter.value[item.key] = $event,
131
+ label: item.label,
132
+ "date-picker": !!item.isDatePicker,
133
+ options: item.options
134
+ }, {
135
+ default: withCtx(() => [
136
+ createCommentVNode(" \u65E5\u671F\u9009\u62E9\u5668 "),
137
+ item.isDatePicker ? (openBlock(), createBlock(unref(RangePicker), {
138
+ key: 0,
139
+ modelValue: filter.value[item.key],
140
+ "onUpdate:modelValue": ($event) => filter.value[item.key] = $event,
141
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
142
+ }, ["stop"]))
143
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
144
+ createCommentVNode(" \u666E\u901A\u9009\u62E9\u5668 "),
145
+ createVNode(unref(Select), {
146
+ modelValue: filter.value[item.key],
147
+ "onUpdate:modelValue": ($event) => filter.value[item.key] = $event,
148
+ bordered: false,
149
+ style: { "width": "120px" },
150
+ onClick: _cache[2] || (_cache[2] = withModifiers(() => {
151
+ }, ["stop"]))
152
+ }, {
153
+ default: withCtx(() => [
154
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.options, (opt) => {
155
+ return openBlock(), createBlock(unref(Option), {
156
+ key: opt.value,
157
+ label: opt.label,
158
+ value: opt.value
159
+ }, null, 8, ["label", "value"]);
160
+ }), 128))
161
+ ]),
162
+ _: 2
163
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
164
+ ], 64))
165
+ ]),
166
+ _: 2
167
+ }, 1032, ["value", "onUpdate:value", "label", "date-picker", "options"]);
168
+ }), 128)),
169
+ createCommentVNode(" \u91CD\u7F6E "),
170
+ showReset.value ? (openBlock(), createBlock(unref(Button), {
171
+ key: 0,
172
+ type: "text",
173
+ onClick: reset
174
+ }, {
175
+ icon: withCtx(() => [
176
+ createVNode(unref(IconRefresh))
177
+ ]),
178
+ default: withCtx(() => [
179
+ createTextVNode(" \u91CD\u7F6E ")
180
+ ]),
181
+ _: 1
182
+ })) : createCommentVNode("v-if", true)
183
+ ]),
184
+ right: withCtx(() => [
185
+ unref(showHighLevelSearch) ? (openBlock(), createBlock(unref(Dropdown), { key: 0 }, {
186
+ content: withCtx(() => [
187
+ createVNode(unref(Dgroup), { title: "order" }, {
188
+ default: withCtx(() => [
189
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(highLevelSearchOptions), (item) => {
190
+ return openBlock(), createBlock(unref(Doption), {
191
+ key: item.value,
192
+ class: normalizeClass({ active: item.value === filter.value.order, dop: true }),
193
+ onClick: ($event) => choseOrder(item.value)
194
+ }, {
195
+ default: withCtx(() => [
196
+ createElementVNode("span", _hoisted_1, [
197
+ createTextVNode(toDisplayString(item.label) + " ", 1),
198
+ item.value === filter.value.order ? (openBlock(), createBlock(unref(IconCheck), { key: 0 })) : createCommentVNode("v-if", true)
199
+ ])
200
+ ]),
201
+ _: 2
202
+ }, 1032, ["class", "onClick"]);
203
+ }), 128))
204
+ ]),
205
+ _: 1
206
+ }),
207
+ createVNode(unref(Dgroup), { title: "sort" }, {
208
+ default: withCtx(() => [
209
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortOptions), (item) => {
210
+ return openBlock(), createBlock(unref(Doption), {
211
+ key: item.value,
212
+ class: normalizeClass({ active: item.value === filter.value.sort, dop: true }),
213
+ onClick: ($event) => choseSort(item.value)
214
+ }, {
215
+ default: withCtx(() => [
216
+ createElementVNode("span", _hoisted_2, [
217
+ createTextVNode(toDisplayString(item.label) + " ", 1),
218
+ item.value === filter.value.sort ? (openBlock(), createBlock(unref(IconCheck), { key: 0 })) : createCommentVNode("v-if", true)
219
+ ])
220
+ ]),
221
+ _: 2
222
+ }, 1032, ["class", "onClick"]);
223
+ }), 128))
224
+ ]),
225
+ _: 1
226
+ })
227
+ ]),
228
+ default: withCtx(() => [
229
+ createVNode(unref(Button), { text: "text" }, {
230
+ default: withCtx(() => {
231
+ var _a;
232
+ return [
233
+ createTextVNode(toDisplayString((_a = currentChose.value) == null ? void 0 : _a.label), 1)
234
+ ];
235
+ }),
236
+ _: 1
237
+ })
238
+ ]),
239
+ _: 1
240
+ })) : createCommentVNode("v-if", true),
241
+ renderSlot(_ctx.$slots, "right")
242
+ ]),
243
+ _: 3
244
+ });
245
+ };
246
+ }
247
+ });
248
+ export { _sfc_main as default };
File without changes
@@ -0,0 +1,184 @@
1
+ import { defineComponent, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, renderSlot, withDirectives, createVNode, unref, withModifiers, withCtx, createTextVNode, vShow } from "vue";
2
+ import { Button } from "@arco-design/web-vue";
3
+ import { IconCaretDown } from "@arco-design/web-vue/es/icon";
4
+ import { createPopper } from "@popperjs/core";
5
+ const _hoisted_1 = { class: "filter-view-container" };
6
+ const _hoisted_2 = { class: "filter-search" };
7
+ const _hoisted_3 = { class: "more-btn" };
8
+ const _hoisted_4 = { class: "right-prefix" };
9
+ const _hoisted_5 = { class: "filter-content" };
10
+ const _hoisted_6 = { class: "right" };
11
+ const _hoisted_7 = {
12
+ ref: "tempNode",
13
+ style: { "display": "none" }
14
+ };
15
+ const _sfc_main = defineComponent({
16
+ __name: "FilterGroup",
17
+ setup(__props) {
18
+ const documentWidth = ref(0);
19
+ const overflowWidth = ref(0);
20
+ watch(
21
+ () => documentWidth.value,
22
+ (n) => checkOverflow()
23
+ );
24
+ watch(
25
+ () => overflowWidth.value,
26
+ (n) => setPannelItem()
27
+ );
28
+ const initDocWidthListener = function() {
29
+ window.onresize = (() => {
30
+ return () => {
31
+ documentWidth.value = document.body.clientWidth;
32
+ };
33
+ })();
34
+ };
35
+ const filterItemsRef = ref();
36
+ const moreBtnRef = ref();
37
+ const dpPannelRef = ref();
38
+ const initPopper = function() {
39
+ createPopper(moreBtnRef.value, dpPannelRef.value, {
40
+ placement: "bottom-start",
41
+ modifiers: [{ name: "offset", options: { offset: [-40, 10] } }]
42
+ });
43
+ };
44
+ const popperShowFlag = ref(false);
45
+ function showPopper() {
46
+ popperShowFlag.value = true;
47
+ window.onclick = hidePopper;
48
+ }
49
+ function hidePopper() {
50
+ popperShowFlag.value = false;
51
+ }
52
+ const itemNodeArr = ref([]);
53
+ const itemWidthArr = ref([]);
54
+ const itemArr = ref([]);
55
+ function checkOverflow() {
56
+ if (!filterItemsRef.value)
57
+ return;
58
+ const parent = filterItemsRef.value.parentNode;
59
+ if (!itemNodeArr.value.length) {
60
+ itemNodeArr.value = mapNodes(filterItemsRef.value.childNodes);
61
+ itemWidthArr.value = itemNodeArr.value.map((node) => node.clientWidth + 10);
62
+ itemArr.value = itemWidthArr.value.map((_, idx) => idx);
63
+ }
64
+ const parentWidth = parent.clientWidth;
65
+ const leftWidth = getArrWidth(itemWidthArr.value);
66
+ const rightWidth = parent.childNodes[parent.childNodes.length - 1].clientWidth;
67
+ overflowWidth.value = leftWidth + rightWidth - parentWidth;
68
+ }
69
+ function mapNodes(nodes) {
70
+ const nodeArr = [];
71
+ for (let i = 0; i < nodes.length; i++) {
72
+ const element = nodes[i];
73
+ nodeArr.push(element);
74
+ }
75
+ return nodeArr.filter((item) => item.clientWidth);
76
+ }
77
+ function getArrWidth(arr) {
78
+ return arr.reduce((prev, cur) => prev + cur, 0);
79
+ }
80
+ const pannelArray = ref("");
81
+ watch(
82
+ () => pannelArray.value,
83
+ (n, o) => refreshPannel(n, o)
84
+ );
85
+ function refreshPannel(newStr, oldStr) {
86
+ const nArr = newStr ? newStr.split(",") : [];
87
+ const oArr = oldStr ? oldStr.split(",") : [];
88
+ if (nArr.length && nArr.length > oArr.length) {
89
+ diff(nArr, oArr).forEach((index) => inNode(parseInt(index, 10)));
90
+ } else if (nArr.length >= 0 && nArr.length < oArr.length) {
91
+ diff(oArr, nArr).forEach((index) => outNode(parseInt(index, 10)));
92
+ }
93
+ }
94
+ const diff = (arr1, arr2) => {
95
+ const diff2 = [];
96
+ for (let i = 0; i < arr1.length; i++) {
97
+ const item = arr1[i];
98
+ if (!arr2.includes(item))
99
+ diff2.push(item);
100
+ }
101
+ return diff2;
102
+ };
103
+ function inNode(index) {
104
+ var _a, _b, _c;
105
+ const node = mapNodes((_a = filterItemsRef.value) == null ? void 0 : _a.childNodes)[index];
106
+ const temp = document.createElement("div");
107
+ temp.style.width = `${itemWidthArr.value[index]}px`;
108
+ temp.style.position = "absolute";
109
+ temp.style.left = `${50}px`;
110
+ (_b = filterItemsRef.value) == null ? void 0 : _b.replaceChild(temp, node);
111
+ (_c = dpPannelRef.value) == null ? void 0 : _c.appendChild(node);
112
+ }
113
+ function outNode(index) {
114
+ var _a;
115
+ const node = itemNodeArr.value[index];
116
+ (_a = filterItemsRef.value) == null ? void 0 : _a.replaceChild(
117
+ node,
118
+ mapNodes(filterItemsRef.value.childNodes)[index]
119
+ );
120
+ }
121
+ function setPannelItem() {
122
+ let inPannelNum = 0;
123
+ if (overflowWidth.value > 0) {
124
+ const avgWidth = 120;
125
+ inPannelNum = Math.ceil((overflowWidth.value + 200) / avgWidth);
126
+ }
127
+ pannelArray.value = itemArr.value.slice(0, inPannelNum).join(",");
128
+ }
129
+ onMounted(() => {
130
+ initDocWidthListener();
131
+ initPopper();
132
+ setTimeout(() => checkOverflow());
133
+ });
134
+ return (_ctx, _cache) => {
135
+ return openBlock(), createElementBlock("div", _hoisted_1, [
136
+ createElementVNode("div", _hoisted_2, [
137
+ renderSlot(_ctx.$slots, "search")
138
+ ]),
139
+ createElementVNode("div", _hoisted_3, [
140
+ createElementVNode("div", {
141
+ ref_key: "moreBtnRef",
142
+ ref: moreBtnRef
143
+ }, [
144
+ withDirectives(createVNode(unref(Button), {
145
+ onClick: withModifiers(showPopper, ["stop"])
146
+ }, {
147
+ default: withCtx(() => [
148
+ createElementVNode("span", _hoisted_4, [
149
+ createTextVNode(" \u66F4\u591A\u7B5B\u9009 "),
150
+ createVNode(unref(IconCaretDown))
151
+ ])
152
+ ]),
153
+ _: 1
154
+ }, 8, ["onClick"]), [
155
+ [vShow, pannelArray.value]
156
+ ])
157
+ ], 512),
158
+ withDirectives(createElementVNode("div", {
159
+ id: "dpPannelRef",
160
+ ref_key: "dpPannelRef",
161
+ ref: dpPannelRef,
162
+ class: "filter-pannel"
163
+ }, null, 512), [
164
+ [vShow, popperShowFlag.value]
165
+ ])
166
+ ]),
167
+ createElementVNode("div", _hoisted_5, [
168
+ createElementVNode("div", {
169
+ ref_key: "filterItemsRef",
170
+ ref: filterItemsRef,
171
+ class: "left"
172
+ }, [
173
+ renderSlot(_ctx.$slots, "left")
174
+ ], 512),
175
+ createElementVNode("div", _hoisted_6, [
176
+ renderSlot(_ctx.$slots, "right")
177
+ ])
178
+ ]),
179
+ createElementVNode("div", _hoisted_7, null, 512)
180
+ ]);
181
+ };
182
+ }
183
+ });
184
+ export { _sfc_main as default };
File without changes
@@ -0,0 +1,113 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createCommentVNode, withDirectives, createBlock, createTextVNode, toDisplayString, vShow, renderSlot } from "vue";
2
+ import { ButtonGroup, Button } from "@arco-design/web-vue";
3
+ import { IconCaretDown } from "@arco-design/web-vue/es/icon";
4
+ const _hoisted_1 = { class: "filter-item-view" };
5
+ const _hoisted_2 = { class: "show-view" };
6
+ const _hoisted_3 = { class: "right-prefix" };
7
+ const _hoisted_4 = { class: "right-prefix" };
8
+ const _hoisted_5 = { class: "right-prefix" };
9
+ const _hoisted_6 = { class: "select-view" };
10
+ const _sfc_main = defineComponent({
11
+ __name: "FilterItem",
12
+ props: {
13
+ value: { default: "" },
14
+ allValue: { default: "" },
15
+ label: { default: "" },
16
+ options: { default: () => [] },
17
+ icon: { default: "" },
18
+ rightIcon: { default: "" },
19
+ datePicker: { type: Boolean, default: false },
20
+ backgroundColor: { default: "none" }
21
+ },
22
+ setup(__props) {
23
+ const props = __props;
24
+ const hasValue = computed(() => {
25
+ if (props.allValue !== "" && props.value === props.allValue)
26
+ return false;
27
+ if (Array.isArray(props.value))
28
+ return props.value.length > 0;
29
+ return props.value;
30
+ });
31
+ const valueItem = computed(() => {
32
+ return props.options.find((item) => item.value === props.value);
33
+ });
34
+ const arrValue = computed(() => {
35
+ if (!Array.isArray(props.value))
36
+ return "";
37
+ return props.value.map((item) => {
38
+ if (props.datePicker)
39
+ return timeFilter(item);
40
+ return item.alias || item.title || item.label;
41
+ }).join(" / ");
42
+ });
43
+ function timeFilter(timeValue) {
44
+ if (!timeValue)
45
+ return "";
46
+ if (typeof timeValue === "number" && String(timeValue).length === 10) {
47
+ timeValue *= 1e3;
48
+ }
49
+ const date = new Date(timeValue);
50
+ return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
51
+ }
52
+ return (_ctx, _cache) => {
53
+ return openBlock(), createElementBlock("div", _hoisted_1, [
54
+ createElementVNode("div", _hoisted_2, [
55
+ createVNode(unref(ButtonGroup), {
56
+ type: "primary",
57
+ size: "medium"
58
+ }, {
59
+ default: withCtx(() => [
60
+ createCommentVNode(" \u666E\u901A\u503C "),
61
+ valueItem.value ? withDirectives((openBlock(), createBlock(unref(Button), {
62
+ key: 0,
63
+ class: "hasvalue-btn"
64
+ }, {
65
+ default: withCtx(() => [
66
+ createElementVNode("span", _hoisted_3, [
67
+ createTextVNode(toDisplayString(valueItem.value.label) + " ", 1),
68
+ createVNode(unref(IconCaretDown))
69
+ ])
70
+ ]),
71
+ _: 1
72
+ }, 512)), [
73
+ [vShow, hasValue.value]
74
+ ]) : createCommentVNode("v-if", true),
75
+ createCommentVNode(" \u6570\u7EC4\u503C "),
76
+ arrValue.value ? withDirectives((openBlock(), createBlock(unref(Button), {
77
+ key: 1,
78
+ class: "hasvalue-btn"
79
+ }, {
80
+ default: withCtx(() => [
81
+ createElementVNode("span", _hoisted_4, [
82
+ createTextVNode(toDisplayString(arrValue.value) + " ", 1),
83
+ createVNode(unref(IconCaretDown))
84
+ ])
85
+ ]),
86
+ _: 1
87
+ }, 512)), [
88
+ [vShow, hasValue.value]
89
+ ]) : createCommentVNode("v-if", true),
90
+ createCommentVNode(" \u672A\u8FDB\u884C\u9009\u62E9\u65F6\u5C55\u793A "),
91
+ withDirectives(createVNode(unref(Button), { type: "secondary" }, {
92
+ default: withCtx(() => [
93
+ createElementVNode("span", _hoisted_5, [
94
+ createTextVNode(toDisplayString(_ctx.label) + " ", 1),
95
+ createVNode(unref(IconCaretDown))
96
+ ])
97
+ ]),
98
+ _: 1
99
+ }, 512), [
100
+ [vShow, !hasValue.value]
101
+ ])
102
+ ]),
103
+ _: 1
104
+ })
105
+ ]),
106
+ createElementVNode("div", _hoisted_6, [
107
+ renderSlot(_ctx.$slots, "default")
108
+ ])
109
+ ]);
110
+ };
111
+ }
112
+ });
113
+ export { _sfc_main as default };
@@ -0,0 +1,8 @@
1
+ import { openBlock, createElementBlock } from "vue";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = {};
4
+ function _sfc_render(_ctx, _cache) {
5
+ return openBlock(), createElementBlock("div", null, " \u7D20\u6750\u7B5B\u9009\u7EC4\u4EF6 ");
6
+ }
7
+ var MedFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
8
+ export { MedFilter as default };
@@ -0,0 +1,8 @@
1
+ import { openBlock, createElementBlock } from "vue";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = {};
4
+ function _sfc_render(_ctx, _cache) {
5
+ return openBlock(), createElementBlock("div", null, " \u516C\u4F17\u53F7\u8D26\u53F7\u7B5B\u9009\u7EC4\u4EF6 ");
6
+ }
7
+ var MpaFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
8
+ export { MpaFilter as default };
@@ -0,0 +1,8 @@
1
+ import { openBlock, createElementBlock } from "vue";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = {};
4
+ function _sfc_render(_ctx, _cache) {
5
+ return openBlock(), createElementBlock("div", null, " \u516C\u4F17\u53F7\u5185\u5BB9\u7B5B\u9009\u7EC4\u4EF6 ");
6
+ }
7
+ var MpcFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
8
+ export { MpcFilter as default };
@@ -0,0 +1,2 @@
1
+ declare const mediaFilter: any;
2
+ export default mediaFilter;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./component.js";
2
+ const mediaFilter = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component(_sfc_main.name, _sfc_main);
5
+ }
6
+ });
7
+ export { mediaFilter as default };