@cmstops/pro-compo 0.1.14 → 0.1.15

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 (150) hide show
  1. package/dist/gif.worker.js +3 -0
  2. package/dist/index.css +469 -1
  3. package/dist/index.min.css +1 -1
  4. package/es/contentDetailList/component.js +1 -2
  5. package/es/contentDetailList/components/Content/CompoItem/index.js +1 -2
  6. package/es/contentDetailList/components/Content/ContentListItem/index.js +1 -2
  7. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +1 -2
  8. package/es/contentDetailList/components/Content/DocItem/index.js +1 -2
  9. package/es/contentDetailList/components/Content/KongoNavItem/index.js +1 -2
  10. package/es/contentDetailList/components/Content/LiveItem/index.js +1 -2
  11. package/es/contentDetailList/components/Content/MaccountItem/index.js +1 -2
  12. package/es/contentDetailList/components/Content/index.js +1 -2
  13. package/es/contentDetailList/components/Doc/index.js +1 -2
  14. package/es/contentModal/component.js +1 -2
  15. package/es/contentModal/components/CompoList/CompoFilter/index.js +2 -3
  16. package/es/contentModal/components/CompoList/index.js +2 -3
  17. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +1 -2
  18. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +1 -2
  19. package/es/contentModal/components/ViewAllColumn/index.js +1 -2
  20. package/es/contentModal/components/storeBox/index.js +1 -2
  21. package/es/gif.worker.js +3 -0
  22. package/es/hooks/assets.d.ts +1 -0
  23. package/es/hooks/assets.js +9 -0
  24. package/es/hooks/user.d.ts +1 -3
  25. package/es/imageCrop/component.d.ts +0 -0
  26. package/es/imageCrop/component.js +472 -0
  27. package/es/imageCrop/index.d.ts +2 -0
  28. package/es/imageCrop/index.js +7 -0
  29. package/es/imageCrop/script/api.d.ts +1 -0
  30. package/es/imageCrop/script/api.js +11 -0
  31. package/es/imageCrop/style/cropper.less +291 -0
  32. package/es/imageCrop/style/css.js +1 -0
  33. package/es/imageCrop/style/imageCropper.less +133 -0
  34. package/es/imageCrop/style/index.css +366 -0
  35. package/es/imageCrop/style/index.d.ts +1 -0
  36. package/es/imageCrop/style/index.js +1 -0
  37. package/es/imageCrop/style/index.less +2 -0
  38. package/es/index.css +469 -1
  39. package/es/index.d.ts +2 -0
  40. package/es/index.js +2 -0
  41. package/es/index.less +2 -0
  42. package/es/mediaFilter/component.js +1 -2
  43. package/es/mediaFilter/components/DocFilter.js +1 -2
  44. package/es/messageBox/list.js +1 -2
  45. package/es/previousVersion/component.js +1 -2
  46. package/es/resourceModal/component.js +4 -7
  47. package/es/resourceModal/components/MediaPreviewer/index.js +1 -2
  48. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +10 -19
  49. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +4 -9
  50. package/es/resourceModal/components/MediaSelection/MainContent/index.js +7 -15
  51. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +1 -2
  52. package/es/resourceModal/components/MediaSelection/index.js +8 -12
  53. package/es/selectAvatarList/component.js +1 -2
  54. package/es/selectGategory/component.js +1 -2
  55. package/es/selectGategory/components/ColumnSelection/index.js +1 -2
  56. package/es/selectThumb/component.d.ts +0 -0
  57. package/es/selectThumb/component.js +410 -0
  58. package/es/selectThumb/components/card.d.ts +0 -0
  59. package/es/selectThumb/components/card.js +86 -0
  60. package/es/selectThumb/components/colorPalette.d.ts +0 -0
  61. package/es/selectThumb/components/colorPalette.js +75 -0
  62. package/es/selectThumb/index.d.ts +2 -0
  63. package/es/selectThumb/index.js +7 -0
  64. package/es/selectThumb/style/card.less +79 -0
  65. package/es/selectThumb/style/colorPalette.less +0 -0
  66. package/es/selectThumb/style/css.js +1 -0
  67. package/es/selectThumb/style/index.css +101 -0
  68. package/es/selectThumb/style/index.d.ts +1 -0
  69. package/es/selectThumb/style/index.js +1 -0
  70. package/es/selectThumb/style/index.less +27 -0
  71. package/es/uploadBefore/component.js +2 -3
  72. package/es/uploadBefore/components/UploadBefore.js +1 -2
  73. package/es/uploadBefore/components/UploadForClick.js +1 -2
  74. package/es/uploadStep/component.js +2 -3
  75. package/es/userDirector/component.js +1 -2
  76. package/es/userDirector/components/userTree.js +1 -2
  77. package/es/userDirector/style/index.css +2 -1
  78. package/es/userDirector/style/index.less +2 -1
  79. package/es/utils/doc.js +30 -7
  80. package/es/utils/index.d.ts +1 -0
  81. package/es/utils/index.js +6 -1
  82. package/es/utils/tusUpload.d.ts +1 -1
  83. package/es/utils/tusUpload.js +1 -1
  84. package/es/utils/uploadCatalog.d.ts +1 -0
  85. package/lib/contentDetailList/component.js +1 -2
  86. package/lib/contentDetailList/components/Content/CompoItem/index.js +1 -2
  87. package/lib/contentDetailList/components/Content/ContentListItem/index.js +1 -2
  88. package/lib/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +1 -2
  89. package/lib/contentDetailList/components/Content/DocItem/index.js +1 -2
  90. package/lib/contentDetailList/components/Content/KongoNavItem/index.js +1 -2
  91. package/lib/contentDetailList/components/Content/LiveItem/index.js +1 -2
  92. package/lib/contentDetailList/components/Content/MaccountItem/index.js +1 -2
  93. package/lib/contentDetailList/components/Content/index.js +1 -2
  94. package/lib/contentDetailList/components/Doc/index.js +1 -2
  95. package/lib/contentModal/component.js +1 -2
  96. package/lib/contentModal/components/CompoList/CompoFilter/index.js +2 -3
  97. package/lib/contentModal/components/CompoList/index.js +2 -3
  98. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +1 -2
  99. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +1 -2
  100. package/lib/contentModal/components/ViewAllColumn/index.js +1 -2
  101. package/lib/contentModal/components/storeBox/index.js +1 -2
  102. package/lib/hooks/assets.js +11 -0
  103. package/lib/imageCrop/component.js +479 -0
  104. package/lib/imageCrop/index.js +8 -0
  105. package/lib/imageCrop/script/api.js +13 -0
  106. package/lib/imageCrop/style/cropper.less +291 -0
  107. package/lib/imageCrop/style/css.js +2 -0
  108. package/lib/imageCrop/style/imageCropper.less +133 -0
  109. package/lib/imageCrop/style/index.css +366 -0
  110. package/lib/imageCrop/style/index.js +2 -0
  111. package/lib/imageCrop/style/index.less +2 -0
  112. package/lib/index.css +469 -1
  113. package/lib/index.js +16 -12
  114. package/lib/index.less +2 -0
  115. package/lib/mediaFilter/component.js +1 -2
  116. package/lib/mediaFilter/components/DocFilter.js +1 -2
  117. package/lib/messageBox/list.js +1 -2
  118. package/lib/previousVersion/component.js +1 -2
  119. package/lib/resourceModal/component.js +4 -7
  120. package/lib/resourceModal/components/MediaPreviewer/index.js +1 -2
  121. package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +10 -19
  122. package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +4 -9
  123. package/lib/resourceModal/components/MediaSelection/MainContent/index.js +7 -15
  124. package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +1 -2
  125. package/lib/resourceModal/components/MediaSelection/index.js +8 -12
  126. package/lib/selectAvatarList/component.js +1 -2
  127. package/lib/selectGategory/component.js +1 -2
  128. package/lib/selectGategory/components/ColumnSelection/index.js +1 -2
  129. package/lib/selectThumb/component.js +411 -0
  130. package/lib/selectThumb/components/card.js +87 -0
  131. package/lib/selectThumb/components/colorPalette.js +76 -0
  132. package/lib/selectThumb/index.js +8 -0
  133. package/lib/selectThumb/style/card.less +79 -0
  134. package/lib/selectThumb/style/colorPalette.less +0 -0
  135. package/lib/selectThumb/style/css.js +2 -0
  136. package/lib/selectThumb/style/index.css +101 -0
  137. package/lib/selectThumb/style/index.js +2 -0
  138. package/lib/selectThumb/style/index.less +27 -0
  139. package/lib/uploadBefore/component.js +2 -3
  140. package/lib/uploadBefore/components/UploadBefore.js +1 -2
  141. package/lib/uploadBefore/components/UploadForClick.js +1 -2
  142. package/lib/uploadStep/component.js +2 -3
  143. package/lib/userDirector/component.js +1 -2
  144. package/lib/userDirector/components/userTree.js +1 -2
  145. package/lib/userDirector/style/index.css +2 -1
  146. package/lib/userDirector/style/index.less +2 -1
  147. package/lib/utils/doc.js +31 -6
  148. package/lib/utils/index.js +6 -0
  149. package/lib/utils/tusUpload.js +1 -1
  150. package/package.json +11 -2
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ const _hoisted_1 = {
5
+ key: 0,
6
+ class: "color-palette-container"
7
+ };
8
+ const _sfc_main = vue.defineComponent({
9
+ __name: "colorPalette",
10
+ props: {
11
+ styleData: {},
12
+ model: {}
13
+ },
14
+ emits: ["change"],
15
+ setup(__props, { emit }) {
16
+ const props = __props;
17
+ const color = vue.ref("rgb(101,121,109)");
18
+ const colorList = vue.ref([]);
19
+ vue.watch(
20
+ () => props.styleData,
21
+ () => {
22
+ if (props.styleData) {
23
+ const _color = props.styleData[`${props.model}_theme_color`] || "";
24
+ color.value = colorRgb(_color);
25
+ const colorList2 = props.styleData.value[`${props.model}_colorList`];
26
+ if (colorList2 == null ? void 0 : colorList2.length) {
27
+ colorList2.value = colorList2.map((color2) => `rgb(${color2})`);
28
+ } else if (color.value) {
29
+ colorList2.value = [color.value];
30
+ }
31
+ }
32
+ }
33
+ );
34
+ const colorChange = (color2) => {
35
+ if (color2) {
36
+ color2.value = color2.replace(/\s+/g, "");
37
+ const styleData = JSON.parse(JSON.stringify(props.styleData));
38
+ styleData[`${props.model}_theme_color`] = color2.value;
39
+ emit("change", styleData);
40
+ }
41
+ };
42
+ const colorRgb = (_color) => {
43
+ if (_color.includes("rgb")) {
44
+ return _color;
45
+ }
46
+ const colorChange2 = [];
47
+ for (let i = 1; i < 7; i += 2) {
48
+ colorChange2.push(parseInt(`0x${_color.slice(i, i + 2)}`, 10) || 0);
49
+ }
50
+ return `rgb(${colorChange2.join(",")})`;
51
+ };
52
+ return (_ctx, _cache) => {
53
+ return colorList.value && colorList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
54
+ vue.createVNode(vue.unref(webVue.RadioGroup), {
55
+ modelValue: color.value,
56
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => color.value = $event),
57
+ class: "color-radio-group",
58
+ type: "button",
59
+ onChange: colorChange
60
+ }, {
61
+ default: vue.withCtx(() => [
62
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(colorList.value, (colr, index) => {
63
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Radio), {
64
+ key: index,
65
+ style: vue.normalizeStyle({ background: `${colr}` }),
66
+ value: colr
67
+ }, null, 8, ["style", "value"]);
68
+ }), 128))
69
+ ]),
70
+ _: 1
71
+ }, 8, ["modelValue"])
72
+ ])) : vue.createCommentVNode("v-if", true);
73
+ };
74
+ }
75
+ });
76
+ module.exports = _sfc_main;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var component = require("./component.js");
3
+ const selectThumb = Object.assign(component, {
4
+ install: (app) => {
5
+ app.component(component.name, component);
6
+ }
7
+ });
8
+ module.exports = selectThumb;
@@ -0,0 +1,79 @@
1
+ .thumb-card-container {
2
+ width: 100px;
3
+ height: 58px;
4
+ margin-right: 10px;
5
+ border-radius: 4px;
6
+ overflow: hidden;
7
+ position: relative;
8
+ &.model-5 {
9
+ width: 75px;
10
+ height: 100px;
11
+ }
12
+ &.model-7 {
13
+ width: 232px;
14
+ height: 58px;
15
+ }
16
+ .img-v {
17
+ width: 100%;
18
+ height: 100%;
19
+ position: relative;
20
+ .change-icon {
21
+ width: 25px;
22
+ height: 25px;
23
+ font-size: 25px;
24
+ position: absolute;
25
+ left: 0;
26
+ right: 0;
27
+ top: 0;
28
+ bottom: 0;
29
+ margin: auto;
30
+ z-index: 1;
31
+ color: #ffffff;
32
+ cursor: pointer;
33
+ }
34
+ }
35
+ .item {
36
+ width: 100%;
37
+ height: 100%;
38
+ cursor: pointer;
39
+ &.add-thumb {
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ background-color: #f9f9f9;
44
+ }
45
+ }
46
+ .mask {
47
+ display: none;
48
+ width: 100%;
49
+ height: 100%;
50
+ background: rgba(0, 0, 0, 0.3);
51
+ position: absolute;
52
+ top: 0;
53
+ // display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ color: #eaeaea;
57
+ font-size: 18px;
58
+ i {
59
+ display: inline-block;
60
+ cursor: pointer;
61
+ &:active {
62
+ opacity: 0.4;
63
+ }
64
+ }
65
+ .half {
66
+ height: 100%;
67
+ width: 48%;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ &:hover {
72
+ opacity: 0.7;
73
+ }
74
+ }
75
+ }
76
+ .img-v:hover .mask {
77
+ display: flex;
78
+ }
79
+ }
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.css");
@@ -0,0 +1,101 @@
1
+ .select-thumb-container .thumb-card-container {
2
+ width: 100px;
3
+ height: 58px;
4
+ margin-right: 10px;
5
+ border-radius: 4px;
6
+ overflow: hidden;
7
+ position: relative;
8
+ }
9
+ .select-thumb-container .thumb-card-container.model-5 {
10
+ width: 75px;
11
+ height: 100px;
12
+ }
13
+ .select-thumb-container .thumb-card-container.model-7 {
14
+ width: 232px;
15
+ height: 58px;
16
+ }
17
+ .select-thumb-container .thumb-card-container .img-v {
18
+ width: 100%;
19
+ height: 100%;
20
+ position: relative;
21
+ }
22
+ .select-thumb-container .thumb-card-container .img-v .change-icon {
23
+ width: 25px;
24
+ height: 25px;
25
+ font-size: 25px;
26
+ position: absolute;
27
+ left: 0;
28
+ right: 0;
29
+ top: 0;
30
+ bottom: 0;
31
+ margin: auto;
32
+ z-index: 1;
33
+ color: #ffffff;
34
+ cursor: pointer;
35
+ }
36
+ .select-thumb-container .thumb-card-container .item {
37
+ width: 100%;
38
+ height: 100%;
39
+ cursor: pointer;
40
+ }
41
+ .select-thumb-container .thumb-card-container .item.add-thumb {
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ background-color: #f9f9f9;
46
+ }
47
+ .select-thumb-container .thumb-card-container .mask {
48
+ display: none;
49
+ width: 100%;
50
+ height: 100%;
51
+ background: rgba(0, 0, 0, 0.3);
52
+ position: absolute;
53
+ top: 0;
54
+ align-items: center;
55
+ justify-content: center;
56
+ color: #eaeaea;
57
+ font-size: 18px;
58
+ }
59
+ .select-thumb-container .thumb-card-container .mask i {
60
+ display: inline-block;
61
+ cursor: pointer;
62
+ }
63
+ .select-thumb-container .thumb-card-container .mask i:active {
64
+ opacity: 0.4;
65
+ }
66
+ .select-thumb-container .thumb-card-container .mask .half {
67
+ height: 100%;
68
+ width: 48%;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ }
73
+ .select-thumb-container .thumb-card-container .mask .half:hover {
74
+ opacity: 0.7;
75
+ }
76
+ .select-thumb-container .thumb-card-container .img-v:hover .mask {
77
+ display: flex;
78
+ }
79
+ .select-thumb-container .title {
80
+ font-size: 14px;
81
+ color: #4e5969;
82
+ font-weight: 700;
83
+ line-height: 40px;
84
+ margin: 5px 0px;
85
+ }
86
+ .select-thumb-container .title span {
87
+ margin-right: 10px;
88
+ }
89
+ .select-thumb-container .title .tip {
90
+ font-size: 12px;
91
+ color: rgba(78, 89, 105, 0.4);
92
+ }
93
+ .select-thumb-container .thumb-list-view {
94
+ display: flex;
95
+ align-items: center;
96
+ margin-bottom: 10px;
97
+ }
98
+ .select-thumb-container .star {
99
+ color: red;
100
+ margin-right: 2px !important;
101
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.less");
@@ -0,0 +1,27 @@
1
+ .select-thumb-container {
2
+ @import './card.less';
3
+ @import './colorPalette.less';
4
+ .title {
5
+ font-size: 14px;
6
+ color: #4e5969;
7
+ font-weight: 700;
8
+ line-height: 40px;
9
+ margin: 5px 0px;
10
+ span {
11
+ margin-right: 10px;
12
+ }
13
+ .tip {
14
+ font-size: 12px;
15
+ color: rgba(78, 89, 105, 0.4);
16
+ }
17
+ }
18
+ .thumb-list-view {
19
+ display: flex;
20
+ align-items: center;
21
+ margin-bottom: 10px;
22
+ }
23
+ .star {
24
+ color: red;
25
+ margin-right: 2px !important;
26
+ }
27
+ }
@@ -16,11 +16,10 @@ const _sfc_main = vue.defineComponent({
16
16
  uploadMethod: {}
17
17
  },
18
18
  emits: ["onProgress", "onListReady"],
19
- setup(__props, { emit: __emit }) {
19
+ setup(__props, { emit: emits }) {
20
+ const props = __props;
20
21
  const { state: visBeforeUpload, open: openBeforePannel } = toggle.useToggle();
21
22
  const { state: visUploadList, open: openListPannel } = toggle.useToggle();
22
- const props = __props;
23
- const emits = __emit;
24
23
  const baseApi = vue.ref(props.BASE_API || config.DEFAULT_BASE_API);
25
24
  const { preOptionsList, uploadFileToShowFileTrans } = uploadHooks.usePreUploadOptions();
26
25
  const { fileList, uploadFileAdd } = uploadHooks.useUplaodList();
@@ -14,9 +14,8 @@ const _sfc_main = vue.defineComponent({
14
14
  BASE_API: {}
15
15
  },
16
16
  emits: ["confirm", "update:visable", "update:file-list"],
17
- setup(__props, { emit: __emit }) {
17
+ setup(__props, { emit: emits }) {
18
18
  const props = __props;
19
- const emits = __emit;
20
19
  const modalVis = vue.toRef(props, "visable");
21
20
  const fileList = vue.toRef(props, "fileList");
22
21
  const column = [
@@ -7,8 +7,7 @@ const _sfc_main = vue.defineComponent({
7
7
  uploadMethod: {}
8
8
  },
9
9
  emits: ["after-choose"],
10
- setup(__props, { emit: __emit }) {
11
- const emits = __emit;
10
+ setup(__props, { emit: emits }) {
12
11
  const tusUpload = (option) => {
13
12
  const { fileItem } = option;
14
13
  emits("after-choose", fileItem);
@@ -27,7 +27,8 @@ const _sfc_main = vue.defineComponent({
27
27
  global: { type: Boolean }
28
28
  },
29
29
  emits: ["update:visable"],
30
- setup(__props, { emit: __emit }) {
30
+ setup(__props, { emit: emits }) {
31
+ const props = __props;
31
32
  const progressEnum = {
32
33
  UPLOADING: "normal",
33
34
  WATING: "normal",
@@ -40,8 +41,6 @@ const _sfc_main = vue.defineComponent({
40
41
  SUCCESS: "\u4E0A\u4F20\u5B8C\u6210",
41
42
  ERROR: "\u4E0A\u4F20\u5931\u8D25"
42
43
  };
43
- const emits = __emit;
44
- const props = __props;
45
44
  const showList = vue.toRef(props, "fileList");
46
45
  const { state: expend, toggle: toggleExp } = toggle.useToggle(true);
47
46
  const { state: scale, toggle: toggleSca } = toggle.useToggle();
@@ -23,10 +23,9 @@ const _sfc_main = vue.defineComponent({
23
23
  title: {}
24
24
  },
25
25
  emits: ["update:visible", "submit"],
26
- setup(__props, { emit: __emit }) {
26
+ setup(__props, { emit }) {
27
27
  const props = __props;
28
28
  const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
29
- const emit = __emit;
30
29
  const RoleTreeData = vue.ref([]);
31
30
  const DepartTreeData = vue.ref([]);
32
31
  const userSelectedList = vue.ref([]);
@@ -10,7 +10,7 @@ const _sfc_main = vue.defineComponent({
10
10
  list: {}
11
11
  },
12
12
  emits: ["select", "expand", "add"],
13
- setup(__props, { emit: __emit }) {
13
+ setup(__props, { emit }) {
14
14
  const props = __props;
15
15
  const loadMore = () => {
16
16
  };
@@ -19,7 +19,6 @@ const _sfc_main = vue.defineComponent({
19
19
  title: "alias",
20
20
  key: "node_key"
21
21
  };
22
- const emit = __emit;
23
22
  const select = (selectedKeys, data) => {
24
23
  emit("select", selectedKeys, data);
25
24
  };
@@ -1,4 +1,5 @@
1
1
  .user-director-modal-body {
2
+ background: var(--color-bg-1);
2
3
  padding: 0;
3
4
  }
4
5
  .user-director-modal-body .arco-collapse {
@@ -7,7 +8,7 @@
7
8
  .user-director-modal-body .arco-collapse-item-content {
8
9
  padding-left: 10px;
9
10
  padding-right: 0;
10
- background: white;
11
+ background: var(--color-bg-1);
11
12
  }
12
13
  .user-select-content {
13
14
  height: 50vh;
@@ -1,4 +1,5 @@
1
1
  .user-director-modal-body {
2
+ background: var(--color-bg-1);
2
3
  padding: 0;
3
4
  .arco-collapse {
4
5
  height: calc(100% - 36px);
@@ -7,7 +8,7 @@
7
8
  .arco-collapse-item-content {
8
9
  padding-left: 10px;
9
10
  padding-right: 0;
10
- background: white;
11
+ background: var(--color-bg-1);
11
12
  }
12
13
  }
13
14
  .user-select-content {
package/lib/utils/doc.js CHANGED
@@ -15,12 +15,35 @@ const stateOptions = () => {
15
15
  return [{ value: "", label: "\u5168\u90E8" }, ...arr];
16
16
  };
17
17
  const docThumbObjMap = {
18
- 1: { alias: "\u4E09\u56FE", maxLength: 3, value: "1", ratio: 4 / 3 },
19
- 2: { alias: "\u5927\u56FE", maxLength: 1, value: "2", ratio: 16 / 9 },
20
- 3: { alias: "\u5355\u56FE", maxLength: 1, value: "3", ratio: 4 / 3 },
21
- 4: { alias: "\u65E0\u56FE", maxLength: 0, value: "4", ratio: 1 },
22
- 5: { alias: "\u7AD6\u56FE", maxLength: 1, value: "5", ratio: 3 / 4 },
23
- 7: { alias: "\u7A84\u56FE", maxLength: 1, value: "7", ratio: 4 / 1 }
18
+ 1: { alias: "\u4E09\u56FE", maxLength: 3, value: "1", ratioStr: "4:3", ratio: 4 / 3 },
19
+ 2: {
20
+ alias: "\u5927\u56FE",
21
+ maxLength: 1,
22
+ value: "2",
23
+ ratioStr: "16:9",
24
+ ratio: 16 / 9
25
+ },
26
+ 3: {
27
+ alias: "\u5355\u56FE",
28
+ maxLength: 1,
29
+ value: "3",
30
+ ratioStr: "4:3 ",
31
+ ratio: 4 / 3
32
+ },
33
+ 4: { alias: "\u65E0\u56FE", maxLength: 0, value: "4", ratioStr: "", ratio: 1 },
34
+ 5: { alias: "\u7AD6\u56FE", maxLength: 1, value: "5", ratioStr: "3:4", ratio: 3 / 4 },
35
+ 7: { alias: "\u7A84\u56FE", maxLength: 1, value: "7", ratioStr: "4:1", ratio: 4 / 1 }
36
+ };
37
+ const docThumbRatioMap = () => {
38
+ const obj = {};
39
+ Object.keys(docThumbObjMap).map((key) => {
40
+ obj[key] = docThumbObjMap[key].ratio;
41
+ return {};
42
+ });
43
+ return obj;
44
+ };
45
+ const docThumbArrMap = () => {
46
+ return Object.values(docThumbObjMap);
24
47
  };
25
48
  const docThumbTypeMap = () => {
26
49
  const arr = Object.keys(docThumbObjMap).map((key) => {
@@ -53,7 +76,9 @@ const typeOptions = () => {
53
76
  };
54
77
  exports.docPubStateMap = docPubStateMap;
55
78
  exports.docSeries = docSeries;
79
+ exports.docThumbArrMap = docThumbArrMap;
56
80
  exports.docThumbObjMap = docThumbObjMap;
81
+ exports.docThumbRatioMap = docThumbRatioMap;
57
82
  exports.docThumbTypeMap = docThumbTypeMap;
58
83
  exports.stateOptions = stateOptions;
59
84
  exports.typeOptions = typeOptions;
@@ -31,6 +31,12 @@ const to = (promise, errorExt) => {
31
31
  return [err, void 0];
32
32
  });
33
33
  };
34
+ function replaceSuffix(str, insert) {
35
+ const reg = /\.[^\.]+$/;
36
+ const match = str.match(reg);
37
+ return match ? str.replace(reg, insert + match) : str + insert;
38
+ }
34
39
  exports.dateYYYYDDMMHHmm = dateYYYYDDMMHHmm;
35
40
  exports.generateUUID = generateUUID;
41
+ exports.replaceSuffix = replaceSuffix;
36
42
  exports.to = to;
@@ -36,7 +36,7 @@ function uploadByTUS(file, progressCallback) {
36
36
  reject(error);
37
37
  },
38
38
  onProgress: (bytesSent, bytesTotal) => {
39
- progressCallback(bytesSent, bytesTotal);
39
+ progressCallback && progressCallback(bytesSent, bytesTotal);
40
40
  },
41
41
  onSuccess: () => {
42
42
  resolve(upload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",
@@ -49,7 +49,12 @@
49
49
  "tus-js-client": "^3.1.1",
50
50
  "dayjs": "^1.11.9",
51
51
  "@arco-design/web-vue": "~2",
52
- "@arco-iconbox/vue-cmstop-icons": "^0.0.4"
52
+ "@arco-iconbox/vue-cmstop-icons": "^0.0.4",
53
+ "@popperjs/core": "^2.11.8",
54
+ "gif-to-canvas": "^1.0.0",
55
+ "gif.js": "^0.2.0",
56
+ "colorthief": "^2.4.0",
57
+ "cropperjs": "^1.6.1"
53
58
  },
54
59
  "devDependencies": {
55
60
  "@arco-design/web-vue": "~2",
@@ -78,6 +83,8 @@
78
83
  "@vue/babel-plugin-jsx": "^1.0.6",
79
84
  "@vue/test-utils": "^2.0.0-beta.14",
80
85
  "babel-loader": "^8.2.2",
86
+ "colorthief": "^2.4.0",
87
+ "cropperjs": "^1.6.1",
81
88
  "dayjs": "^1.11.9",
82
89
  "eslint": "^7.21.0",
83
90
  "eslint-config-airbnb-base": "^14.2.1",
@@ -88,6 +95,8 @@
88
95
  "eslint-plugin-vue": "^7.7.0",
89
96
  "fast-glob": "^3.2.7",
90
97
  "fs-extra": "^9.1.0",
98
+ "gif-to-canvas": "^1.0.0",
99
+ "gif.js": "^0.2.0",
91
100
  "husky": "^4.3.7",
92
101
  "jest": "^29.7.0",
93
102
  "less": "^4.1.1",