@cmstops/pro-compo 0.3.2 → 0.3.4

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 (41) hide show
  1. package/dist/index.css +85 -2
  2. package/dist/index.min.css +1 -1
  3. package/es/contentDetailList/component.js +12 -5
  4. package/es/contentDetailList/components/Content/DocItem/index.js +14 -8
  5. package/es/contentDetailList/components/Content/index.js +4 -2
  6. package/es/contentDetailList/components/Doc/index.js +4 -2
  7. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
  8. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.js +265 -0
  9. package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
  10. package/es/contentDetailList/components/ShowQRCode/index.js +66 -0
  11. package/es/contentDetailList/script/api.d.ts +6 -0
  12. package/es/contentDetailList/script/api.js +16 -0
  13. package/es/contentDetailList/style/QrCodeView.less +93 -0
  14. package/es/contentDetailList/style/ShowQRCode.less +3 -0
  15. package/es/contentDetailList/style/index.css +83 -0
  16. package/es/contentDetailList/style/index.less +2 -0
  17. package/es/contentModal/style/columnTree.less +1 -1
  18. package/es/contentModal/style/index.css +2 -2
  19. package/es/contentModal/style/index.less +6 -2
  20. package/es/hooks/usePopper.js +19 -1
  21. package/es/index.css +85 -2
  22. package/es/utils/date.d.ts +3 -0
  23. package/es/utils/date.js +27 -0
  24. package/lib/contentDetailList/component.js +12 -5
  25. package/lib/contentDetailList/components/Content/DocItem/index.js +9 -3
  26. package/lib/contentDetailList/components/Content/index.js +4 -2
  27. package/lib/contentDetailList/components/Doc/index.js +4 -2
  28. package/lib/contentDetailList/components/ShowQRCode/QrcodeView/index.js +271 -0
  29. package/lib/contentDetailList/components/ShowQRCode/index.js +67 -0
  30. package/lib/contentDetailList/script/api.js +19 -0
  31. package/lib/contentDetailList/style/QrCodeView.less +93 -0
  32. package/lib/contentDetailList/style/ShowQRCode.less +3 -0
  33. package/lib/contentDetailList/style/index.css +83 -0
  34. package/lib/contentDetailList/style/index.less +2 -0
  35. package/lib/contentModal/style/columnTree.less +1 -1
  36. package/lib/contentModal/style/index.css +2 -2
  37. package/lib/contentModal/style/index.less +6 -2
  38. package/lib/hooks/usePopper.js +19 -1
  39. package/lib/index.css +85 -2
  40. package/lib/utils/date.js +29 -0
  41. package/package.json +5 -2
@@ -0,0 +1,93 @@
1
+ .doc-qrcode-preview-container-v {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 10px;
5
+ align-items: center;
6
+ justify-content: center;
7
+ margin: auto;
8
+ color: #4e5969;
9
+ font-size: 14px;
10
+ background: white;
11
+ border-radius: 6px;
12
+
13
+ .qrcode {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ width: 200px;
18
+ height: 200px;
19
+ color: #4886ff;
20
+ background: #edf3ff;
21
+
22
+ .no-pub {
23
+ position: relative;
24
+ width: 100%;
25
+ height: 100%;
26
+
27
+ &::after {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: calc(100% - 40px);
35
+ height: 100%;
36
+ padding: 0 20px;
37
+ color: #fff;
38
+ background-color: rgba(0, 0, 0, 0.5);
39
+ content: '内容暂未发布,如需链接预览请在下方生成临时预览链接';
40
+ // z-index: 2;
41
+ }
42
+ }
43
+ }
44
+
45
+ .qrcode-hint {
46
+ opacity: 0.6;
47
+ }
48
+
49
+ .setting {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: space-between;
53
+ width: 100%;
54
+
55
+ .label {
56
+ font-weight: 500;
57
+ }
58
+
59
+ .a-select {
60
+ width: 100px;
61
+
62
+ .a-input__inner {
63
+ color: #86909c;
64
+ text-align: center;
65
+ background: #f3f4f5;
66
+ border: none;
67
+ }
68
+ }
69
+ }
70
+
71
+ .btns {
72
+ display: flex;
73
+ gap: 10px;
74
+ justify-content: space-between;
75
+ width: 100%;
76
+
77
+ .arco-btn {
78
+ width: 100%;
79
+ margin-left: 0;
80
+ padding: 10px 5px;
81
+ font-size: 14px;
82
+
83
+ &.auto {
84
+ flex: 1;
85
+ width: auto;
86
+ }
87
+ }
88
+ }
89
+
90
+ .time-go {
91
+ font-size: 12px;
92
+ }
93
+ }
@@ -0,0 +1,3 @@
1
+ .qr-code {
2
+ margin-right: 5px;
3
+ }
@@ -1115,6 +1115,89 @@
1115
1115
  margin-right: 20px;
