@cmstops/pro-compo 3.9.1-stable.0 → 3.9.1-stable.2

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 (44) hide show
  1. package/dist/index.css +49 -4
  2. package/dist/index.min.css +1 -1
  3. package/es/config.js +1 -1
  4. package/es/contentDetailList/component.js +24 -0
  5. package/es/contentDetailList/components/Content/index.js +2 -1
  6. package/es/contentDetailList/components/Doc/index.js +6 -0
  7. package/es/docHistory/component.js +41 -12
  8. package/es/docHistory/style/index.css +4 -0
  9. package/es/docHistory/style/index.less +5 -0
  10. package/es/hooks/usePopper.d.ts +1 -1
  11. package/es/hooks/usePopper.js +3 -3
  12. package/es/hooks/useUpload.d.ts +50 -2
  13. package/es/hooks/useUpload.js +43 -4
  14. package/es/index.css +49 -4
  15. package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +268 -0
  16. package/es/selectResourceModal/__demo__/module/basic.d.ts +299 -0
  17. package/es/selectResourceModal/components/List/ListLocal/index.js +8 -3
  18. package/es/selectResourceModal/components/List/ListNormal/Filter.js +198 -90
  19. package/es/selectResourceModal/components/List/ListNormal/index.js +23 -7
  20. package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +21 -0
  21. package/es/selectResourceModal/hooks/useResponsiveFilter.js +142 -0
  22. package/es/selectResourceModal/style/index.css +45 -4
  23. package/es/selectResourceModal/style/index.less +14 -0
  24. package/es/selectResourceModal/style/list.less +40 -4
  25. package/es/utils/index.js +6 -6
  26. package/lib/config.js +1 -1
  27. package/lib/contentDetailList/component.js +24 -0
  28. package/lib/contentDetailList/components/Content/index.js +2 -1
  29. package/lib/contentDetailList/components/Doc/index.js +6 -0
  30. package/lib/docHistory/component.js +39 -10
  31. package/lib/docHistory/style/index.css +4 -0
  32. package/lib/docHistory/style/index.less +5 -0
  33. package/lib/hooks/usePopper.js +3 -3
  34. package/lib/hooks/useUpload.js +43 -3
  35. package/lib/index.css +49 -4
  36. package/lib/selectResourceModal/components/List/ListLocal/index.js +6 -1
  37. package/lib/selectResourceModal/components/List/ListNormal/Filter.js +195 -87
  38. package/lib/selectResourceModal/components/List/ListNormal/index.js +22 -6
  39. package/lib/selectResourceModal/hooks/useResponsiveFilter.js +144 -0
  40. package/lib/selectResourceModal/style/index.css +45 -4
  41. package/lib/selectResourceModal/style/index.less +14 -0
  42. package/lib/selectResourceModal/style/list.less +40 -4
  43. package/lib/utils/index.js +6 -6
  44. package/package.json +1 -1
@@ -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
 
package/es/utils/index.js CHANGED
@@ -137,13 +137,13 @@ async function copyContent(content) {
137
137
  }
138
138
  }
139
139
  function mediaTime(v) {
140
- const h = Math.floor(v / (60 * 60));
141
- const m = Math.floor((v - h) / 60);
142
- const s = Math.floor(v - h * 360 - m * 60);
140
+ const h = Math.floor(v / 3600);
141
+ const m = Math.floor(v % 3600 / 60);
142
+ const s = Math.floor(v % 60);
143
143
  let ret = "";
144
- ret += `${h < 10 ? `0${h}` : h || "--"}:`;
145
- ret += `${m < 10 ? `0${m}` : m || "--"}:`;
146
- ret += s < 10 ? `0${s}` : s || "--";
144
+ ret += `${h < 10 ? `0${h}` : h}:`;
145
+ ret += `${m < 10 ? `0${m}` : m}:`;
146
+ ret += s < 10 ? `0${s}` : s;
147
147
  return ret;
148
148
  }
149
149
  export { copyContent, dateYYYYDDMMHHmm, generateUUID, getRealUrl, getThemeColor, mediaTime, noCoverText, replaceSuffix, timeFormat, to, validateForm };
package/lib/config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a, _b, _c, _d, _e, _f, _g, _h;
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
4
- const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.cmstop.xyz";
4
+ const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.r.cmstop.xyz";
5
5
  const DEFAULT_BASE_ACCOUNT_HOST = ((_d = (_c = window.situoyun) == null ? void 0 : _c.env) == null ? void 0 : _d.BASE_ACCOUNT_HOST) || "https://account.cmstop.xyz";
