@cmstops/pro-compo 3.9.1-rc.1 → 3.9.1-rc.11

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 (101) hide show
  1. package/README.md +103 -76
  2. package/dist/index.css +49 -4
  3. package/dist/index.min.css +1 -1
  4. package/es/baseFilter/component.js +71 -14
  5. package/es/config.js +1 -1
  6. package/es/contentDetailList/component.js +24 -0
  7. package/es/contentDetailList/components/Content/index.js +2 -1
  8. package/es/contentDetailList/components/Doc/index.js +6 -0
  9. package/es/docHistory/component.js +41 -12
  10. package/es/docHistory/scripts/diff.js +4 -3
  11. package/es/docHistory/style/index.css +4 -0
  12. package/es/docHistory/style/index.less +5 -0
  13. package/es/hooks/useAttachement.js +2 -9
  14. package/es/hooks/usePopper.d.ts +1 -1
  15. package/es/hooks/usePopper.js +3 -3
  16. package/es/hooks/useUpload.d.ts +50 -2
  17. package/es/hooks/useUpload.js +43 -4
  18. package/es/index.css +49 -4
  19. package/es/index.d.ts +1 -0
  20. package/es/index.js +1 -0
  21. package/es/selectAddTo/component.d.ts +0 -0
  22. package/es/selectAddTo/component.js +125 -0
  23. package/es/selectAddTo/component.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  24. package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  25. package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +169 -0
  26. package/es/selectAddTo/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  27. package/es/selectAddTo/components/ViewAllColumn/index.d.ts +0 -0
  28. package/es/selectAddTo/components/ViewAllColumn/index.js +209 -0
  29. package/es/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  30. package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +78 -0
  31. package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.d.ts +144 -0
  32. package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +193 -0
  33. package/es/selectAddTo/components/ViewAllColumn/types/index.d.ts +59 -0
  34. package/es/selectAddTo/index.d.ts +2 -0
  35. package/es/selectAddTo/index.js +7 -0
  36. package/es/selectAddTo/script/api.d.ts +18 -0
  37. package/es/selectAddTo/script/api.js +30 -0
  38. package/es/selectAddTo/script/index.d.ts +2 -0
  39. package/es/selectAddTo/script/useSelectAddToState.d.ts +21 -0
  40. package/es/selectAddTo/script/useSelectAddToState.js +106 -0
  41. package/es/selectAddTo/style/css.js +1 -0
  42. package/es/selectAddTo/style/index.css +3 -0
  43. package/es/selectAddTo/style/index.d.ts +1 -0
  44. package/es/selectAddTo/style/index.js +1 -0
  45. package/es/selectAddTo/style/index.less +3 -0
  46. package/es/selectAddTo/types/index.d.ts +42 -0
  47. package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +268 -0
  48. package/es/selectResourceModal/__demo__/module/basic.d.ts +299 -0
  49. package/es/selectResourceModal/components/List/ListLocal/index.js +8 -3
  50. package/es/selectResourceModal/components/List/ListNormal/Filter.js +201 -89
  51. package/es/selectResourceModal/components/List/ListNormal/index.js +23 -7
  52. package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +21 -0
  53. package/es/selectResourceModal/hooks/useResponsiveFilter.js +142 -0
  54. package/es/selectResourceModal/scripts/useCompoLf.js +1 -1
  55. package/es/selectResourceModal/style/index.css +45 -4
  56. package/es/selectResourceModal/style/index.less +14 -0
  57. package/es/selectResourceModal/style/list.less +40 -4
  58. package/es/selectThumb/component.js +16 -27
  59. package/es/style.css +57 -0
  60. package/es/typeIcons/component.js +1 -1
  61. package/es/utils/index.js +6 -6
  62. package/lib/baseFilter/component.js +69 -12
  63. package/lib/config.js +1 -1
  64. package/lib/contentDetailList/component.js +24 -0
  65. package/lib/contentDetailList/components/Content/index.js +2 -1
  66. package/lib/contentDetailList/components/Doc/index.js +6 -0
  67. package/lib/docHistory/component.js +39 -10
  68. package/lib/docHistory/scripts/diff.js +4 -3
  69. package/lib/docHistory/style/index.css +4 -0
  70. package/lib/docHistory/style/index.less +5 -0
  71. package/lib/hooks/useAttachement.js +2 -9
  72. package/lib/hooks/usePopper.js +3 -3
  73. package/lib/hooks/useUpload.js +43 -3
  74. package/lib/index.css +49 -4
  75. package/lib/index.js +2 -0
  76. package/lib/selectAddTo/component.js +126 -0
  77. package/lib/selectAddTo/component.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
  78. package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +170 -0
  79. package/lib/selectAddTo/components/ViewAllColumn/index.js +210 -0
  80. package/lib/selectAddTo/components/ViewAllColumn/index.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
  81. package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +80 -0
  82. package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +195 -0
  83. package/lib/selectAddTo/index.js +8 -0
  84. package/lib/selectAddTo/script/api.js +35 -0
  85. package/lib/selectAddTo/script/useSelectAddToState.js +108 -0
  86. package/lib/selectAddTo/style/css.js +2 -0
  87. package/lib/selectAddTo/style/index.css +3 -0
  88. package/lib/selectAddTo/style/index.js +2 -0
  89. package/lib/selectAddTo/style/index.less +3 -0
  90. package/lib/selectResourceModal/components/List/ListLocal/index.js +6 -1
  91. package/lib/selectResourceModal/components/List/ListNormal/Filter.js +198 -86
  92. package/lib/selectResourceModal/components/List/ListNormal/index.js +22 -6
  93. package/lib/selectResourceModal/hooks/useResponsiveFilter.js +144 -0
  94. package/lib/selectResourceModal/scripts/useCompoLf.js +1 -1
  95. package/lib/selectResourceModal/style/index.css +45 -4
  96. package/lib/selectResourceModal/style/index.less +14 -0
  97. package/lib/selectResourceModal/style/list.less +40 -4
  98. package/lib/selectThumb/component.js +16 -27
  99. package/lib/typeIcons/component.js +1 -1
  100. package/lib/utils/index.js +6 -6
  101. package/package.json +1 -1
