@cmstops/pro-compo 0.1.3 → 0.1.5

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 (132) hide show
  1. package/dist/index.css +120 -4
  2. package/dist/index.min.css +1 -1
  3. package/es/appCenter/component.js +2 -1
  4. package/es/config.d.ts +2 -0
  5. package/es/config.js +3 -0
  6. package/es/contentModal/component.d.ts +0 -0
  7. package/es/contentModal/component.js +175 -0
  8. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  9. package/es/contentModal/components/CompoList/CompoFilter/index.js +103 -0
  10. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  11. package/es/contentModal/components/CompoList/index.js +234 -0
  12. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  13. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +44 -0
  14. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  15. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +101 -0
  16. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  17. package/es/contentModal/components/ViewAllColumn/index.js +277 -0
  18. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  19. package/es/contentModal/components/storeBox/index.js +107 -0
  20. package/es/contentModal/index.d.ts +2 -0
  21. package/es/contentModal/index.js +7 -0
  22. package/es/contentModal/script/api.d.ts +10 -0
  23. package/es/contentModal/script/api.js +45 -0
  24. package/es/contentModal/style/MediaFilter.less +8 -0
  25. package/es/contentModal/style/ViewAllColumn.less +33 -0
  26. package/es/contentModal/style/columnTree.less +9 -0
  27. package/es/contentModal/style/index.css +107 -0
  28. package/es/contentModal/style/index.less +19 -0
  29. package/es/contentModal/style/storeBox.less +45 -0
  30. package/es/hooks/batch.d.ts +8 -0
  31. package/es/hooks/batch.js +26 -0
  32. package/es/hooks/user.d.ts +11 -0
  33. package/es/hooks/user.js +46 -0
  34. package/es/index.css +120 -4
  35. package/es/index.d.ts +4 -1
  36. package/es/index.js +4 -1
  37. package/es/index.less +4 -1
  38. package/es/messageBox/component.js +2 -1
  39. package/es/messageBox/list.js +4 -4
  40. package/es/resourceModal/component.d.ts +0 -0
  41. package/es/resourceModal/component.js +14 -0
  42. package/es/resourceModal/index.d.ts +2 -0
  43. package/es/resourceModal/index.js +7 -0
  44. package/es/resourceModal/style/css.js +1 -0
  45. package/es/resourceModal/style/index.d.ts +1 -0
  46. package/es/resourceModal/style/index.js +1 -0
  47. package/es/style.css +5 -0
  48. package/es/typeIcons/component.d.ts +0 -0
  49. package/es/typeIcons/component.js +62 -0
  50. package/es/typeIcons/index.d.ts +2 -0
  51. package/es/typeIcons/index.js +7 -0
  52. package/es/typeIcons/style/css.js +1 -0
  53. package/es/typeIcons/style/index.css +5 -0
  54. package/es/typeIcons/style/index.d.ts +1 -0
  55. package/es/typeIcons/style/index.js +1 -0
  56. package/es/typeIcons/style/index.less +5 -0
  57. package/es/uploadStep/component.d.ts +0 -0
  58. package/es/uploadStep/component.js +14 -0
  59. package/es/uploadStep/index.d.ts +2 -0
  60. package/es/uploadStep/index.js +7 -0
  61. package/es/uploadStep/style/css.js +1 -0
  62. package/es/uploadStep/style/index.d.ts +1 -0
  63. package/es/uploadStep/style/index.js +1 -0
  64. package/es/userAvater/component.js +3 -3
  65. package/es/utils/index.d.ts +1 -0
  66. package/es/utils/index.js +7 -0
  67. package/es/utils/request.js +3 -4
  68. package/es/utils/typeMap.d.ts +116 -0
  69. package/es/utils/typeMap.js +22 -0
  70. package/lib/appCenter/component.js +2 -1
  71. package/lib/config.js +6 -0
  72. package/lib/contentModal/component.js +176 -0
  73. package/lib/contentModal/components/CompoList/CompoFilter/index.js +104 -0
  74. package/lib/contentModal/components/CompoList/index.js +235 -0
  75. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +45 -0
  76. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +102 -0
  77. package/lib/contentModal/components/ViewAllColumn/index.js +278 -0
  78. package/lib/contentModal/components/storeBox/index.js +108 -0
  79. package/lib/contentModal/index.js +8 -0
  80. package/lib/contentModal/script/api.js +52 -0
  81. package/lib/contentModal/style/MediaFilter.less +8 -0
  82. package/lib/contentModal/style/ViewAllColumn.less +33 -0
  83. package/lib/contentModal/style/columnTree.less +9 -0
  84. package/lib/contentModal/style/index.css +107 -0
  85. package/lib/contentModal/style/index.less +19 -0
  86. package/lib/contentModal/style/storeBox.less +45 -0
  87. package/lib/hooks/batch.js +27 -0
  88. package/lib/hooks/user.js +49 -0
  89. package/lib/index.css +120 -4
  90. package/lib/index.js +14 -8
  91. package/lib/index.less +4 -1
  92. package/lib/messageBox/component.js +2 -1
  93. package/lib/messageBox/list.js +4 -4
  94. package/lib/resourceModal/component.js +15 -0
  95. package/lib/resourceModal/index.js +8 -0
  96. package/lib/resourceModal/style/css.js +2 -0
  97. package/lib/resourceModal/style/index.css +4 -0
  98. package/lib/resourceModal/style/index.js +2 -0
  99. package/lib/resourceModal/style/index.less +4 -0
  100. package/lib/typeIcons/component.js +63 -0
  101. package/lib/{button → typeIcons}/index.js +2 -2
  102. package/lib/typeIcons/style/css.js +2 -0
  103. package/lib/typeIcons/style/index.css +5 -0
  104. package/lib/typeIcons/style/index.js +2 -0
  105. package/lib/typeIcons/style/index.less +5 -0
  106. package/lib/uploadStep/component.js +15 -0
  107. package/lib/uploadStep/index.js +8 -0
  108. package/lib/uploadStep/style/css.js +2 -0
  109. package/lib/uploadStep/style/index.css +4 -0
  110. package/lib/uploadStep/style/index.js +2 -0
  111. package/lib/uploadStep/style/index.less +4 -0
  112. package/lib/userAvater/component.js +3 -3
  113. package/lib/utils/index.js +13 -0
  114. package/lib/utils/request.js +3 -4
  115. package/lib/utils/typeMap.js +25 -0
  116. package/package.json +4 -2
  117. package/es/_virtual/plugin-vue_export-helper.js +0 -7
  118. package/es/button/component.d.ts +0 -24
  119. package/es/button/component.js +0 -43
  120. package/es/button/index.d.ts +0 -103
  121. package/es/button/index.js +0 -7
  122. package/lib/_virtual/plugin-vue_export-helper.js +0 -8
  123. package/lib/button/component.js +0 -44
  124. /package/es/{button → contentModal}/style/css.js +0 -0
  125. /package/es/{button → contentModal}/style/index.d.ts +0 -0
  126. /package/es/{button → contentModal}/style/index.js +0 -0
  127. /package/es/{button → resourceModal}/style/index.css +0 -0
  128. /package/es/{button → resourceModal}/style/index.less +0 -0
  129. /package/{lib/button → es/uploadStep}/style/index.css +0 -0
  130. /package/{lib/button → es/uploadStep}/style/index.less +0 -0
  131. /package/lib/{button → contentModal}/style/css.js +0 -0
  132. /package/lib/{button → contentModal}/style/index.js +0 -0
