@cmstops/pro-compo 0.3.35 → 0.3.37

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 (64) hide show
  1. package/dist/index.css +156 -2
  2. package/dist/index.min.css +1 -1
  3. package/es/docPreview/component.d.ts +0 -0
  4. package/es/docPreview/component.js +153 -0
  5. package/es/docPreview/components/PreviewIframe.d.ts +0 -0
  6. package/es/docPreview/components/PreviewIframe.js +37 -0
  7. package/es/docPreview/images/phone.js +2 -0
  8. package/es/docPreview/index.d.ts +2 -0
  9. package/es/docPreview/index.js +7 -0
  10. package/es/docPreview/scripts/api.d.ts +1 -0
  11. package/es/docPreview/scripts/hook.d.ts +20 -0
  12. package/es/docPreview/scripts/hook.js +119 -0
  13. package/es/docPreview/style/css.js +1 -0
  14. package/es/docPreview/style/index.css +139 -0
  15. package/es/docPreview/style/index.d.ts +1 -0
  16. package/es/docPreview/style/index.js +1 -0
  17. package/es/docPreview/style/index.less +129 -0
  18. package/es/docPreview/style/previewIframe.less +36 -0
  19. package/es/hooks/useSelection.js +1 -1
  20. package/es/index.css +156 -2
  21. package/es/index.d.ts +1 -0
  22. package/es/index.js +1 -0
  23. package/es/index.less +1 -0
  24. package/es/selectResourceModal/component.js +7 -9
  25. package/es/selectResourceModal/components/ListContent/index.js +4 -1
  26. package/es/selectResourceModal/components/ListContentLocal/components/Upload.js +2 -13
  27. package/es/selectResourceModal/components/ListContentLocal/index.js +4 -1
  28. package/es/selectResourceModal/components/ListFilter/index.js +3 -2
  29. package/es/selectResourceModal/style/index.css +1 -1
  30. package/es/selectResourceModal/style/index.less +1 -1
  31. package/es/thumbCard/component.js +15 -15
  32. package/es/thumbCard/style/index.css +16 -1
  33. package/es/thumbCard/style/index.less +24 -7
  34. package/es/utils/index.d.ts +2 -0
  35. package/es/utils/index.js +40 -1
  36. package/es/utils/typeMap.d.ts +2 -5
  37. package/es/utils/typeMap.js +2 -1
  38. package/lib/docPreview/component.js +154 -0
  39. package/lib/docPreview/components/PreviewIframe.js +38 -0
  40. package/lib/docPreview/images/phone.js +3 -0
  41. package/lib/docPreview/index.js +8 -0
  42. package/lib/docPreview/scripts/hook.js +123 -0
  43. package/lib/docPreview/style/css.js +2 -0
  44. package/lib/docPreview/style/index.css +139 -0
  45. package/lib/docPreview/style/index.js +2 -0
  46. package/lib/docPreview/style/index.less +129 -0
  47. package/lib/docPreview/style/previewIframe.less +36 -0
  48. package/lib/hooks/useSelection.js +1 -1
  49. package/lib/index.css +156 -2
  50. package/lib/index.js +2 -0
  51. package/lib/index.less +1 -0
  52. package/lib/selectResourceModal/component.js +6 -8
  53. package/lib/selectResourceModal/components/ListContent/index.js +4 -1
  54. package/lib/selectResourceModal/components/ListContentLocal/components/Upload.js +1 -12
  55. package/lib/selectResourceModal/components/ListContentLocal/index.js +4 -1
  56. package/lib/selectResourceModal/components/ListFilter/index.js +3 -2
  57. package/lib/selectResourceModal/style/index.css +1 -1
  58. package/lib/selectResourceModal/style/index.less +1 -1
  59. package/lib/thumbCard/component.js +15 -15
  60. package/lib/thumbCard/style/index.css +16 -1
  61. package/lib/thumbCard/style/index.less +24 -7
  62. package/lib/utils/index.js +41 -0
  63. package/lib/utils/typeMap.js +2 -1
  64. package/package.json +1 -1
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var vue = require("vue");
4
+ var webVue = require("@arco-design/web-vue");
5
+ var request = require("../../utils/request.js");
6
+ var index = require("../../utils/index.js");
7
+ function generateDocPreviewLink(BASE_API, params) {
8
+ return request(BASE_API, {
9
+ url: "/poplar/v3/preview/document/generate",
10
+ method: "post",
11
+ data: params
12
+ });
13
+ }
14
+ function getTimeToNow(second) {
15
+ second = parseInt((second / 1e3).toFixed(0), 10);
16
+ function need(value, label) {
17
+ if (!value)
18
+ return "";
19
+ const tow = (n) => {
20
+ return n >= 0 && n < 10 ? `0${n}` : `${n}`;
21
+ };
22
+ return tow(value) + label;
23
+ }
24
+ const day = Math.floor(second / 86400);
25
+ second %= 86400;
26
+ const hour = Math.floor(second / 3600);
27
+ second %= 3600;
28
+ const minute = Math.floor(second / 60);
29
+ second %= 60;
30
+ return need(day, "\u5929") + need(hour, "\u5C0F\u65F6") + need(minute, "\u5206\u949F") + need(second, "\u79D2");
31
+ }
32
+ const EXPIRE_TIME_OPTIONS = [
33
+ { label: "1\u5C0F\u65F6", value: 60 * 60 },
34
+ { label: "6\u5C0F\u65F6", value: 60 * 60 * 6 },
35
+ { label: "12\u5C0F\u65F6", value: 60 * 60 * 12 },
36
+ { label: "24\u5C0F\u65F6", value: 60 * 60 * 24 },
37
+ { label: "3\u5929", value: 60 * 60 * 24 * 3 },
38
+ { label: "7\u5929", value: 60 * 60 * 24 * 7 },
39
+ { label: "15\u5929", value: 60 * 60 * 24 * 15 },
40
+ { label: "30\u5929", value: 60 * 60 * 24 * 30 }
41
+ ];
42
+ function useDocPreview(BASE_API, hashid) {
43
+ const innerUrl = vue.ref("");
44
+ const shareData = vue.ref(null);
45
+ const expireTime = vue.ref(60 * 60 * 24);
46
+ const loading = vue.ref(false);
47
+ const intervalTime = vue.ref("");
48
+ let interval = null;
49
+ function startInterval() {
50
+ var _a;
51
+ if (!((_a = shareData.value) == null ? void 0 : _a.expiredAt)) {
52
+ clearInterval(interval);
53
+ interval = null;
54
+ return;
55
+ }
56
+ const now = new Date().getTime();
57
+ const expire = new Date(shareData.value.expiredAt).getTime();
58
+ intervalTime.value = getTimeToNow(expire - now);
59
+ }
60
+ async function generate(cancel2) {
61
+ loading.value = true;
62
+ const params = { force: true, hash_id: hashid.value };
63
+ if (!cancel2)
64
+ params.expiration = expireTime.value;
65
+ else
66
+ params.expiration = 0;
67
+ try {
68
+ const { code, message } = await generateDocPreviewLink(BASE_API, params);
69
+ if (code !== 0)
70
+ return false;
71
+ const { expired_at, share_url, inner_url, qr_code } = message;
72
+ if (cancel2) {
73
+ shareData.value = null;
74
+ clearInterval(interval);
75
+ interval = null;
76
+ intervalTime.value = "";
77
+ } else {
78
+ shareData.value = {
79
+ qrCode: `data:image/png;base64,${qr_code}`,
80
+ shareUrl: share_url,
81
+ expiredAt: expired_at
82
+ };
83
+ innerUrl.value = `${inner_url}?reqTime=${+new Date()}`;
84
+ setInterval(startInterval, 1e3);
85
+ }
86
+ return true;
87
+ } catch (e) {
88
+ console.log(e, "----");
89
+ return false;
90
+ } finally {
91
+ loading.value = false;
92
+ }
93
+ }
94
+ async function cancel(update) {
95
+ const flag = await generate(true);
96
+ if (!flag)
97
+ return;
98
+ const text = update ? "\u5DF2\u53D6\u6D88\u9884\u89C8\uFF0C\u8BF7\u66F4\u65B0\u6709\u6548\u671F\u91CD\u65B0\u751F\u6210\u9884\u89C8\u94FE\u63A5" : "\u5DF2\u53D6\u6D88\u9884\u89C8\u94FE\u63A5";
99
+ webVue.Message.warning(text);
100
+ }
101
+ async function copy() {
102
+ var _a;
103
+ if (!((_a = shareData.value) == null ? void 0 : _a.shareUrl))
104
+ return;
105
+ const res = await index.copyContent(shareData.value.shareUrl);
106
+ if (res) {
107
+ webVue.Message.success("\u590D\u5236\u6210\u529F");
108
+ }
109
+ }
110
+ return {
111
+ generate,
112
+ cancel,
113
+ copy,
114
+ loading,
115
+ expireTime,
116
+ innerUrl,
117
+ shareData,
118
+ intervalTime
119
+ };
120
+ }
121
+ exports.EXPIRE_TIME_OPTIONS = EXPIRE_TIME_OPTIONS;
122
+ exports.generateDocPreviewLink = generateDocPreviewLink;
123
+ exports.useDocPreview = useDocPreview;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.css");
@@ -0,0 +1,139 @@
1
+ .iframe-container {
2
+ position: relative;
3
+ height: 95vh;
4
+ max-height: 750px;
5
+ overflow: hidden;
6
+ aspect-ratio: 390 / 750;
7
+ }
8
+ .iframe-container::-webkit-scrollbar {
9
+ display: none;
10
+ }
11
+ .iframe-container img {
12
+ position: absolute;
13
+ width: 100%;
14
+ height: 100%;
15
+ }
16
+ .iframe-container .iframe-content {
17
+ position: absolute;
18
+ top: calc(100% / 8);
19
+ left: 19px;
20
+ z-index: 1000;
21
+ width: calc(100% - 38px);
22
+ height: calc(100% - 100% / 8 - 16px);
23
+ overflow: hidden;
24
+ border-bottom-right-radius: 40px;
25
+ border-bottom-left-radius: 40px;
26
+ }
27
+ .iframe-container .iframe-content iframe {
28
+ width: calc(100% + 20px);
29
+ height: 100%;
30
+ border: none;
31
+ outline: none;
32
+ }
33
+ .doc-preview-container {
34
+ position: fixed;
35
+ top: 0;
36
+ left: 0;
37
+ z-index: 10;
38
+ display: flex;
39
+ gap: 40px;
40
+ align-items: center;
41
+ justify-content: center;
42
+ width: 100%;
43
+ height: 100%;
44
+ background-color: rgba(0, 0, 0, 0.5);
45
+ user-select: none;
46
+ }
47
+ .doc-preview-container .loading-wrapper {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ width: 100%;
52
+ height: 100%;
53
+ }
54
+ .doc-preview-container .doc-preview-share {
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: center;
58
+ width: 300px;
59
+ overflow: hidden;
60
+ background-color: #fff;
61
+ border-radius: 12px;
62
+ }
63
+ .doc-preview-container .doc-preview-share-img {
64
+ width: 300px;
65
+ height: 300px;
66
+ }
67
+ .doc-preview-container .doc-preview-share-img img {
68
+ width: 100%;
69
+ height: 100%;
70
+ }
71
+ .doc-preview-container .doc-preview-share-img-hint {
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ width: calc(100% - 40px);
76
+ height: calc(100% - 40px);
77
+ margin-top: 20px;
78
+ margin-left: 20px;
79
+ color: #4886ff;
80
+ background-color: #edf3ff;
81
+ border-radius: 6px;
82
+ }
83
+ .doc-preview-container .doc-preview-share-tips,
84
+ .doc-preview-container .doc-preview-share-header,
85
+ .doc-preview-container .doc-preview-share-link,
86
+ .doc-preview-container .doc-preview-share-action {
87
+ box-sizing: border-box;
88
+ width: 100%;
89
+ padding: 0 20px;
90
+ }
91
+ .doc-preview-container .doc-preview-share-tips {
92
+ color: #333;
93
+ font-size: 14px;
94
+ text-align: center;
95
+ }
96
+ .doc-preview-container .doc-preview-share-header {
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: space-between;
100
+ margin: 10px 0 5px;
101
+ }
102
+ .doc-preview-container .doc-preview-share-link {
103
+ display: flex;
104
+ flex-direction: column;
105
+ width: 100%;
106
+ }
107
+ .doc-preview-container .doc-preview-share-link-value {
108
+ display: -webkit-box;
109
+ box-sizing: border-box;
110
+ padding: 6px 10px;
111
+ overflow: hidden;
112
+ color: #86909c;
113
+ line-height: 25px;
114
+ word-break: break-all;
115
+ background: #f2f2f2;
116
+ -webkit-line-clamp: 2;
117
+ -webkit-box-orient: vertical;
118
+ }
119
+ .doc-preview-container .doc-preview-share-link-hint {
120
+ margin-top: 10px;
121
+ color: #86909c;
122
+ font-size: 12px;
123
+ text-align: center;
124
+ }
125
+ .doc-preview-container .doc-preview-share-action {
126
+ display: flex;
127
+ gap: 10px;
128
+ align-items: center;
129
+ justify-content: center;
130
+ margin: 20px 0;
131
+ }
132
+ .doc-preview-container .preview-close {
133
+ position: absolute;
134
+ top: 20px;
135
+ right: 20px;
136
+ color: #fff;
137
+ font-size: 20px;
138
+ cursor: pointer;
139
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ require("./index.less");
@@ -0,0 +1,129 @@
1
+ @import './previewIframe.less';
2
+
3
+ // 变量
4
+ @qrCodeWidth: 300px;
5
+
6
+ .doc-preview-container {
7
+ position: fixed;
8
+ // 遮罩层
9
+ top: 0;
10
+ left: 0;
11
+ z-index: 10;
12
+ display: flex;
13
+ gap: 40px;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: 100%;
17
+ height: 100%;
18
+ background-color: rgba(0, 0, 0, 0.5);
19
+ user-select: none;
20
+
21
+ .loading-wrapper {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+
29
+ .doc-preview-share {
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: center;
33
+ width: @qrCodeWidth;
34
+ overflow: hidden;
35
+ background-color: #fff;
36
+ border-radius: 12px;
37
+
38
+ &-img {
39
+ width: @qrCodeWidth;
40
+ height: @qrCodeWidth;
41
+
42
+ img {
43
+ width: 100%;
44
+ height: 100%;
45
+ }
46
+
47
+ &-hint {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ width: calc(100% - 40px);
52
+ height: calc(100% - 40px);
53
+ margin-top: 20px;
54
+ margin-left: 20px;
55
+ color: #4886ff;
56
+ background-color: #edf3ff;
57
+ border-radius: 6px;
58
+ }
59
+ }
60
+
61
+ &-tips,
62
+ &-header,
63
+ &-link,
64
+ &-action {
65
+ box-sizing: border-box;
66
+ width: 100%;
67
+ padding: 0 20px;
68
+ }
69
+
70
+ // 备注
71
+ &-tips {
72
+ color: #333;
73
+ font-size: 14px;
74
+ text-align: center;
75
+ }
76
+
77
+ // header 控件
78
+ &-header {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: space-between;
82
+ margin: 10px 0 5px;
83
+ }
84
+
85
+ // 链接展示
86
+ &-link {
87
+ display: flex;
88
+ flex-direction: column;
89
+ width: 100%;
90
+
91
+ &-value {
92
+ display: -webkit-box;
93
+ box-sizing: border-box;
94
+ padding: 6px 10px;
95
+ overflow: hidden;
96
+ color: #86909c;
97
+ line-height: 25px;
98
+ word-break: break-all;
99
+ background: #f2f2f2;
100
+ -webkit-line-clamp: 2;
101
+ -webkit-box-orient: vertical;
102
+ }
103
+
104
+ &-hint {
105
+ margin-top: 10px;
106
+ color: #86909c;
107
+ font-size: 12px;
108
+ text-align: center;
109
+ }
110
+ }
111
+
112
+ &-action {
113
+ display: flex;
114
+ gap: 10px;
115
+ align-items: center;
116
+ justify-content: center;
117
+ margin: 20px 0;
118
+ }
119
+ }
120
+
121
+ .preview-close {
122
+ position: absolute;
123
+ top: 20px;
124
+ right: 20px;
125
+ color: #fff;
126
+ font-size: 20px;
127
+ cursor: pointer;
128
+ }
129
+ }
@@ -0,0 +1,36 @@
1
+ .iframe-container {
2
+ position: relative;
3
+ height: 95vh;
4
+ max-height: 750px;
5
+ overflow: hidden;
6
+ aspect-ratio: 390 / 750;
7
+
8
+ &::-webkit-scrollbar {
9
+ display: none;
10
+ }
11
+
12
+ img {
13
+ position: absolute;
14
+ width: 100%;
15
+ height: 100%;
16
+ }
17
+
18
+ .iframe-content {
19
+ position: absolute;
20
+ top: calc(100% / 8);
21
+ left: 19px;
22
+ z-index: 1000;
23
+ width: calc(100% - 38px);
24
+ height: calc(100% - 100% / 8 - 16px);
25
+ overflow: hidden;
26
+ border-bottom-right-radius: 40px;
27
+ border-bottom-left-radius: 40px;
28
+
29
+ iframe {
30
+ width: calc(100% + 20px);
31
+ height: 100%;
32
+ border: none;
33
+ outline: none;
34
+ }
35
+ }
36
+ }
@@ -12,7 +12,7 @@ function getLabelValue(list, options) {
12
12
  function useSelection(params) {
13
13
  const { func, labelStr, valueStr } = params;
14
14
  const lVParams = { labelStr, valueStr };
15
- const limit = vue.ref(10);
15
+ const limit = vue.ref(30);
16
16
  const offset = vue.ref(0);
17
17
  const keyword = vue.ref("");
18
18
  const options = vue.ref([]);
package/lib/index.css CHANGED
@@ -4302,11 +4302,26 @@
4302
4302
  .thumb-select-wrapper:hover .thumb-handler-list {
4303
4303
  opacity: 1;
4304
4304
  }
4305
+ .thumb-select-wrapper:hover .thumb-select-tag {
4306
+ opacity: 0;
4307
+ }
4305
4308
  .thumb-select-wrapper.thumb-no-mask {
4306
4309
  background-color: #f2f3f5;
4307
4310
  border: 1px dashed #e5e6eb !important;
4308
4311
  }
4309
- .arco-dropdown-option-content {
4312
+ .thumb-select-wrapper .thumb-select-tag {
4313
+ position: absolute;
4314
+ right: 5px;
4315
+ bottom: 5px;
4316
+ padding: 2px 10px;
4317
+ color: #fff;
4318
+ font-size: 12px;
4319
+ background-color: rgba(0, 0, 0, 0.5);
4320
+ border-radius: 16px;
4321
+ opacity: 1;
4322
+ transition: all 0.3s ease-in-out;
4323
+ }
4324
+ .thumb-select-wrapper .arco-dropdown-option-content {
4310
4325
  display: flex;
4311
4326
  gap: 8px;
4312
4327
  align-items: center;
@@ -4489,7 +4504,7 @@
4489
4504
  padding: 0 40px;
4490
4505
  }
4491
4506
  .resource-select-container .resource-select-header {
4492
- padding: 10px 24px 0;
4507
+ padding: 10px 24px 0 24px;
4493
4508
  }
4494
4509
  .resource-select-container .resource-select-header .arco-tabs-nav::before {
4495
4510
  display: none;
@@ -4511,3 +4526,142 @@
4511
4526
  gap: 10px;
4512
4527
  align-items: center;
4513
4528
  }
4529
+ .iframe-container {
4530
+ position: relative;
4531
+ height: 95vh;
4532
+ max-height: 750px;
4533
+ overflow: hidden;
4534
+ aspect-ratio: 390 / 750;
4535
+ }
4536
+ .iframe-container::-webkit-scrollbar {
4537
+ display: none;
4538
+ }
4539
+ .iframe-container img {
4540
+ position: absolute;
4541
+ width: 100%;
4542
+ height: 100%;
4543
+ }
4544
+ .iframe-container .iframe-content {
4545
+ position: absolute;
4546
+ top: calc(100% / 8);
4547
+ left: 19px;
4548
+ z-index: 1000;
4549
+ width: calc(100% - 38px);
4550
+ height: calc(100% - 100% / 8 - 16px);
4551
+ overflow: hidden;
4552
+ border-bottom-right-radius: 40px;
4553
+ border-bottom-left-radius: 40px;
4554
+ }
4555
+ .iframe-container .iframe-content iframe {
4556
+ width: calc(100% + 20px);
4557
+ height: 100%;
4558
+ border: none;
4559
+ outline: none;
4560
+ }
4561
+ .doc-preview-container {
4562
+ position: fixed;
4563
+ top: 0;
4564
+ left: 0;
4565
+ z-index: 10;
4566
+ display: flex;
4567
+ gap: 40px;
4568
+ align-items: center;
4569
+ justify-content: center;
4570
+ width: 100%;
4571
+ height: 100%;
4572
+ background-color: rgba(0, 0, 0, 0.5);
4573
+ user-select: none;
4574
+ }
4575
+ .doc-preview-container .loading-wrapper {
4576
+ display: flex;
4577
+ align-items: center;
4578
+ justify-content: center;
4579
+ width: 100%;
4580
+ height: 100%;
4581
+ }
4582
+ .doc-preview-container .doc-preview-share {
4583
+ display: flex;
4584
+ flex-direction: column;
4585
+ align-items: center;
4586
+ width: 300px;
4587
+ overflow: hidden;
4588
+ background-color: #fff;
4589
+ border-radius: 12px;
4590
+ }
4591
+ .doc-preview-container .doc-preview-share-img {
4592
+ width: 300px;
4593
+ height: 300px;
4594
+ }
4595
+ .doc-preview-container .doc-preview-share-img img {
4596
+ width: 100%;
4597
+ height: 100%;
4598
+ }
4599
+ .doc-preview-container .doc-preview-share-img-hint {
4600
+ display: flex;
4601
+ align-items: center;
4602
+ justify-content: center;
4603
+ width: calc(100% - 40px);
4604
+ height: calc(100% - 40px);
4605
+ margin-top: 20px;
4606
+ margin-left: 20px;
4607
+ color: #4886ff;
4608
+ background-color: #edf3ff;
4609
+ border-radius: 6px;
4610
+ }
4611
+ .doc-preview-container .doc-preview-share-tips,
4612
+ .doc-preview-container .doc-preview-share-header,
4613
+ .doc-preview-container .doc-preview-share-link,
4614
+ .doc-preview-container .doc-preview-share-action {
4615
+ box-sizing: border-box;
4616
+ width: 100%;
4617
+ padding: 0 20px;
4618
+ }
4619
+ .doc-preview-container .doc-preview-share-tips {
4620
+ color: #333;
4621
+ font-size: 14px;
4622
+ text-align: center;
4623
+ }
4624
+ .doc-preview-container .doc-preview-share-header {
4625
+ display: flex;
4626
+ align-items: center;
4627
+ justify-content: space-between;
4628
+ margin: 10px 0 5px;
4629
+ }
4630
+ .doc-preview-container .doc-preview-share-link {
4631
+ display: flex;
4632
+ flex-direction: column;
4633
+ width: 100%;
4634
+ }
4635
+ .doc-preview-container .doc-preview-share-link-value {
4636
+ display: -webkit-box;
4637
+ box-sizing: border-box;
4638
+ padding: 6px 10px;
4639
+ overflow: hidden;
4640
+ color: #86909c;
4641
+ line-height: 25px;
4642
+ word-break: break-all;
4643
+ background: #f2f2f2;
4644
+ -webkit-line-clamp: 2;
4645
+ -webkit-box-orient: vertical;
4646
+ }
4647
+ .doc-preview-container .doc-preview-share-link-hint {
4648
+ margin-top: 10px;
4649
+ color: #86909c;
4650
+ font-size: 12px;
4651
+ text-align: center;
4652
+ }
4653
+ .doc-preview-container .doc-preview-share-action {
4654
+ display: flex;
4655
+ gap: 10px;
4656
+ align-items: center;
4657
+ justify-content: center;
4658
+ margin: 20px 0;
4659
+ }
4660
+ .doc-preview-container .preview-close {
4661
+ position: absolute;
4662
+ top: 20px;
4663
+ right: 20px;
4664
+ color: #fff;
4665
+ font-size: 20px;
4666
+ cursor: pointer;
4667
+ }
package/lib/index.js CHANGED
@@ -26,6 +26,7 @@ var index$l = require("./resourceGridList/index.js");
26
26
  var index$m = require("./mediaView/index.js");
27
27
  var index$n = require("./thumbCard/index.js");
28
28
  var index$o = require("./selectResourceModal/index.js");
29
+ var index$p = require("./docPreview/index.js");
29
30
  exports["default"] = components;
30
31
  exports.appCenter = index;
31
32
  exports.messageBox = index$1;
@@ -52,3 +53,4 @@ exports.resourceGridList = index$l;
52
53
  exports.mediaView = index$m;
53
54
  exports.thumbCard = index$n;
54
55
  exports.selectResourceModal = index$o;
56
+ exports.docPreview = index$p;
package/lib/index.less CHANGED
@@ -24,3 +24,4 @@
24
24
  @import './mediaView/style/index.less';
25
25
  @import './thumbCard/style/index.less';
26
26
  @import './selectResourceModal/style/index.less';
27
+ @import './docPreview/style/index.less';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
+ var icon = require("@arco-design/web-vue/es/icon");
4
5
  var index$4 = require("../emptyData/index.js");
5
6
  var index = require("./components/ListFilter/index.js");
6
7
  var index$1 = require("./components/ListContent/index.js");
@@ -50,8 +51,7 @@ const _sfc_main = vue.defineComponent({
50
51
  changeKey,
51
52
  changeFilter,
52
53
  changePage,
53
- changeSize,
54
- loadData
54
+ changeSize
55
55
  } = useAttachement["default"]({ key: "all", BASE_API });
56
56
  const selected = vue.ref([]);
57
57
  const selectedKeys = vue.computed(() => selected.value.map((item) => item.id));
@@ -85,9 +85,6 @@ const _sfc_main = vue.defineComponent({
85
85
  changeKey("local");
86
86
  activeKey.value = "local";
87
87
  }
88
- vue.onMounted(() => {
89
- loadData();
90
- });
91
88
  return (_ctx, _cache) => {
92
89
  return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
93
90
  visible: _ctx.visible,
@@ -107,11 +104,12 @@ const _sfc_main = vue.defineComponent({
107
104
  }, {
108
105
  extra: vue.withCtx(() => [
109
106
  vue.createVNode(vue.unref(webVue.Button), {
110
- type: "text",
107
+ type: "secondary",
108
+ shape: "round",
111
109
  onClick: handleClose
112
110
  }, {
113
- default: vue.withCtx(() => [
114
- vue.createTextVNode("\u5173\u95ED")
111
+ icon: vue.withCtx(() => [
112
+ vue.createVNode(vue.unref(icon.IconClose))
115
113
  ]),
116
114
  _: 1
117
115
  })
@@ -48,8 +48,11 @@ const _sfc_main = vue.defineComponent({
48
48
  meta: item,
49
49
  "use-mask": true,
50
50
  "handlers-key": handlersKey.value,
51
+ options: {
52
+ fit: item.catalog === "image" ? "contain" : "cover"
53
+ },
51
54
  onHandle: handleOption
52
- }, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key"])
55
+ }, null, 8, ["url", "thumb", "catalog", "meta", "handlers-key", "options"])
53
56
  ]),
54
57
  _: 2
55
58
  }, 1032, ["item", "select-keys", "disable", "onSelect"]);