@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,75 @@
1
+ import { defineComponent, ref, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, normalizeStyle, createCommentVNode } from "vue";
2
+ import { RadioGroup, Radio } from "@arco-design/web-vue";
3
+ const _hoisted_1 = {
4
+ key: 0,
5
+ class: "color-palette-container"
6
+ };
7
+ const _sfc_main = defineComponent({
8
+ __name: "colorPalette",
9
+ props: {
10
+ styleData: {},
11
+ model: {}
12
+ },
13
+ emits: ["change"],
14
+ setup(__props, { emit }) {
15
+ const props = __props;
16
+ const color = ref("rgb(101,121,109)");
17
+ const colorList = ref([]);
18
+ watch(
19
+ () => props.styleData,
20
+ () => {
21
+ if (props.styleData) {
22
+ const _color = props.styleData[`${props.model}_theme_color`] || "";
23
+ color.value = colorRgb(_color);
24
+ const colorList2 = props.styleData.value[`${props.model}_colorList`];
25
+ if (colorList2 == null ? void 0 : colorList2.length) {
26
+ colorList2.value = colorList2.map((color2) => `rgb(${color2})`);
27
+ } else if (color.value) {
28
+ colorList2.value = [color.value];
29
+ }
30
+ }
31
+ }
32
+ );
33
+ const colorChange = (color2) => {
34
+ if (color2) {
35
+ color2.value = color2.replace(/\s+/g, "");
36
+ const styleData = JSON.parse(JSON.stringify(props.styleData));
37
+ styleData[`${props.model}_theme_color`] = color2.value;
38
+ emit("change", styleData);
39
+ }
40
+ };
41
+ const colorRgb = (_color) => {
42
+ if (_color.includes("rgb")) {
43
+ return _color;
44
+ }
45
+ const colorChange2 = [];
46
+ for (let i = 1; i < 7; i += 2) {
47
+ colorChange2.push(parseInt(`0x${_color.slice(i, i + 2)}`, 10) || 0);
48
+ }
49
+ return `rgb(${colorChange2.join(",")})`;
50
+ };
51
+ return (_ctx, _cache) => {
52
+ return colorList.value && colorList.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
53
+ createVNode(unref(RadioGroup), {
54
+ modelValue: color.value,
55
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => color.value = $event),
56
+ class: "color-radio-group",
57
+ type: "button",
58
+ onChange: colorChange
59
+ }, {
60
+ default: withCtx(() => [
61
+ (openBlock(true), createElementBlock(Fragment, null, renderList(colorList.value, (colr, index) => {
62
+ return openBlock(), createBlock(unref(Radio), {
63
+ key: index,
64
+ style: normalizeStyle({ background: `${colr}` }),
65
+ value: colr
66
+ }, null, 8, ["style", "value"]);
67
+ }), 128))
68
+ ]),
69
+ _: 1
70
+ }, 8, ["modelValue"])
71
+ ])) : createCommentVNode("v-if", true);
72
+ };
73
+ }
74
+ });
75
+ export { _sfc_main as default };
@@ -0,0 +1,2 @@
1
+ declare const selectThumb: any;
2
+ export default selectThumb;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./component.js";
2
+ const selectThumb = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component(_sfc_main.name, _sfc_main);
5
+ }
6
+ });
7
+ export { selectThumb as default };
@@ -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 @@
1
+ import "./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 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import "./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
+ }
@@ -15,11 +15,10 @@ const _sfc_main = defineComponent({
15
15
  uploadMethod: {}
16
16
  },
17
17
  emits: ["onProgress", "onListReady"],
18
- setup(__props, { emit: __emit }) {
18
+ setup(__props, { emit: emits }) {
19
+ const props = __props;
19
20
  const { state: visBeforeUpload, open: openBeforePannel } = useToggle();
20
21
  const { state: visUploadList, open: openListPannel } = useToggle();
21
- const props = __props;
22
- const emits = __emit;
23
22
  const baseApi = ref(props.BASE_API || DEFAULT_BASE_API);
24
23
  const { preOptionsList, uploadFileToShowFileTrans } = usePreUploadOptions();
25
24
  const { fileList, uploadFileAdd } = useUplaodList();
@@ -13,9 +13,8 @@ const _sfc_main = defineComponent({
13
13
  BASE_API: {}
14
14
  },
15
15
  emits: ["confirm", "update:visable", "update:file-list"],
16
- setup(__props, { emit: __emit }) {
16
+ setup(__props, { emit: emits }) {
17
17
  const props = __props;
18
- const emits = __emit;
19
18
  const modalVis = toRef(props, "visable");
20
19
  const fileList = toRef(props, "fileList");
21
20
  const column = [
@@ -6,8 +6,7 @@ const _sfc_main = defineComponent({
6
6
  uploadMethod: {}
7
7
  },
8
8
  emits: ["after-choose"],
9
- setup(__props, { emit: __emit }) {
10
- const emits = __emit;
9
+ setup(__props, { emit: emits }) {
11
10
  const tusUpload = (option) => {
12
11
  const { fileItem } = option;
13
12
  emits("after-choose", fileItem);
@@ -26,7 +26,8 @@ const _sfc_main = defineComponent({
26
26
  global: { type: Boolean }
27
27
  },
28
28
  emits: ["update:visable"],
29
- setup(__props, { emit: __emit }) {
29
+ setup(__props, { emit: emits }) {
30
+ const props = __props;
30
31
  const progressEnum = {
31
32
  UPLOADING: "normal",
32
33
  WATING: "normal",
@@ -39,8 +40,6 @@ const _sfc_main = defineComponent({
39
40
  SUCCESS: "\u4E0A\u4F20\u5B8C\u6210",
40
41
  ERROR: "\u4E0A\u4F20\u5931\u8D25"
41
42
  };
42
- const emits = __emit;
43
- const props = __props;
44
43
  const showList = toRef(props, "fileList");
45
44
  const { state: expend, toggle: toggleExp } = useToggle(true);
46
45
  const { state: scale, toggle: toggleSca } = useToggle();
@@ -22,10 +22,9 @@ const _sfc_main = defineComponent({
22
22
  title: {}
23
23
  },
24
24
  emits: ["update:visible", "submit"],
25
- setup(__props, { emit: __emit }) {
25
+ setup(__props, { emit }) {
26
26
  const props = __props;
27
27
  const BASE_API = props.BASE_API || DEFAULT_BASE_API;
28
- const emit = __emit;
29
28
  const RoleTreeData = ref([]);
30
29
  const DepartTreeData = ref([]);
31
30
  const userSelectedList = ref([]);
@@ -9,7 +9,7 @@ const _sfc_main = defineComponent({
9
9
  list: {}
10
10
  },
11
11
  emits: ["select", "expand", "add"],
12
- setup(__props, { emit: __emit }) {
12
+ setup(__props, { emit }) {
13
13
  const props = __props;
14
14
  const loadMore = () => {
15
15
  };
@@ -18,7 +18,6 @@ const _sfc_main = defineComponent({
18
18
  title: "alias",
19
19
  key: "node_key"
20
20
  };
21
- const emit = __emit;
22
21
  const select = (selectedKeys, data) => {
23
22
  emit("select", selectedKeys, data);
24
23
  };
@@ -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/es/utils/doc.js CHANGED
@@ -13,12 +13,35 @@ const stateOptions = () => {
13
13
  return [{ value: "", label: "\u5168\u90E8" }, ...arr];
14
14
  };
15
15
  const docThumbObjMap = {
16
- 1: { alias: "\u4E09\u56FE", maxLength: 3, value: "1", ratio: 4 / 3 },
17
- 2: { alias: "\u5927\u56FE", maxLength: 1, value: "2", ratio: 16 / 9 },
18
- 3: { alias: "\u5355\u56FE", maxLength: 1, value: "3", ratio: 4 / 3 },
19
- 4: { alias: "\u65E0\u56FE", maxLength: 0, value: "4", ratio: 1 },
20
- 5: { alias: "\u7AD6\u56FE", maxLength: 1, value: "5", ratio: 3 / 4 },
21
- 7: { alias: "\u7A84\u56FE", maxLength: 1, value: "7", ratio: 4 / 1 }
16
+ 1: { alias: "\u4E09\u56FE", maxLength: 3, value: "1", ratioStr: "4:3", ratio: 4 / 3 },
17
+ 2: {
18
+ alias: "\u5927\u56FE",
19
+ maxLength: 1,
20
+ value: "2",
21
+ ratioStr: "16:9",
22
+ ratio: 16 / 9
23
+ },
24
+ 3: {
25
+ alias: "\u5355\u56FE",
26
+ maxLength: 1,
27
+ value: "3",
28
+ ratioStr: "4:3 ",
29
+ ratio: 4 / 3
30
+ },
31
+ 4: { alias: "\u65E0\u56FE", maxLength: 0, value: "4", ratioStr: "", ratio: 1 },
32
+ 5: { alias: "\u7AD6\u56FE", maxLength: 1, value: "5", ratioStr: "3:4", ratio: 3 / 4 },
33
+ 7: { alias: "\u7A84\u56FE", maxLength: 1, value: "7", ratioStr: "4:1", ratio: 4 / 1 }
34
+ };
35
+ const docThumbRatioMap = () => {
36
+ const obj = {};
37
+ Object.keys(docThumbObjMap).map((key) => {
38
+ obj[key] = docThumbObjMap[key].ratio;
39
+ return {};
40
+ });
41
+ return obj;
42
+ };
43
+ const docThumbArrMap = () => {
44
+ return Object.values(docThumbObjMap);
22
45
  };
23
46
  const docThumbTypeMap = () => {
24
47
  const arr = Object.keys(docThumbObjMap).map((key) => {
@@ -49,4 +72,4 @@ const typeOptions = () => {
49
72
  });
50
73
  return [{ value: "", label: "\u5168\u90E8" }, ...arr];
51
74
  };
52
- export { docPubStateMap, docSeries, docThumbObjMap, docThumbTypeMap, stateOptions, typeOptions };
75
+ export { docPubStateMap, docSeries, docThumbArrMap, docThumbObjMap, docThumbRatioMap, docThumbTypeMap, stateOptions, typeOptions };
@@ -7,3 +7,4 @@ export declare const generateUUID: () => string;
7
7
  * @return { Promise }
8
8
  */
9
9
  export declare const to: <T, U = Error>(promise: Promise<T>, errorExt?: any) => Promise<[U, undefined] | [null, T]>;
10
+ export declare function replaceSuffix(str: string, insert: string): string;
package/es/utils/index.js CHANGED
@@ -25,4 +25,9 @@ const to = (promise, errorExt) => {
25
25
  return [err, void 0];
26
26
  });
27
27
  };
28
- export { dateYYYYDDMMHHmm, generateUUID, to };
28
+ function replaceSuffix(str, insert) {
29
+ const reg = /\.[^\.]+$/;
30
+ const match = str.match(reg);
31
+ return match ? str.replace(reg, insert + match) : str + insert;
32
+ }
33
+ export { dateYYYYDDMMHHmm, generateUUID, replaceSuffix, to };
@@ -5,4 +5,4 @@ import * as TUS from 'tus-js-client';
5
5
  * @param progressCallback 上传进度回调函数
6
6
  * @returns
7
7
  */
8
- export declare function uploadByTUS(file: File, progressCallback: (b: number, t: number) => void): Promise<TUS.Upload>;
8
+ export declare function uploadByTUS(file: File, progressCallback?: (b: number, t: number) => void): Promise<TUS.Upload>;
@@ -13,7 +13,7 @@ function uploadByTUS(file, progressCallback) {
13
13
  reject(error);
14
14
  },
15
15
  onProgress: (bytesSent, bytesTotal) => {
16
- progressCallback(bytesSent, bytesTotal);
16
+ progressCallback && progressCallback(bytesSent, bytesTotal);
17
17
  },
18
18
  onSuccess: () => {
19
19
  resolve(upload);
@@ -0,0 +1 @@
1
+ export declare function checkType(file: any, param: any): any;
@@ -20,9 +20,8 @@ const _sfc_main = vue.defineComponent({
20
20
  "cellMouseEnter",
21
21
  "cellMouseLeave"
22
22
  ],
23
- setup(__props, { emit: __emit }) {
23
+ setup(__props, { emit }) {
24
24
  const props = __props;
25
- const emit = __emit;
26
25
  const queryProps = props.query || "";
27
26
  const disdragalbeProps = props.disdragalbe || false;
28
27
  const abttritesProps = props.abttrites || [];
@@ -21,9 +21,8 @@ const _sfc_main = vue.defineComponent({
21
21
  item: {}
22
22
  },
23
23
  emits: ["clickTitle"],
24
- setup(__props, { emit: __emit }) {
24
+ setup(__props, { emit }) {
25
25
  const props = __props;
26
- const emit = __emit;
27
26
  const comColumnsMap = vue.ref(index.compoColumnsMap().value);
28
27
  const hide = vue.computed(() => {
29
28
  const { hide: hide2 } = props.item;
@@ -29,9 +29,8 @@ const _sfc_main = vue.defineComponent({
29
29
  query: {}
30
30
  },
31
31
  emits: ["clickTitle"],
32
- setup(__props, { emit: __emit }) {
32
+ setup(__props, { emit }) {
33
33
  const props = __props;
34
- const emit = __emit;
35
34
  const hide = vue.computed(() => {
36
35
  const { hide: hide2 } = props.item;
37
36
  return hide2 === 7 || hide2 === 6;
@@ -15,8 +15,7 @@ const _sfc_main = vue.defineComponent({
15
15
  item: {}
16
16
  },
17
17
  emits: ["showUserInfo"],
18
- setup(__props, { emit: __emit }) {
19
- const emit = __emit;
18
+ setup(__props, { emit }) {
20
19
  const calcIsRobot = (data) => {
21
20
  if (data.current_processes[0] && data.current_processes[0].users && data.current_processes[0].users[0]) {
22
21
  const ApvUser = data.current_processes[0].users[0];
@@ -33,9 +33,8 @@ const _sfc_main = vue.defineComponent({
33
33
  abttrites: {}
34
34
  },
35
35
  emits: ["clickTitle", "cellMouseEnter", "cellMouseLeave"],
36
- setup(__props, { emit: __emit }) {
36
+ setup(__props, { emit }) {
37
37
  const props = __props;
38
- const emit = __emit;
39
38
  const hide = vue.computed(() => {
40
39
  const { hide: hide2 } = props.item;
41
40
  return hide2 === 7 || hide2 === 6;
@@ -24,9 +24,8 @@ const _sfc_main = vue.defineComponent({
24
24
  item: {}
25
25
  },
26
26
  emits: ["clickTitle"],
27
- setup(__props, { emit: __emit }) {
27
+ setup(__props, { emit }) {
28
28
  const props = __props;
29
- const emit = __emit;
30
29
  const hide = vue.computed(() => {
31
30
  const { hide: hide2 } = props.item;
32
31
  return hide2 === 7 || hide2 === 6;
@@ -21,9 +21,8 @@ const _sfc_main = vue.defineComponent({
21
21
  item: {}
22
22
  },
23
23
  emits: ["clickTitle"],
24
- setup(__props, { emit: __emit }) {
24
+ setup(__props, { emit }) {
25
25
  const props = __props;
26
- const emit = __emit;
27
26
  const hide = vue.computed(() => {
28
27
  const { hide: hide2 } = props.item;
29
28
  return hide2 === 7 || hide2 === 6;
@@ -16,9 +16,8 @@ const _sfc_main = vue.defineComponent({
16
16
  abttrites: {}
17
17
  },
18
18
  emits: ["clickTitle"],
19
- setup(__props, { emit: __emit }) {
19
+ setup(__props, { emit }) {
20
20
  const props = __props;
21
- const emit = __emit;
22
21
  const hide = vue.computed(() => {
23
22
  const { hide: hide2 } = props.item;
24
23
  return hide2 === 7 || hide2 === 6;
@@ -91,8 +91,7 @@ const _sfc_main = vue.defineComponent({
91
91
  query: {}
92
92
  },
93
93
  emits: ["sortChange", "clickTitle", "dragstart"],
94
- setup(__props, { emit: __emit }) {
95
- const emit = __emit;
94
+ setup(__props, { emit }) {
96
95
  const sortChange = (e) => {
97
96
  emit("sortChange", e);
98
97
  };
@@ -10,8 +10,7 @@ const _sfc_main = vue.defineComponent({
10
10
  getData: {}
11
11
  },
12
12
  emits: ["cellMouseEnter", "cellMouseLeave", "clickTitle"],
13
- setup(__props, { emit: __emit }) {
14
- const emit = __emit;
13
+ setup(__props, { emit }) {
15
14
  const cellMouseEnter = (params) => {
16
15
  emit("cellMouseEnter", params);
17
16
  };
@@ -21,8 +21,7 @@ const _sfc_main = vue.defineComponent({
21
21
  userStore: {}
22
22
  },
23
23
  emits: ["update:visible", "comfirm"],
24
- setup(__props, { emit: __emit }) {
25
- const emit = __emit;
24
+ setup(__props, { emit }) {
26
25
  const props = __props;
27
26
  const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
28
27
  const visible = vue.computed({
@@ -12,10 +12,9 @@ const _sfc_main = vue.defineComponent({
12
12
  userInfo: {}
13
13
  },
14
14
  emits: ["update:group_id", "search"],
15
- setup(__props, { emit: __emit }) {
16
- const columnIdMap = typeMap.compoColumnsMap();
15
+ setup(__props, { emit }) {
17
16
  const props = __props;
18
- const emit = __emit;
17
+ const columnIdMap = typeMap.compoColumnsMap();
19
18
  const filter = vue.ref({ keyword: "", columns: "" });
20
19
  const groupId = vue.computed({
21
20
  get() {