@@ -4,7 +4,6 @@ var webVue = require("@arco-design/web-vue");
4
4
  var ListWraper = require("../ListWraper.js");
5
5
  var useAttachement = require("../../../../hooks/useAttachement.js");
6
6
  var Filter = require("./Filter.js");
7
- const _hoisted_1 = { class: "list-item-grid" };
8
7
  const _sfc_main = vue.defineComponent({
9
8
  __name: "index",
10
9
  props: {
@@ -28,6 +27,18 @@ const _sfc_main = vue.defineComponent({
28
27
  changeKey
29
28
  } = useAttachement["default"]({ key: props.activeKey, BASE_API });
30
29
  vue.watch(() => props.activeKey, changeKey);
30
+ const listWrapper = vue.ref(null);
31
+ const smallScreen = vue.ref(false);
32
+ vue.watch(
33
+ () => {
34
+ var _a;
35
+ return (_a = listWrapper.value) == null ? void 0 : _a.offsetWidth;
36
+ },
37
+ (val) => {
38
+ smallScreen.value = !!(val && val < 600);
39
+ },
40
+ { immediate: true }
41
+ );
31
42
  vue.onMounted(() => {
32
43
  loadData();
33
44
  });
@@ -41,9 +52,10 @@ const _sfc_main = vue.defineComponent({
41
52
  ]),
42
53
  header: vue.withCtx(() => [
43
54
  vue.createVNode(Filter, {
55
+ smallScreen: smallScreen.value,
44
56
  onChange: vue.unref(changeFilter),
45
57
  onUpload: _cache[0] || (_cache[0] = ($event) => emits("change-tab", "local"))
46
- }, null, 8, ["onChange"])
58
+ }, null, 8, ["smallScreen", "onChange"])
47
59
  ]),
48
60
  footer: vue.withCtx(() => [
49
61
  vue.createVNode(vue.unref(webVue.Pagination), {
@@ -52,22 +64,26 @@ const _sfc_main = vue.defineComponent({
52
64
  total: vue.unref(total),
53
65
  "page-size": vue.unref(limit),
54
66
  "show-total": "",
55
- "show-page-size": "",
67
+ "show-page-size": !smallScreen.value,
56
68
  "base-size": 3,
57
69
  "buffer-size": 1,
58
70
  onChange: _cache[2] || (_cache[2] = (e) => vue.unref(changePage)((e - 1) * vue.unref(limit))),
59
71
  onPageSizeChange: vue.unref(changeSize)
60
- }, null, 8, ["current", "total", "page-size", "onPageSizeChange"])
72
+ }, null, 8, ["current", "total", "page-size", "show-page-size", "onPageSizeChange"])
61
73
  ]),
62
74
  default: vue.withCtx(() => [
63
- vue.createElementVNode("div", _hoisted_1, [
75
+ vue.createElementVNode("div", {
76
+ ref_key: "listWrapper",
77
+ ref: listWrapper,
78
+ class: "list-item-grid"
79
+ }, [
64
80
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item) => {
65
81
  return vue.renderSlot(_ctx.$slots, "item", {
66
82
  key: item.id,
67
83
  item
68
84
  });
69
85
  }), 128))
70
- ])
86
+ ], 512)
71
87
  ]),