@@ -52,10 +52,10 @@ const _sfc_main = defineComponent({
52
52
  const openApprovalDetail = (msg) => {
53
53
  console.log(msg);
54
54
  };
55
- const handleScroll = (event) => {
56
- event && event.stopPropagation();
57
- if (event.target) {
58
- const { scrollTop, scrollHeight, clientHeight } = event.target;
55
+ const handleScroll = (e) => {
56
+ e && e.stopPropagation();
57
+ if (e.target) {
58
+ const { scrollTop, scrollHeight, clientHeight } = e.target;
59
59
  if (scrollTop + clientHeight >= scrollHeight) {
60
60
  if (props.isLoadingMore === false && !props.isNorMore) {
61
61
  emits("loadMoreMsg", props.listType);
File without changes
@@ -0,0 +1,14 @@
1
+ import { defineComponent, openBlock, createElementBlock } from "vue";
2
+ const _sfc_main = defineComponent({
3
+ ...{ name: "resourceModal" },
4
+ __name: "component",
5
+ props: {
6
+ BASE_API: {}
7
+ },
8
+ setup(__props) {
9
+ return (_ctx, _cache) => {
10
+ return openBlock(), createElementBlock("div", null, "resourceModal");
11
+ };
12
+ }
13
+ });
14
+ export { _sfc_main as default };
@@ -0,0 +1,2 @@
1
+ declare const resourceModal: any;
2
+ export default resourceModal;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./component.js";
2
+ const resourceModal = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component(_sfc_main.name, _sfc_main);
5
+ }
6
+ });
7
+ export { resourceModal as default };
@@ -0,0 +1 @@
1
+ import "./index.css";
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import "./index.less";
package/es/style.css ADDED
@@ -0,0 +1,5 @@
1
+ .type-icons-container {
2
+ display: inline-block;
3
+ vertical-align: middle;
4
+ font-size: 18px;
5
+ }
File without changes
@@ -0,0 +1,62 @@
1
+ import { defineComponent, openBlock, createElementBlock, createCommentVNode, createBlock, unref, Fragment, createVNode } from "vue";
2
+ import { IconXinwen, IconShipin, IconYinyue, IconTuji, IconXiaoshipin, IconZhuanti, IconYinpinji, IconShipinji, IconH5, IconZhibo, IconTupian, IconGaojian } from "@arco-iconbox/vue-cmstop-icons";
3
+ const _hoisted_1 = { class: "type-icons-container" };
4
+ const _sfc_main = defineComponent({
5
+ ...{ name: "typeIcons" },
6
+ __name: "component",
7
+ props: {
8
+ type: {},
9
+ doc: { type: Boolean },
10
+ resource: { type: Boolean }
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ return (_ctx, _cache) => {
15
+ return openBlock(), createElementBlock("div", _hoisted_1, [
16
+ createCommentVNode("------------------------------- \u7A3F\u4EF6\u7C7B\u578B --------------------------------------"),
17
+ createCommentVNode(" \u65B0\u95FB "),
18
+ props.doc && props.type === "imagetext" ? (openBlock(), createBlock(unref(IconXinwen), { key: 0 })) : props.doc && props.type === "video" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
19
+ createCommentVNode(" \u89C6\u9891 "),
20
+ createVNode(unref(IconShipin))
21
+ ], 2112)) : props.doc && props.type === "audio" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
22
+ createCommentVNode(" \u97F3\u9891 "),
23
+ createVNode(unref(IconYinyue))
24
+ ], 2112)) : props.doc && props.type === "atlas" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
25
+ createCommentVNode(" \u56FE\u96C6 "),
26
+ createVNode(unref(IconTuji))
27
+ ], 2112)) : props.doc && props.type === "svideo" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
28
+ createCommentVNode(" \u5C0F\u89C6\u9891 "),
29
+ createVNode(unref(IconXiaoshipin))
30
+ ], 2112)) : props.doc && props.type === "special_v3" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
31
+ createCommentVNode(" \u4E13\u9898 "),
32
+ createVNode(unref(IconZhuanti))
33
+ ], 2112)) : props.doc && props.type === "audio_album" ? (openBlock(), createElementBlock(Fragment, { key: 6 }, [
34
+ createCommentVNode(" \u97F3\u9891\u96C6 "),
35
+ createVNode(unref(IconYinpinji))
36
+ ], 2112)) : props.doc && props.type === "video_album" ? (openBlock(), createElementBlock(Fragment, { key: 7 }, [
37
+ createCommentVNode(" \u89C6\u9891\u96C6 "),
38
+ createVNode(unref(IconShipinji))
39
+ ], 2112)) : props.doc && props.type === "h5" ? (openBlock(), createElementBlock(Fragment, { key: 8 }, [
40
+ createCommentVNode(" h5 "),
41
+ createVNode(unref(IconH5))
42
+ ], 2112)) : props.doc && props.type === "live" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
43
+ createCommentVNode(" \u76F4\u64AD "),
44
+ createVNode(unref(IconZhibo))
45
+ ], 2112)) : props.resource && props.type === "image" ? (openBlock(), createElementBlock(Fragment, { key: 10 }, [
46
+ createCommentVNode("------------------------------- \u7D20\u6750\u7C7B\u578B --------------------------------------"),
47
+ createCommentVNode(" \u56FE\u7247 "),
48
+ createVNode(unref(IconTupian))
49
+ ], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 11 }, [
50
+ createCommentVNode("------------------------------- \u5176\u4ED6\u7C7B\u578B --------------------------------------"),
51
+ createCommentVNode(" \u5FAE\u4FE1\u7A3F\u4EF6 "),
52
+ createCommentVNode(" <icon-weixingaojian /> "),
53
+ createCommentVNode(" \u8F6E\u535A\u56FE\u96C6 "),
54
+ createCommentVNode(" <icon-lunbotuji /> "),
55
+ createCommentVNode(" \u7A3F\u4EF6 "),
56
+ createVNode(unref(IconGaojian))
57
+ ], 2112))
58
+ ]);
59
+ };
60
+ }
61
+ });
62
+ export { _sfc_main as default };
@@ -0,0 +1,2 @@
1
+ declare const typeIcons: any;
2
+ export default typeIcons;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./component.js";
2
+ const typeIcons = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component(_sfc_main.name, _sfc_main);
5
+ }
6
+ });
7
+ export { typeIcons as default };
@@ -0,0 +1 @@
1
+ import "./index.css";
@@ -0,0 +1,5 @@
1
+ .type-icons-container {
2
+ display: inline-block;
3
+ vertical-align: middle;
4
+ font-size: 18px;
5
+ }
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import "./index.less";
@@ -0,0 +1,5 @@
1
+ .type-icons-container {
2
+ display: inline-block;
3
+ vertical-align: middle;
4
+ font-size: 18px;
5
+ }
File without changes
@@ -0,0 +1,14 @@
1
+ import { defineComponent, openBlock, createElementBlock } from "vue";
2
+ const _sfc_main = defineComponent({
3
+ ...{ name: "uploadStep" },
4
+ __name: "component",
5
+ props: {
6
+ BASE_API: {}
7
+ },
8
+ setup(__props) {
9
+ return (_ctx, _cache) => {
10
+ return openBlock(), createElementBlock("div", null, "uploadStep");
11
+ };
12
+ }
13
+ });
14
+ export { _sfc_main as default };
@@ -0,0 +1,2 @@
1
+ declare const uploadStep: any;
2
+ export default uploadStep;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./component.js";
2
+ const uploadStep = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component(_sfc_main.name, _sfc_main);
5
+ }
6
+ });
7
+ export { uploadStep as default };
@@ -0,0 +1 @@
1
+ import "./index.css";
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import "./index.less";
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, useSlots, ref, onMounted, openBlock, createElementBlock, createBlock, unref, withCtx, createElementVNode, createVNode, withModifiers, toDisplayString, createCommentVNode, Fragment, renderList, createTextVNode, renderSlot } from "vue";
2
2
  import { Popover, Avatar, Dropdown, Doption, Button } from "@arco-design/web-vue";
