@cmstops/pro-compo 0.3.3 → 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 (33) hide show
  1. package/dist/index.css +83 -0
  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/index.css +83 -0
  18. package/es/utils/date.d.ts +3 -0
  19. package/es/utils/date.js +27 -0
  20. package/lib/contentDetailList/component.js +12 -5
  21. package/lib/contentDetailList/components/Content/DocItem/index.js +9 -3
  22. package/lib/contentDetailList/components/Content/index.js +4 -2
  23. package/lib/contentDetailList/components/Doc/index.js +4 -2
  24. package/lib/contentDetailList/components/ShowQRCode/QrcodeView/index.js +271 -0
  25. package/lib/contentDetailList/components/ShowQRCode/index.js +67 -0
  26. package/lib/contentDetailList/script/api.js +19 -0
  27. package/lib/contentDetailList/style/QrCodeView.less +93 -0
  28. package/lib/contentDetailList/style/ShowQRCode.less +3 -0
  29. package/lib/contentDetailList/style/index.css +83 -0
  30. package/lib/contentDetailList/style/index.less +2 -0
  31. package/lib/index.css +83 -0
  32. package/lib/utils/date.js +29 -0
  33. package/package.json +5 -2
@@ -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%);
package/lib/index.css CHANGED
@@ -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.3",
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
  }