72
88
  _: 3
73
89
  }, 8, ["loading", "is-empty"]);
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var vue = require("vue");
4
+ var usePopper = require("../../hooks/usePopper.js");
5
+ const getRect = (el) => {
6
+ if (!el || typeof el.getClientRects !== "function")
7
+ return { right: 0, width: 0 };
8
+ const rects = el.getClientRects();
9
+ if (rects.length === 0)
10
+ return { right: 0, width: 0 };
11
+ const rect = rects[0];
12
+ return {
13
+ right: rect.right,
14
+ width: rect.width
15
+ };
16
+ };
17
+ function useResponsiveFilter(filterItemsRef) {
18
+ const moreBtnRef = vue.ref();
19
+ const popperPanelRef = vue.ref();
20
+ const { initPopper, show, visible, hide } = usePopper(
21
+ popperPanelRef,
22
+ moreBtnRef
23
+ );
24
+ const windowWidth = vue.ref(0);
25
+ const filterContainerRightBoundary = vue.ref(0);
26
+ const hiddenElementList = vue.ref([]);
27
+ const initWidths = () => {
28
+ var _a, _b;
29
+ windowWidth.value = ((_a = document.body) == null ? void 0 : _a.clientWidth) || 0;
30
+ const containerElement = (_b = filterItemsRef.value) == null ? void 0 : _b.parentElement;
31
+ if (containerElement) {
32
+ filterContainerRightBoundary.value = getRect(containerElement).right;
33
+ }
34
+ };
35
+ const initResizeListener = () => {
36
+ window.addEventListener("resize", refreshLayout);
37
+ };
38
+ const removeResizeListener = () => {
39
+ window.removeEventListener("resize", refreshLayout);
40
+ };
41
+ const hideElement = (el) => {
42
+ var _a, _b, _c;
43
+ const { width } = getRect(el);
44
+ if (width > 0 && ((_a = filterItemsRef.value) == null ? void 0 : _a.contains(el))) {
45
+ hiddenElementList.value.push({ width, el });
46
+ (_b = filterItemsRef.value) == null ? void 0 : _b.removeChild(el);
47
+ (_c = popperPanelRef.value) == null ? void 0 : _c.insertBefore(el, popperPanelRef.value.firstChild);
48
+ }
49
+ };
50
+ const showElement = () => {
51
+ var _a, _b;
52
+ if (!hiddenElementList.value.length || !filterItemsRef.value)
53
+ return;
54
+ const popEl = hiddenElementList.value.pop();
55
+ if (!popEl)
56
+ return;
57
+ const { el } = popEl;
58
+ (_a = popperPanelRef.value) == null ? void 0 : _a.removeChild(el);
59
+ (_b = filterItemsRef.value) == null ? void 0 : _b.appendChild(el);
60
+ };
61
+ const checkOverflow = () => {
62
+ if (!filterItemsRef.value)
63
+ return -1;
64
+ const containerRight = filterContainerRightBoundary.value;
65
+ const children = filterItemsRef.value.children;
66
+ let currentRightmostBoundary = getRect(filterItemsRef.value).right - getRect(filterItemsRef.value).width;
67
+ for (let i = children.length - 1; i >= 0; i--) {
68
+ const item = children[i];
69
+ if (!item || !item.classList || !item.classList.contains("filter-item"))
70
+ continue;
71
+ const itemRect = getRect(item);
72
+ if (itemRect.right > containerRight - 400) {
73
+ hideElement(item);
74
+ } else {
75
+ currentRightmostBoundary = Math.max(
76
+ currentRightmostBoundary,
77
+ itemRect.right
78
+ );
79
+ }
80
+ }
81
+ return currentRightmostBoundary;
82
+ };
83
+ const refreshLayout = async () => {
84
+ await vue.nextTick();
85
+ initWidths();
86
+ if (!filterItemsRef.value || !popperPanelRef.value)
87
+ return;
88
+ const containerRight = filterContainerRightBoundary.value;
89
+ let lastVisibleItemRight = checkOverflow();
90
+ if (lastVisibleItemRight === -1 && filterItemsRef.value.children.length > 0) {
91
+ lastVisibleItemRight = getRect(filterItemsRef.value).left;
92
+ } else if (filterItemsRef.value.children.length === 0) {
93
+ lastVisibleItemRight = getRect(filterItemsRef.value).left;
94
+ }
95
+ await vue.nextTick();
96
+ let availableSpace = containerRight - lastVisibleItemRight;
97
+ while (hiddenElementList.value.length > 0) {
98
+ const nextHiddenItem = hiddenElementList.value[hiddenElementList.value.length - 1];
99
+ const nextHiddenItemWidth = nextHiddenItem.width;
100
+ if (availableSpace > nextHiddenItemWidth + 10) {
101
+ showElement();
102
+ await vue.nextTick();
103
+ const visibleElements = Array.from(
104
+ filterItemsRef.value.children
105
+ );
106
+ if (visibleElements.length > 0) {
107
+ lastVisibleItemRight = visibleElements.reduce((maxRight, el) => {
108
+ var _a;
109
+ if ((_a = el.classList) == null ? void 0 : _a.contains("filter-item")) {
110
+ return Math.max(maxRight, getRect(el).right);
111
+ }
112
+ return maxRight;
113
+ }, getRect(filterItemsRef.value).left);
114
+ } else {
115
+ lastVisibleItemRight = getRect(filterItemsRef.value).left;
116
+ }
117
+ availableSpace = containerRight - lastVisibleItemRight;
118
+ } else {
119
+ break;
120
+ }
121
+ }
122
+ };
123
+ vue.onMounted(async () => {
124
+ initResizeListener();
125
+ initPopper("bottom-start", [0, 40]);
126
+ await vue.nextTick();
127
+ initWidths();
128
+ await vue.nextTick();
129
+ refreshLayout();
130
+ });
131
+ vue.onUnmounted(() => {
132
+ removeResizeListener();
133
+ });
134
+ return {
135
+ moreBtnRef,
136
+ popperPanelRef,
137
+ hiddenElementList,
138
+ visible,
139
+ show,
140
+ hide,
141
+ refreshLayout
142
+ };
143
+ }
144
+ exports.useResponsiveFilter = useResponsiveFilter;
@@ -8,7 +8,7 @@ function useCompoentLifycycle(props, emits, handler) {
8
8
  return {
9
9
  class: "resource-select-drawer",
10
10
  header: false,
11
- width: "1024px",
11
+ width: "85vw",
12
12
  footer: false,
13
13
  unmountOnClose: true
14
14
  };
@@ -172,11 +172,13 @@
172
172
  }