3
3
  import { IconEdit } from "@arco-design/web-vue/es/icon";
4
+ import { DEFAULT_BASE_API, DEFAULT_BASE_ACCOUNT_HOST } from "../config.js";
4
5
  import { getUserInfo, getUserDetails, accountLogout, domainSelect } from "./script/api.js";
5
6
  const _hoisted_1 = { class: "user-avater-container" };
6
7
  const _hoisted_2 = ["src"];
@@ -26,8 +27,8 @@ const _sfc_main = defineComponent({
26
27
  },
27
28
  setup(__props) {
28
29
  const props = __props;
29
- const BASE_API = props.BASE_API || "https://site.cmstop.xyz";
30
- const BASE_ACCOUNT_HOST = props.BASE_ACCOUNT_HOST || "https://account.cmstop.xyz";
30
+ const BASE_API = props.BASE_API || DEFAULT_BASE_API;
31
+ const BASE_ACCOUNT_HOST = props.BASE_ACCOUNT_HOST || DEFAULT_BASE_ACCOUNT_HOST;
31
32
  const slotTest = !!useSlots().reference;
32
33
  const userInfo = ref(null);
33
34
  const loadUserInfo = async () => {
@@ -133,7 +134,6 @@ const _sfc_main = defineComponent({
133
134
  }),
134
135
  createElementVNode("div", _hoisted_11, [
135
136
  createVNode(unref(Button), {
136
- long: "",
137
137
  type: "text",
138
138
  onClick: _cache[1] || (_cache[1] = ($event) => loginOut())
139
139
  }, {
@@ -0,0 +1 @@
1
+ export declare const dateYYYYDDMMHHmm: (date: any) => string;
@@ -0,0 +1,7 @@
1
+ import dayjs from "dayjs";
2
+ const dateYYYYDDMMHHmm = (date) => {
3
+ if (!date)
4
+ return "--";
5
+ return dayjs(date).format("YYYY-DD-MM HH:mm");
6
+ };
7
+ export { dateYYYYDDMMHHmm };
@@ -9,7 +9,7 @@ function request(BASE_API, options) {
9
9
  service.interceptors.request.use(
10
10
  (config) => {
11
11
  if (getToken()) {
12
- config.headers["Authorization"] = `Bearer ${getToken()}`;
12
+ config.headers.Authorization = `Bearer ${getToken()}`;
13
13
  }
14
14
  return config;
15
15
  },
@@ -23,12 +23,11 @@ function request(BASE_API, options) {
23
23
  const res = response.data;
24
24
  if (res.code !== 0) {
25
25
  return Promise.reject(new Error(res.message || "Error"));
26
- } else {
27
- return res;
28
26
  }
27
+ return res;
29
28
  },
30
29
  (error) => {
31
- console.log("err" + error);
30
+ console.log(`err${error}`);
32
31
  return Promise.reject(error);
33
32
  }
34
33
  );
@@ -0,0 +1,116 @@
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
+ };
48
+ export declare const target_type_map: {
49
+ 3: string;
50
+ 4: string;
51
+ 5: string;
52
+ 6: string;
53
+ 7: string;
54
+ 8: string;
55
+ 9: string;
56
+ 10: string;
57
+ };
58
+ export declare const key_target_type_map: {
59
+ 3: string;
60
+ 4: string;
61
+ 5: string;
62
+ 6: string;
63
+ 7: string;
64
+ 8: string;
65
+ 9: string;
66
+ 11: string;
67
+ 12: string;
68
+ 13: string;
69
+ };
70
+ export declare const componentsColumns: any;
71
+ export declare const compoColumnsWithKeyMap: {
72
+ top: string;
73
+ banner: string;
74
+ newsletters: string;
75
+ svideo: string;
76
+ function: string;
77
+ special: string;
78
+ news_letter: string;
79
+ focus: string;
80
+ horizon_slide: string;
81
+ radio: string;
82
+ tv: string;
83
+ mp_account: string;
84
+ column: string;
85
+ };
86
+ export declare const compoColumnsMap: () => any;
87
+ export declare const contentList_list_type_map: {
88
+ 1: string;
89
+ 2: string;
90
+ 3: string;
91
+ 4: string;
92
+ 5: string;
93
+ 6: string;
94
+ 7: string;
95
+ };
96
+ export declare const contentList_relation_type_map: {
97
+ 0: string;
98
+ 1: string;
99
+ 2: string;
100
+ 3: string;
101
+ 4: string;
102
+ 10: string;
103
+ };
104
+ export declare const contentList_layout_map: {
105
+ blank: string;
106
+ svideo: string;
107
+ fly_card: string;
108
+ video: string;
109
+ immersive_video: string;
110
+ timeline: string;
111
+ lbs: string;
112
+ };
113
+ export declare const mp_type_map: {
114
+ 1: string;
115
+ 2: string;
116
+ };
@@ -0,0 +1,22 @@
1
+ const componentsColumns = {
2
+ banner: { value: "banner", label: "\u8F6E\u64AD\u7EC4\u4EF6" },
3
+ top: { value: "top", label: "\u7F6E\u9876\u7EC4\u4EF6" },
4
+ horizon_slide: { value: "horizon_slide", label: "\u6A2A\u6ED1\u7EC4\u4EF6" },
5
+ svideo: { value: "svideo", label: "\u5C0F\u89C6\u9891\u7EC4\u4EF6" },
6
+ special: { value: "special", label: "\u4E13\u9898/\u5408\u96C6\u7EC4\u4EF6" },
7
+ news_letter: { value: "news_letter", label: "\u5FEB\u8BAF\u7EC4\u4EF6" },
8
+ focus: { value: "focus", label: "\u70ED\u70B9\u7EC4\u4EF6" },
9
+ radio: { value: "radio", label: "\u5E7F\u64AD\u7EC4\u4EF6", simple: true },
10
+ tv: { value: "tv", label: "\u7535\u89C6\u7EC4\u4EF6", simple: true },
11
+ mp_account: { value: "mp_account", label: "\u516C\u4F17\u53F7\u7EC4\u4EF6" },
12
+ column: { value: "column", label: "\u5206\u680F\u7EC4\u4EF6" }
13
+ };
14
+ const compoColumnsMap = () => {
15
+ const obj = {};
16
+ Object.keys(componentsColumns).map((key) => {
17
+ obj[key] = componentsColumns[key].label.replace("\u7EC4\u4EF6", "");
18
+ return key;
19
+ });
20
+ return obj;
21
+ };
22
+ export { compoColumnsMap, componentsColumns };
@@ -6,6 +6,7 @@ var permissionMap = require("./script/permissionMap.js");
6
6
  var apps = require("./script/apps.js");
7
7
  var api = require("./script/api.js");
8
8
  var auth = require("../utils/auth.js");
9
+ var config = require("../config.js");
9
10
  const _hoisted_1 = {
10
11
  key: 1,
11
12
  class: "reference-btn"
@@ -46,7 +47,7 @@ const _sfc_main = vue.defineComponent({
46
47
  const permissions = vue.ref([]);
47
48
  const slotTest = !!vue.useSlots().reference;
48
49
  const rid = auth.getRID() || "4";
49
- const BASE_API = props.BASE_API || "https://site.cmstop.xyz";
50
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
50
51
  const navList = vue.computed(() => {
51
52
  const appList2 = [];
52
53
  StorePubApplication.value.map((item) => {
package/lib/config.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const DEFAULT_BASE_API = "https://site.cmstop.xyz";
4
+ const DEFAULT_BASE_ACCOUNT_HOST = "https://account.cmstop.xyz";
5
+ exports.DEFAULT_BASE_ACCOUNT_HOST = DEFAULT_BASE_ACCOUNT_HOST;
6
+ exports.DEFAULT_BASE_API = DEFAULT_BASE_API;
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var index = require("./components/ViewAllColumn/index.js");
5
+ var index$2 = require("./components/CompoList/index.js");
6
+ var index$1 = require("./components/storeBox/index.js");
7
+ require("../typeIcons/style/index.js");
8
+ var config = require("../config.js");
9
+ var user = require("../hooks/user.js");
10
+ const _sfc_main = vue.defineComponent({
11
+ ...{ name: "contentModal" },
12
+ __name: "component",
13
+ props: {
14
+ BASE_API: {},
15
+ visible: { type: Boolean },
16
+ title: {},
17
+ defaultSelectedData: {},
18
+ maxSelect: {},
19
+ typeData: {},
20
+ userStore: {}
21
+ },
22
+ emits: ["update:visible", "comfirm"],
23
+ setup(__props, { emit }) {
24
+ const props = __props;
25
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
26
+ const visible = vue.computed({
27
+ get() {
28
+ return props.visible;
29
+ },
30
+ set(value) {
31
+ setVisible(value);
32
+ }
33
+ });
34
+ const selectedData = vue.ref([]);
35
+ const hasSelected = vue.computed(() => {
36
+ return selectedData.value.length > 0;
37
+ });
38
+ const typeDataController = vue.ref(props.typeData);
39
+ const setVisible = (bool) => {
40
+ emit("update:visible", bool);
41
+ };
42
+ const selectedDataChangeHandle = (data) => {
43
+ selectedData.value = data;
44
+ };
45
+ const handleOk = () => {
46
+ setVisible(false);
47
+ };
48
+ const handleCancel = () => {
49
+ setVisible(false);
50
+ };
51
+ const comfirm = () => {
52
+ emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
53
+ };
54
+ const { userInfo, getUserInfoHandle } = user["default"](BASE_API);
55
+ const HandleOpen = () => {
56
+ selectedData.value = props.defaultSelectedData || [];
57
+ };
58
+ const HandleClose = () => {
59
+ selectedData.value = [];
60
+ };
61
+ vue.onMounted(() => {
62
+ if (props.userStore) {
63
+ userInfo.value = { BASE_API, ...props.userStore };
64
+ } else {
65
+ getUserInfoHandle();
66
+ }
67
+ });
68
+ return (_ctx, _cache) => {
69
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Modal), {
70
+ visible: visible.value,
71
+ width: "986px",
72
+ "mask-closable": false,
73
+ footer: false,
74
+ "title-align": "start",
75
+ "unmount-on-close": "",
76
+ "modal-class": "add-content-modal-wrapper",
77
+ "body-class": "add-content-modal-body",
78
+ onOk: handleOk,
79
+ onOpen: HandleOpen,
80
+ onClose: HandleClose,
81
+ onCancel: handleCancel
82
+ }, {
83
+ title: vue.withCtx(() => [
84
+ vue.createTextVNode(vue.toDisplayString(props.title ? props.title : "\u6DFB\u52A0\u5185\u5BB9"), 1)
85
+ ]),
86
+ default: vue.withCtx(() => [
87
+ vue.createVNode(vue.unref(webVue.Tabs), {
88
+ class: "content-tabs",
89
+ justify: ""
90
+ }, {
91
+ default: vue.withCtx(() => [
92
+ typeDataController.value.addDoc ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
93
+ key: "1",
94
+ title: "\u680F\u76EE"
95
+ }, {
96
+ default: vue.withCtx(() => [
97
+ vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index, {
98
+ key: 0,
99
+ "max-select": _ctx.maxSelect,
100
+ "default-selected-data": selectedData.value,
101
+ "type-data": typeDataController.value,
102
+ series: typeDataController.value.docSeries,
103
+ banner: typeDataController.value.docBanner,
104
+ "user-info": vue.unref(userInfo),
105
+ onChange: selectedDataChangeHandle
106
+ }, {
107
+ store: vue.withCtx(() => [
108
+ vue.createVNode(index$1, {
109
+ selectData: selectedData.value,
110
+ "onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => selectedData.value = $event)
111
+ }, null, 8, ["selectData"])
112
+ ]),
113
+ options: vue.withCtx(() => [
114
+ vue.createVNode(vue.unref(webVue.Button), {
115
+ type: "primary",
116
+ disabled: !hasSelected.value,
117
+ onClick: comfirm
118
+ }, {
119
+ default: vue.withCtx(() => [
120
+ vue.createTextVNode("\u6DFB\u52A0")
121
+ ]),
122
+ _: 1
123
+ }, 8, ["disabled"])
124
+ ]),
125
+ _: 1
126
+ }, 8, ["max-select", "default-selected-data", "type-data", "series", "banner", "user-info"])) : vue.createCommentVNode("v-if", true)
127
+ ]),
128
+ _: 1
129
+ })) : vue.createCommentVNode("v-if", true),
130
+ typeDataController.value.addCompo ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.TabPane), {
131
+ key: "2",
132
+ title: "\u7EC4\u4EF6"
133
+ }, {
134
+ default: vue.withCtx(() => [
135
+ vue.unref(userInfo) && vue.unref(userInfo).repository_id ? (vue.openBlock(), vue.createBlock(index$2, {
136
+ key: 0,
137
+ "max-select": _ctx.maxSelect,
138
+ "default-selected-data": selectedData.value,
139
+ "type-data": typeDataController.value,
140
+ columns: typeDataController.value.compoType,
141
+ "user-info": vue.unref(userInfo),
142
+ onChange: selectedDataChangeHandle
143
+ }, {
144
+ store: vue.withCtx(() => [
145
+ vue.createVNode(index$1, {
146
+ selectData: selectedData.value,
147
+ "onUpdate:selectData": _cache[1] || (_cache[1] = ($event) => selectedData.value = $event)
148
+ }, null, 8, ["selectData"])
149
+ ]),
150
+ options: vue.withCtx(() => [
151
+ vue.createVNode(vue.unref(webVue.Button), {
152
+ type: "primary",
153
+ disabled: !hasSelected.value,
154
+ onClick: comfirm
155
+ }, {
156
+ default: vue.withCtx(() => [
157
+ vue.createTextVNode("\u6DFB\u52A0")
158
+ ]),
159
+ _: 1
160
+ }, 8, ["disabled"])
161
+ ]),
162
+ _: 1
163
+ }, 8, ["max-select", "default-selected-data", "type-data", "columns", "user-info"])) : vue.createCommentVNode("v-if", true)
164
+ ]),
165
+ _: 1
166
+ })) : vue.createCommentVNode("v-if", true)
167
+ ]),
168
+ _: 1
169
+ })
170
+ ]),
171
+ _: 1
172
+ }, 8, ["visible"]);
173
+ };
174
+ }
175
+ });
176
+ module.exports = _sfc_main;