6
6
  const DEFAULT_UPLOAD_CHUNK_SIZE = ((_f = (_e = window.situoyun) == null ? void 0 : _e.env) == null ? void 0 : _f.UPLOAD_CHUNK_SIZE) || 5242880;
7
7
  const DEFAULT_UPLOAD_URL = ((_h = (_g = window.situoyun) == null ? void 0 : _g.env) == null ? void 0 : _h.BASE_STATIC_FILE_API) || "https://oss.cmstop.xyz/maple/v1";
@@ -109,6 +109,12 @@ const _sfc_main = vue.defineComponent({
109
109
  onCellMouseEnter: tableCellMouseEnter,
110
110
  onCellMouseLeave: tableCellMouseLeave
111
111
  }, {
112
+ "after-index": vue.withCtx(() => [
113
+ vue.renderSlot(_ctx.$slots, "after-index", {
114
+ row: element,
115
+ index: index$4
116
+ })
117
+ ]),
112
118
  batch: vue.withCtx(() => [
113
119
  vue.renderSlot(_ctx.$slots, "batch", {
114
120
  row: element,
@@ -133,6 +139,12 @@ const _sfc_main = vue.defineComponent({
133
139
  onCellMouseEnter: tableCellMouseEnter,
134
140
  onCellMouseLeave: tableCellMouseLeave
135
141
  }, {
142
+ "after-index": vue.withCtx(() => [
143
+ vue.renderSlot(_ctx.$slots, "after-index", {
144
+ row: element,
145
+ index: index$4
146
+ })
147
+ ]),
136
148
  tip: vue.withCtx(() => [
137
149
  vue.renderSlot(_ctx.$slots, "tip", {
138
150
  row: element,
@@ -229,6 +241,12 @@ const _sfc_main = vue.defineComponent({
229
241
  onCellMouseEnter: tableCellMouseEnter,
230
242
  onCellMouseLeave: tableCellMouseLeave
231
243
  }, {
244
+ "after-index": vue.withCtx(() => [
245
+ vue.renderSlot(_ctx.$slots, "after-index", {
246
+ row: item,
247
+ index: index$4
248
+ })
249
+ ]),
232
250
  batch: vue.withCtx(() => [
233
251
  vue.renderSlot(_ctx.$slots, "batch", {
234
252
  row: item,
@@ -253,6 +271,12 @@ const _sfc_main = vue.defineComponent({
253
271
  onCellMouseEnter: tableCellMouseEnter,
254
272
  onCellMouseLeave: tableCellMouseLeave
255
273
  }, {
274
+ "after-index": vue.withCtx(() => [
275
+ vue.renderSlot(_ctx.$slots, "after-index", {
276
+ row: item,
277
+ index: index$4
278
+ })
279
+ ]),
256
280
  tip: vue.withCtx(() => [
257
281
  vue.renderSlot(_ctx.$slots, "tip", {
258
282
  row: item,
@@ -143,7 +143,8 @@ const _sfc_main = vue.defineComponent({
143
143
  })
144
144
  ]),
145
145
  index: vue.withCtx(() => [
146
- vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(_ctx.index + 1), 1)
146
+ vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(_ctx.index + 1), 1),
147
+ vue.renderSlot(_ctx.$slots, "after-index")
147
148
  ]),
148
149
  tip: vue.withCtx(() => [
149
150
  vue.createCommentVNode(" \u5148\u6DFB\u52A0\u6587\u4EF6\u8D44\u6E90\uFF0C\u672A\u53D1\u5E03 "),
@@ -38,6 +38,12 @@ const _sfc_main = vue.defineComponent({
38
38
  index: _ctx.index
39
39
  })
40
40
  ]),
41
+ "after-index": vue.withCtx(() => [
42
+ vue.renderSlot(_ctx.$slots, "after-index", {
43
+ row: _ctx.element,
44
+ index: _ctx.index
45
+ })
46
+ ]),
41
47
  batch: vue.withCtx(() => [
42
48
  vue.renderSlot(_ctx.$slots, "batch", {
43
49
  row: _ctx.item,
@@ -14,9 +14,11 @@ const _sfc_main = vue.defineComponent({
14
14
  __name: "component",
15
15
  props: {
16
16
  BASE_API: {},
17
+ wrap: { default: "drawer" },
17
18
  visible: { type: Boolean },
18
19
  docInfo: {},
19
- pub: { type: Boolean }
20
+ pub: { type: Boolean },
21
+ currentIdx: {}
20
22
  },
21
23
  emits: ["update:visible", "select"],
22
24
  setup(__props, { emit: __emit }) {
@@ -28,6 +30,20 @@ const _sfc_main = vue.defineComponent({
28
30
  emits("update:visible", val);
29
31
  }
30
32
  });
33
+ const wrapProps = vue.computed(() => {
34
+ if (props.wrap === "drawer") {
35
+ return {
36
+ class: "doc-history-drawer-wrap",
37
+ title: "\u7248\u672C\u8BB0\u5F55",
38
+ width: 1e3
39
+ };
40
+ }
41
+ return {
42
+ bodyClass: "doc-history-modal-wrap",
43
+ title: "\u7248\u672C\u8BB0\u5F55",
44
+ width: 1e3
45
+ };
46
+ });
31
47
  const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
32
48
  const {
33
49
  initParams,
@@ -38,6 +54,10 @@ const _sfc_main = vue.defineComponent({
38
54
  list,
39
55
  current
40
56
  } = useDocHistory.useDocHistory(BASE_API);
57
+ const wrapComponent = {
58
+ drawer: webVue.Drawer,
59
+ modal: webVue.Modal
60
+ };
41
61
  function handeRevert() {
42
62
  emits("select", list.value[current.value]);
43
63
  }
@@ -50,20 +70,29 @@ const _sfc_main = vue.defineComponent({
50
70
  },
51
71
  { immediate: true }
52
72
  );
53
- vue.onMounted(() => {
73
+ vue.watch(
74
+ () => props.currentIdx,
75
+ (val) => {
76
+ if (val) {
77
+ handleSelect(val);
78
+ }
79
+ },
80
+ { immediate: true }
81
+ );
82
+ vue.onMounted(async () => {
54
83
  if (!props.docInfo)
55
84
  return;
56
85
  initParams(props.docInfo.id, props.pub);
57
- loadData();
86
+ await loadData();
87
+ if (props.currentIdx) {
88
+ handleSelect(props.currentIdx);
89
+ }
58
90
  });
59
91
  return (_ctx, _cache) => {
60
- return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
92
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(wrapComponent[_ctx.wrap]), vue.mergeProps({
61
93
  visible: vis.value,
62
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => vis.value = $event),
63
- class: "doc-history-drawer",
64
- title: "\u7248\u672C\u8BB0\u5F55",
65
- width: 1e3
66
- }, {
94
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => vis.value = $event)
95
+ }, wrapProps.value), {
67
96
  footer: vue.withCtx(() => [
68
97
  vue.createVNode(vue.unref(webVue.Button), {
69
98
  type: "primary",
@@ -124,7 +153,7 @@ const _sfc_main = vue.defineComponent({
124
153
  ])
125
154
  ]),
126
155
  _: 1
127
- }, 8, ["visible"]);
156
+ }, 16, ["visible"]);
128
157
  };
129
158
  }
130
159
  });
@@ -105,3 +105,7 @@
105
105
  .doc-history-drawer .arco-drawer-footer {
106
106
  text-align: left;
107
107
  }
108
+ .doc-history-modal-wrap {
109
+ height: 70vh;
110
+ padding: 0;
111
+ }
@@ -30,3 +30,8 @@
30
30
  text-align: left;
31
31
  }
32
32
  }
33
+
34
+ .doc-history-modal-wrap {
35
+ height: 70vh;
36
+ padding: 0;
37
+ }
@@ -9,16 +9,16 @@ function usePopper(pannel, triggerEl) {
9
9
  };
10
10
  const show = () => {
11
11
  visible.value = true;
12
- window.onclick = (e) => {
12
+ window.onclick = () => {
13
13
  hide();
14
14
  visible.value = false;
15
15
  window.onclick = null;
16
16
  };
17
17
  };
18
- const initPopper = (placement = "bottom-start") => {
18
+ const initPopper = (placement = "bottom-start", of) => {
19
19
  if (!pannel.value || !triggerEl.value)
20
20
  return;
21
- const offset = [0, 10];
21
+ const offset = of != null ? of : [0, 10];
22
22
  if (window.__POWERED_BY_WUJIE__) {
23
23
  offset[1] = -54;
24
24
  }
@@ -75,7 +75,7 @@ function useUpload(options) {
75
75
  list.value = originList;
76
76
  }
77
77
  };
78
- const uploadFile = (BASE_API, file, dir = 0, repoId, callback) => {
78
+ const uploadFile = (BASE_API, file, dir = 0, repoId, callback, upOptions) => {
79
79
  const newFile = {
80
80
  id: file.id || index.generateUUID(),
81
81
  sig_id: file.sig_id || index.generateUUID(),
@@ -95,18 +95,24 @@ function useUpload(options) {
95
95
  };
96
96
  const uploading = upload.start(progress);
97
97
  uploading.then(async (url) => {
98
+ var _a;
98
99
  if (options == null ? void 0 : options.noAddMedia) {
99
100
  recordTaskStatusChange({ ...newFile, status: 0, url }, 1);
100
101
  callback && callback({ ...newFile, url }, "success");
101
102
  return;
102
103
  }
104
+ const params = {};
105
+ if ((_a = upOptions == null ? void 0 : upOptions.template) == null ? void 0 : _a.watermark) {
106
+ params.watermark = upOptions.template.watermark.default;
107
+ }
103
108
  const { code, message } = await addMedia(BASE_API, {
104
109
  url,
105
110
  size: newFile.size,
106
111
  directory_id: dir,
107
112
  repository_id: repoId,
108
113
  catalog: newFile.type,
109
- alias: newFile.name
114
+ alias: newFile.name,
115
+ ...params
110
116
  });
111
117
  if (code !== 0) {
112
118
  console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u4E0A\u4F20\u5931\u8D25\uFF1A", newFile.name, code, message);
@@ -196,9 +202,16 @@ function getConfiguration(BASE_API, params) {
196
202
  params
197
203
  });
198
204
  }
205
+ function getWatermarkTemplate(BASE_API) {
206
+ return request(BASE_API, {
207
+ url: `/poplar/v2/material/image/watermark`,
208
+ method: "get"
209
+ });
210
+ }
199
211
  function useUploadConfig() {
200
212
  const { get, set, remove } = useLocalStorage["default"]("LOCAL_UPLOAD_CONFIG");
201
213
  const config = vue.ref(get() || {});
214
+ const template = vue.ref({});
202
215
  async function initUploadConfig(BASE_API, domainId) {
203
216
  if (config.value.size_config_enabled != null)
204
217
  return;
@@ -247,16 +260,43 @@ function useUploadConfig() {
247
260
  );
248
261
  return false;
249
262
  }
263
+ async function initTemplate(BASE_API) {
264
+ try {
265
+ const { code, message } = await getWatermarkTemplate(BASE_API);
266
+ if (code !== 0)
267
+ return;
268
+ if (message) {
269
+ let defaultWaterMark;
270
+ if (Array.isArray(message.images)) {
271
+ message.images.forEach((item) => {
272
+ if (message.default === item.id)
273
+ defaultWaterMark = item;
274
+ });
275
+ }
276
+ template.value = {
277
+ watermark: {
278
+ default: defaultWaterMark,
279
+ images: message.images
280
+ }
281
+ };
282
+ }
283
+ } catch (e) {
284
+ console.error(e);
285
+ }
286
+ }
250
287
  window.addEventListener("beforeunload", remove, false);
251
288
  return {
252
289
  config,
290
+ template,
253
291
  checkFileSizeOutLimit,
254
- initUploadConfig
292
+ initUploadConfig,
293
+ initTemplate
255
294
  };
256
295
  }
257
296
  exports.addMedia = addMedia;
258
297
  exports["default"] = useUpload;
259
298
  exports.getMediaDetails = getMediaDetails;
260
299
  exports.getSize = getSize;
300
+ exports.getWatermarkTemplate = getWatermarkTemplate;
261
301
  exports.reTranscodeMedia = reTranscodeMedia;
262
302
  exports.useUploadConfig = useUploadConfig;
package/lib/index.css CHANGED
@@ -4529,11 +4529,13 @@
4529
4529
  }
4530
4530
  .resource-list-footer,
4531
4531
  .resource-list-header,
4532
+ .resource-list-content .resource-list-content-empty,
4532
4533
  .resource-list-content .arco-scrollbar-container {
4533
4534
  padding: 0 40px;
4534
4535
  }
4535
4536
  .resource-list-footer {
4536
4537
  display: flex;
4538
+ flex-wrap: wrap;
4537
4539
  justify-content: space-between;
4538
4540
  padding-bottom: 20px;
4539
4541
  }
@@ -4543,6 +4545,10 @@
4543
4545
  gap: 10px;
4544
4546
  align-items: center;
4545
4547
  justify-content: flex-end;
4548
+ margin-top: 10px;
4549
+ }
4550
+ .resource-list-footer .footer-right .list-selected-wrapper {
4551
+ font-size: 12px;
4546
4552
  }
4547
4553
  .resource-list-content-loading {
4548
4554
  display: flex;
@@ -4554,7 +4560,7 @@
4554
4560
  .resource-list .list-item-grid {
4555
4561
  display: grid;
4556
4562
  grid-gap: 20px;
4557
- grid-template-columns: repeat(5, 1fr);
4563
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
4558
4564
  }
4559
4565
  .resource-list .list-content {
4560
4566
  margin-top: 30px;
@@ -4597,7 +4603,8 @@
4597
4603
  }
4598
4604
  .resource-list .list-filter-wrapper .list-filter-tags {
4599
4605
  display: flex;
4600
- justify-content: space-between;
4606
+ flex-wrap: wrap;
4607
+ gap: 10px;
4601
4608
  margin-top: 10px;
4602
4609
  }
4603
4610
  .resource-list .list-filter-wrapper .list-filter-tags .list-filter-tag {
@@ -4618,16 +4625,41 @@
4618
4625
  justify-content: space-between;
4619
4626
  }
4620
4627
  .resource-list .list-filter-wrapper .list-filter .filter-list {
4628
+ position: relative;
4629
+ /** 给 popup 一个参考 */
4621
4630
  display: flex;
4622
- flex-wrap: wrap;
4623
- gap: 10px;
4624
4631
  }
4625
4632
  .resource-list .list-filter-wrapper .list-filter .filter-list .filter-item {
4626
4633
  width: 100px;
4634
+ margin-right: 10px;
4635
+ }
4636
+ .resource-list .list-filter-wrapper .list-filter .filter-list .arco-trigger-popup {
4637
+ z-index: 100000 !important;
4627
4638
  }
4628
4639
  .resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
4629
4640
  padding: 0;
4630
4641
  }
4642
+ .resource-list .list-filter-wrapper .list-filter .more-btn {
4643
+ position: relative;
4644
+ /** 给 poperjs 一个参考 */
4645
+ }
4646
+ .resource-list .list-filter-wrapper .list-filter .more-btn .filter-pannel {
4647
+ inset: 40px auto auto auto !important;
4648
+ }
4649
+ .resource-list .list-filter-wrapper .filter-extra {
4650
+ display: flex;
4651
+ gap: 10px;
4652
+ }
4653
+ .resource-list .list-filter-wrapper .filter-pannel {
4654
+ z-index: 100000;
4655
+ display: flex;
4656
+ flex-direction: column;
4657
+ gap: 10px;
4658
+ padding: 10px;
4659
+ background-color: #fff;
4660
+ border-radius: 4px;
4661
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
4662
+ }
4631
4663
  .resource-list .title {
4632
4664
  display: flex;
4633
4665
  gap: 8px;
@@ -4641,6 +4673,10 @@
4641
4673
  height: 16px;
4642
4674
  background-color: #4886ff;
4643
4675
  }
4676
+ .resource-select-wrap {
4677
+ width: 100%;
4678
+ height: 100%;
4679
+ }
4644
4680
  .resource-select-modal-body {
4645
4681
  height: 80vh;
4646
4682
  padding: 0;
@@ -4669,6 +4705,11 @@
4669
4705
  .resource-select-container .resource-select-header .arco-tabs-content {
4670
4706
  display: none !important;
4671
4707
  }
4708
+ .resource-select-container .resource-list-content .resource-list-content-empty {
4709
+ box-sizing: border-box;
4710
+ width: 100%;
4711
+ height: 100%;
4712
+ }
4672
4713
  .iframe-container {
4673
4714
  position: relative;
4674
4715
  height: 95vh;
@@ -4925,6 +4966,10 @@
4925
4966
  .doc-history-drawer .arco-drawer-footer {
4926
4967
  text-align: left;
4927
4968
  }
4969
+ .doc-history-modal-wrap {
4970
+ height: 70vh;
4971
+ padding: 0;
4972
+ }
4928
4973
  .video-thumb {
4929
4974
  display: flex;
4930
4975
  flex-direction: column;