173
173
  .resource-list-footer,
174
174
  .resource-list-header,
175
+ .resource-list-content .resource-list-content-empty,
175
176
  .resource-list-content .arco-scrollbar-container {
176
177
  padding: 0 40px;
177
178
  }
178
179
  .resource-list-footer {
179
180
  display: flex;
181
+ flex-wrap: wrap;
180
182
  justify-content: space-between;
181
183
  padding-bottom: 20px;
182
184
  }
@@ -186,6 +188,10 @@
186
188
  gap: 10px;
187
189
  align-items: center;
188
190
  justify-content: flex-end;
191
+ margin-top: 10px;
192
+ }
193
+ .resource-list-footer .footer-right .list-selected-wrapper {
194
+ font-size: 12px;
189
195
  }
190
196
  .resource-list-content-loading {
191
197
  display: flex;
@@ -197,7 +203,7 @@
197
203
  .resource-list .list-item-grid {
198
204
  display: grid;
199
205
  grid-gap: 20px;
200
- grid-template-columns: repeat(5, 1fr);
206
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
201
207
  }
202
208
  .resource-list .list-content {
203
209
  margin-top: 30px;
@@ -240,7 +246,8 @@
240
246
  }
241
247
  .resource-list .list-filter-wrapper .list-filter-tags {
242
248
  display: flex;
243
- justify-content: space-between;
249
+ flex-wrap: wrap;
250
+ gap: 10px;
244
251
  margin-top: 10px;
245
252
  }
246
253
  .resource-list .list-filter-wrapper .list-filter-tags .list-filter-tag {
@@ -261,16 +268,41 @@
261
268
  justify-content: space-between;
262
269
  }
263
270
  .resource-list .list-filter-wrapper .list-filter .filter-list {
271
+ position: relative;
272
+ /** 给 popup 一个参考 */
264
273
  display: flex;
265
- flex-wrap: wrap;
266
- gap: 10px;
267
274
  }
268
275
  .resource-list .list-filter-wrapper .list-filter .filter-list .filter-item {
269
276
  width: 100px;
277
+ margin-right: 10px;
278
+ }
279
+ .resource-list .list-filter-wrapper .list-filter .filter-list .arco-trigger-popup {
280
+ z-index: 100000 !important;
270
281
  }
271
282
  .resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
272
283
  padding: 0;
273
284
  }