1116
1116
  text-align: end;
1117
1117
  }
1118
+ .qr-code {
1119
+ margin-right: 5px;
1120
+ }
1121
+ .doc-qrcode-preview-container-v {
1122
+ display: flex;
1123
+ flex-direction: column;
1124
+ gap: 10px;
1125
+ align-items: center;
1126
+ justify-content: center;
1127
+ margin: auto;
1128
+ color: #4e5969;
1129
+ font-size: 14px;
1130
+ background: white;
1131
+ border-radius: 6px;
1132
+ }
1133
+ .doc-qrcode-preview-container-v .qrcode {
1134
+ display: flex;
1135
+ align-items: center;
1136
+ justify-content: center;
1137
+ width: 200px;
1138
+ height: 200px;
1139
+ color: #4886ff;
1140
+ background: #edf3ff;
1141
+ }
1142
+ .doc-qrcode-preview-container-v .qrcode .no-pub {
1143
+ position: relative;
1144
+ width: 100%;
1145
+ height: 100%;
1146
+ }
1147
+ .doc-qrcode-preview-container-v .qrcode .no-pub::after {
1148
+ position: absolute;
1149
+ top: 0;
1150
+ left: 0;
1151
+ display: flex;
1152
+ align-items: center;
1153
+ justify-content: center;
1154
+ width: calc(100% - 40px);
1155
+ height: 100%;
1156
+ padding: 0 20px;
1157
+ color: #fff;
1158
+ background-color: rgba(0, 0, 0, 0.5);
1159
+ content: '内容暂未发布,如需链接预览请在下方生成临时预览链接';
1160
+ }
1161
+ .doc-qrcode-preview-container-v .qrcode-hint {
1162
+ opacity: 0.6;
1163
+ }
1164
+ .doc-qrcode-preview-container-v .setting {
1165
+ display: flex;
1166
+ align-items: center;
1167
+ justify-content: space-between;
1168
+ width: 100%;
1169
+ }
1170
+ .doc-qrcode-preview-container-v .setting .label {
1171
+ font-weight: 500;
1172
+ }
1173
+ .doc-qrcode-preview-container-v .setting .a-select {
1174
+ width: 100px;
1175
+ }
1176
+ .doc-qrcode-preview-container-v .setting .a-select .a-input__inner {
1177
+ color: #86909c;
1178
+ text-align: center;
1179
+ background: #f3f4f5;
1180
+ border: none;
1181
+ }
1182
+ .doc-qrcode-preview-container-v .btns {
1183
+ display: flex;
1184
+ gap: 10px;
1185
+ justify-content: space-between;
1186
+ width: 100%;
1187
+ }
1188
+ .doc-qrcode-preview-container-v .btns .arco-btn {
1189
+ width: 100%;
1190
+ margin-left: 0;
1191
+ padding: 10px 5px;
1192
+ font-size: 14px;
1193
+ }
1194
+ .doc-qrcode-preview-container-v .btns .arco-btn.auto {
1195
+ flex: 1;
1196
+ width: auto;
1197
+ }
1198
+ .doc-qrcode-preview-container-v .time-go {
1199
+ font-size: 12px;
1200
+ }
1118
1201
  .gray-for-state-hide {
1119
1202
  -webkit-filter: grayscale(100%);
1120
1203
  -moz-filter: grayscale(100%);
@@ -10,6 +10,8 @@
10
10
  @import './courseItem.less';
11
11
  @import './funhdItem.less';
12
12
  @import './MatrixItem.less';
13
+ @import './ShowQRCode.less';
14
+ @import './QrCodeView.less';
13
15
 
14
16
  .gray-for-state-hide {
15
17
  -webkit-filter: grayscale(100%);
@@ -3,7 +3,7 @@
3
3
  }
4
4
 
5
5
  .column-selection-popover-content {
6
- padding: 0;
6
+ padding: 0 !important;
7
7
 
8
8
  .search-column {
9
9
  margin-bottom: 4px;
@@ -2,7 +2,7 @@
2
2
  padding: 0 15px;
3
3
  }
4
4
  .column-selection-popover-content {
5
- padding: 0;
5
+ padding: 0 !important;
6
6
  }
7
7
  .column-selection-popover-content .search-column {
8
8
  margin-bottom: 4px;
@@ -167,8 +167,8 @@
167
167
  border-bottom: none;
168
168
  }
169
169
  .add-content-modal-body {
170
- padding: 0;
171
170
  height: 70vh;
171
+ padding: 0 !important;
172
172
  }
173
173
  .add-content-modal-body .content-tabs {
174
174
  height: 100%;
@@ -2,18 +2,22 @@
2
2
  @import './MediaFilter.less';
3
3
  @import './storeBox.less';
4
4
  @import './ViewAllColumn.less';
5
+
5
6
  .add-content-modal-wrapper {
6
7
  .arco-modal-header {
7
8
  border-bottom: none;
8
9
  }
9
10
  }
11
+
10
12
  .add-content-modal-body {
11
- padding: 0;
12
13
  height: 70vh;
14
+ padding: 0 !important;
15
+
13
16
  .content-tabs {
14
17
  height: 100%;
15
18
  }
19
+
16
20
  .arco-tabs-content {
17
21
  padding-top: 0;
18
22
  }
19
- }
23
+ }
@@ -18,8 +18,26 @@ function usePopper(pannel, triggerEl) {
18
18
  const initPopper = (placement = "bottom-start") => {
19
19
  if (!pannel.value || !triggerEl.value)
20
20
  return;
21
+ const offset = [0, 10];
22
+ if (window.__POWERED_BY_WUJIE__) {
23
+ offset[1] = -54;
24
+ }
21
25
  core.createPopper(triggerEl.value, pannel.value, {
22
- placement
26
+ placement,
27
+ modifiers: [
28
+ {
29
+ name: "computeStyles",
30
+ options: {
31
+ gpuAcceleration: false
32
+ }
33
+ },
34
+ {
35
+ name: "offset",
36
+ options: {
37
+ offset
38
+ }
39
+ }
40
+ ]
23
41
  });
24
42
  };
25
43
  return {
package/lib/index.css CHANGED
@@ -329,7 +329,7 @@
329
329
  padding: 0 15px;
330
330
  }
331
331
  .column-selection-popover-content {
332
- padding: 0;
332
+ padding: 0 !important;
333
333
  }
334
334
  .column-selection-popover-content .search-column {
335
335
  margin-bottom: 4px;
@@ -494,8 +494,8 @@
494
494
  border-bottom: none;
495
495
  }
496
496
  .add-content-modal-body {
497
- padding: 0;
498
497
  height: 70vh;
498
+ padding: 0 !important;
499
499
  }
500
500
  .add-content-modal-body .content-tabs {
501
501
  height: 100%;
@@ -3142,6 +3142,89 @@
3142
3142
  margin-right: 20px;
3143
3143
  text-align: end;
3144
3144
  }
3145
+ .qr-code {
3146
+ margin-right: 5px;
3147
+ }
3148
+ .doc-qrcode-preview-container-v {
3149
+ display: flex;
3150
+ flex-direction: column;
3151
+ gap: 10px;
3152
+ align-items: center;
3153
+ justify-content: center;
3154
+ margin: auto;
3155
+ color: #4e5969;
3156
+ font-size: 14px;
3157
+ background: white;
3158
+ border-radius: 6px;
3159
+ }
3160
+ .doc-qrcode-preview-container-v .qrcode {
3161
+ display: flex;
3162
+ align-items: center;
3163
+ justify-content: center;
3164
+ width: 200px;
3165
+ height: 200px;
3166
+ color: #4886ff;
3167
+ background: #edf3ff;
3168
+ }
3169
+ .doc-qrcode-preview-container-v .qrcode .no-pub {
3170
+ position: relative;
3171
+ width: 100%;
3172
+ height: 100%;
3173
+ }
3174
+ .doc-qrcode-preview-container-v .qrcode .no-pub::after {
3175
+ position: absolute;
3176
+ top: 0;
3177
+ left: 0;
3178
+ display: flex;
3179
+ align-items: center;
3180
+ justify-content: center;
3181
+ width: calc(100% - 40px);
3182
+ height: 100%;
3183
+ padding: 0 20px;
3184
+ color: #fff;
3185
+ background-color: rgba(0, 0, 0, 0.5);
3186
+ content: '内容暂未发布,如需链接预览请在下方生成临时预览链接';
3187
+ }
3188
+ .doc-qrcode-preview-container-v .qrcode-hint {
3189
+ opacity: 0.6;
3190
+ }
3191
+ .doc-qrcode-preview-container-v .setting {
3192
+ display: flex;
3193
+ align-items: center;
3194
+ justify-content: space-between;
3195
+ width: 100%;
3196
+ }
3197
+ .doc-qrcode-preview-container-v .setting .label {
3198
+ font-weight: 500;
3199
+ }
3200
+ .doc-qrcode-preview-container-v .setting .a-select {
3201
+ width: 100px;
3202
+ }
3203
+ .doc-qrcode-preview-container-v .setting .a-select .a-input__inner {
3204
+ color: #86909c;
3205
+ text-align: center;
3206
+ background: #f3f4f5;
3207
+ border: none;
3208
+ }
3209
+ .doc-qrcode-preview-container-v .btns {
3210
+ display: flex;
3211
+ gap: 10px;
3212
+ justify-content: space-between;
3213
+ width: 100%;
3214
+ }
3215
+ .doc-qrcode-preview-container-v .btns .arco-btn {
3216
+ width: 100%;
3217
+ margin-left: 0;
3218
+ padding: 10px 5px;
3219
+ font-size: 14px;
3220
+ }
3221
+ .doc-qrcode-preview-container-v .btns .arco-btn.auto {
3222
+ flex: 1;
3223
+ width: auto;
3224
+ }
3225
+ .doc-qrcode-preview-container-v .time-go {
3226
+ font-size: 12px;
3227
+ }
3145
3228
  .gray-for-state-hide {
3146
3229
  -webkit-filter: grayscale(100%);
3147
3230
  -moz-filter: grayscale(100%);
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ function tow(n) {
4
+ return n >= 0 && n < 10 ? `0${n}` : `${n}`;
5
+ }
6
+ function need(value, label) {
7
+ if (!value)
8
+ return "";
9
+ return tow(value) + label;
10
+ }
11
+ function getSpaceDate(date) {
12
+ const oDate = new Date();
13
+ const oldTime = oDate.getTime();
14
+ const newDate = new Date(date);
15
+ const newTime = newDate.getTime();
16
+ let second = Math.floor((newTime - oldTime) / 1e3);
17
+ if (second <= 0) {
18
+ return 0;
19
+ }
20
+ const day = Math.floor(second / 86400);
21
+ second %= 86400;
22
+ const hour = Math.floor(second / 3600);
23
+ second %= 3600;
24
+ const minute = Math.floor(second / 60);
25
+ second %= 60;
26
+ const str = `${need(day, "\u5929") + need(hour, "\u5C0F\u65F6") + need(minute, "\u5206\u949F") + tow(second)}\u79D2`;
27
+ return str;
28
+ }
29
+ exports.getSpaceDate = getSpaceDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",
@@ -99,12 +99,14 @@
99
99
  "fs-extra": "^9.1.0",
100
100
  "gif-to-canvas": "^1.0.0",
101
101
  "gif.js": "^0.2.0",
102
+ "html2canvas": "^1.4.1",
102
103
  "husky": "^4.3.7",
103
104
  "jest": "^29.7.0",
104
105
  "less": "^4.1.1",
105
106
  "less-loader": "^7.3.0",
106
107
  "lint-staged": "^10.5.3",
107
108
  "prettier": "^2.2.1",
109
+ "qrcodejs2": "^0.0.2",
108
110
  "stylelint": "^13.8.0",
109
111
  "stylelint-config-prettier": "^8.0.2",
110
112
  "stylelint-config-rational-order": "^0.1.2",
@@ -128,5 +130,6 @@
128
130
  "es",
129
131
  "lib",
130
132
  "dist"
131
- ]
133
+ ],
134
+ "dependencies": {}
132
135
  }