285
+ .resource-list .list-filter-wrapper .list-filter .more-btn {
286
+ position: relative;
287
+ /** 给 poperjs 一个参考 */
288
+ }
289
+ .resource-list .list-filter-wrapper .list-filter .more-btn .filter-pannel {
290
+ inset: 40px auto auto auto !important;
291
+ }
292
+ .resource-list .list-filter-wrapper .filter-extra {
293
+ display: flex;
294
+ gap: 10px;
295
+ }
296
+ .resource-list .list-filter-wrapper .filter-pannel {
297
+ z-index: 100000;
298
+ display: flex;
299
+ flex-direction: column;
300
+ gap: 10px;
301
+ padding: 10px;
302
+ background-color: #fff;
303
+ border-radius: 4px;
304
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
305
+ }
274
306
  .resource-list .title {
275
307
  display: flex;
276
308
  gap: 8px;
@@ -284,6 +316,10 @@
284
316
  height: 16px;
285
317
  background-color: #4886ff;
286
318
  }
319
+ .resource-select-wrap {
320
+ width: 100%;
321
+ height: 100%;
322
+ }
287
323
  .resource-select-modal-body {
288
324
  height: 80vh;
289
325
  padding: 0;
@@ -312,3 +348,8 @@
312
348
  .resource-select-container .resource-select-header .arco-tabs-content {
313
349
  display: none !important;
314
350
  }
351
+ .resource-select-container .resource-list-content .resource-list-content-empty {
352
+ box-sizing: border-box;
353
+ width: 100%;
354
+ height: 100%;
355
+ }
@@ -2,6 +2,11 @@
2
2
  @import './listCardWrapper.less';
3
3
  @import './list.less';
4
4
 
5
+ .resource-select-wrap {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+
5
10
  .resource-select-modal-body {
6
11
  height: 80vh;
7
12
  padding: 0;
@@ -38,4 +43,13 @@
38
43
  display: none !important;
39
44
  }
40
45
  }
46
+
47
+ // 内容区域样式
48
+ .resource-list-content {
49
+ .resource-list-content-empty {
50
+ box-sizing: border-box;
51
+ width: 100%;
52
+ height: 100%;
53
+ }
54
+ }
41
55
  }
@@ -14,12 +14,14 @@
14
14
 
15
15
  &-footer,
16
16
  &-header,
17
+ &-content .resource-list-content-empty,
17
18
  &-content .arco-scrollbar-container {
18
19
  padding: 0 40px;
19
20
  }
20
21
 
21
22
  &-footer {
22
23
  display: flex;
24
+ flex-wrap: wrap;
23
25
  justify-content: space-between;
24
26
  padding-bottom: 20px;
25
27
 
@@ -29,6 +31,11 @@
29
31
  gap: 10px;
30
32
  align-items: center;
31
33
  justify-content: flex-end;
34
+ margin-top: 10px;
35
+
36
+ .list-selected-wrapper {
37
+ font-size: 12px;
38
+ }
32
39
  }
33
40
  }
34
41
 
@@ -47,7 +54,7 @@
47
54
  .list-item-grid {
48
55
  display: grid;
49
56
  grid-gap: 20px;
50
- grid-template-columns: repeat(5, 1fr);
57
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
51
58
  }
52
59
  }
53
60
 
@@ -108,7 +115,8 @@
108
115
  .resource-list .list-filter-wrapper {
109
116
  .list-filter-tags {
110
117
  display: flex;
111
- justify-content: space-between;
118
+ flex-wrap: wrap;
119
+ gap: 10px;
112
120
  margin-top: 10px;
113
121
 
114
122
  .list-filter-tag {
@@ -133,18 +141,46 @@
133
141
  justify-content: space-between;
134
142
 
135
143
  .filter-list {
144
+ position: relative; /** 给 popup 一个参考 */
136
145
  display: flex;
137
- flex-wrap: wrap;
138
- gap: 10px;
139
146
 
140
147
  .filter-item {
141
148
  width: 100px;
149
+ margin-right: 10px;
150
+ }
151
+
152
+ .arco-trigger-popup {
153
+ z-index: 100000 !important;
142
154
  }
143
155
  }
144
156
 
145
157
  .arco-input-prepend {
146
158
  padding: 0;
147
159
  }
160
+
161
+ .more-btn {
162
+ position: relative; /** 给 poperjs 一个参考 */
163
+
164
+ .filter-pannel {
165
+ inset: 40px auto auto auto !important;
166
+ }
167
+ }
168
+ }
169
+
170
+ .filter-extra {
171
+ display: flex;
172
+ gap: 10px;
173
+ }
174
+
175
+ .filter-pannel {
176
+ z-index: 100000;
177
+ display: flex;
178
+ flex-direction: column;
179
+ gap: 10px;
180
+ padding: 10px;
181
+ background-color: #fff;
182
+ border-radius: 4px;
183
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
148
184
  }
149
185
  }
150
186
 
@@ -352,9 +352,11 @@ const _sfc_main = vue.defineComponent({
352
352
  if (!props.dataValue)
353
353
  return;
354
354
  if (styleData.value.model === oldData.value.model) {
355
- styleData.value.data = oldData.value.data;
356
- styleData.value.cover_theme_color = oldData.value.cover_theme_color;
357
- styleData.value.cover_colorList = oldData.value.cover_colorList;
355
+ vue.nextTick(() => {
356
+ styleData.value.data = oldData.value.data;
357
+ styleData.value.cover_theme_color = oldData.value.cover_theme_color;
358
+ styleData.value.cover_colorList = oldData.value.cover_colorList;
359
+ });
358
360
  } else {
359
361
  styleData.value.data = [];
360
362
  }
@@ -410,21 +412,8 @@ const _sfc_main = vue.defineComponent({
410
412
  callback(styleData2);
411
413
  };
412
414
  vue.onMounted(() => {
413
- if (!styleData.value.cover_url) {
414
- setTimeout(() => {
415
- styleData.value.cover_url = styleData.value.data[0].url;
416
- const getColors = index.getThemeColor(BASE_API, styleData.value.data[0].url);
417
- getColors.then((themes) => {
418
- styleData.value.cover_colorList = JSON.parse(JSON.stringify(themes));
419
- styleData.value.cover_theme_color = `rgb(${themes[1]})`;
420
- oldData.value = JSON.parse(JSON.stringify(styleData.value));
421
- callback(styleData.value);
422
- }).catch((e) => {
423
- styleData.value.banner_theme_color = `rgb(255, 255, 255)`;
424
- callback(styleData.value);
425
- });
426
- }, 700);
427
- }
415
+ if (!styleData.value.cover_url)
416
+ ;
428
417
  });
429
418
  return (_ctx, _cache) => {
430
419
  var _a, _b, _c, _d, _e, _f;
@@ -517,15 +506,15 @@ const _sfc_main = vue.defineComponent({
517
506
  }), 128))
518
507
  ]),
519
508
  _: 1
520
- }, 8, ["modelValue"])
521
- ], 64)) : vue.createCommentVNode("v-if", true),
522
- hasCover.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
523
- key: 3,
524
- "style-data": styleData.value,
525
- model: "cover",
526
- style: { "margin-top": "10px" },
527
- onChange: colorChange
528
- }, null, 8, ["style-data"])) : vue.createCommentVNode("v-if", true)
509
+ }, 8, ["modelValue"]),
510
+ hasCover.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
511
+ key: 0,
512
+ "style-data": styleData.value,
513
+ model: "cover",
514
+ style: { "margin-top": "10px" },
515
+ onChange: colorChange
516
+ }, null, 8, ["style-data"])) : vue.createCommentVNode("v-if", true)
517
+ ], 64)) : vue.createCommentVNode("v-if", true)
529
518
  ])
530
519
  ], 2),
531
520
  _ctx.mode === "doc" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -36,7 +36,7 @@ const _sfc_main = vue.defineComponent({
36
36
  vue.createVNode(vue.unref(vueCmstopIcons.IconYinpinji), { style: { "color": "#1fb7c2" } })
37
37
  ], 2112)) : props.doc && props.type === "video_album" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 7 }, [
38
38
  vue.createCommentVNode(" \u89C6\u9891\u96C6 "),
39
- vue.createVNode(vue.unref(vueCmstopIcons.IconShipinji))
39
+ vue.createVNode(vue.unref(vueCmstopIcons.IconShipinji), { style: { "color": "#f05050" } })
40
40
  ], 2112)) : props.doc && props.type === "mini_program" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 8 }, [
41
41
  vue.createCommentVNode(" \u89C6\u9891\u96C6 "),
42
42
  vue.createVNode(vue.unref(vueCmstopIcons.IconMiniprogram))
@@ -144,13 +144,13 @@ async function copyContent(content) {
144
144
  }
145
145
  }
146
146
  function mediaTime(v) {
147
- const h = Math.floor(v / (60 * 60));
148
- const m = Math.floor((v - h) / 60);
149
- const s = Math.floor(v - h * 360 - m * 60);
147
+ const h = Math.floor(v / 3600);
148
+ const m = Math.floor(v % 3600 / 60);
149
+ const s = Math.floor(v % 60);
150
150
  let ret = "";
151
- ret += `${h < 10 ? `0${h}` : h || "--"}:`;
152
- ret += `${m < 10 ? `0${m}` : m || "--"}:`;
153
- ret += s < 10 ? `0${s}` : s || "--";
151
+ ret += `${h < 10 ? `0${h}` : h}:`;
152
+ ret += `${m < 10 ? `0${m}` : m}:`;
153
+ ret += s < 10 ? `0${s}` : s;
154
154
  return ret;
155
155
  }
156
156
  exports.copyContent = copyContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "3.9.1-rc.1",
3
+ "version": "3.9.1-rc.11",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",