officialblock 1.0.1 → 1.0.3

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 (40) hide show
  1. package/README.md +25 -1
  2. package/dist/official-block.cjs.js +195 -1
  3. package/dist/official-block.es.js +27230 -72
  4. package/dist/official-block.umd.js +195 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +13 -2
  7. package/src/App.vue +32 -82
  8. package/src/components/ArticleList/article.vue +73 -0
  9. package/src/components/ArticleList/contact.vue +95 -0
  10. package/src/components/ArticleList/index.vue +220 -46
  11. package/src/components/ArticleList/setting.vue +709 -0
  12. package/src/components/Button/index.vue +183 -0
  13. package/src/components/Media/index.vue +327 -0
  14. package/src/components/Operate/index.vue +74 -0
  15. package/src/components/RichTextEditor/RichTextEditor.vue +277 -0
  16. package/src/components/RichTextEditor/index.ts +7 -0
  17. package/src/components/ThemePreview/ThemePreview.vue +462 -0
  18. package/src/components/ThemePreview/index.ts +4 -0
  19. package/src/components/index.ts +3 -0
  20. package/src/composables/useTheme.ts +205 -0
  21. package/src/index.ts +15 -4
  22. package/src/main.ts +16 -1
  23. package/src/router/index.ts +96 -0
  24. package/src/style.css +2 -4
  25. package/src/styles/editor.scss +649 -0
  26. package/src/styles/test.scss +20 -0
  27. package/src/styles/variables.scss +669 -0
  28. package/src/utils/common.ts +13 -0
  29. package/src/utils/theme.ts +335 -0
  30. package/src/views/Layout.vue +250 -0
  31. package/src/views/NotFound.vue +114 -0
  32. package/src/views/components/ArticleListDemo.vue +166 -0
  33. package/src/views/components/DragLimitDemo.vue +573 -0
  34. package/src/views/components/DragSortDemo.vue +610 -0
  35. package/src/views/components/HeroSlideDemo.vue +353 -0
  36. package/src/views/components/RichTextEditorDemo.vue +53 -0
  37. package/src/views/components/ThemeDemo.vue +477 -0
  38. package/src/views/guide/Installation.vue +234 -0
  39. package/src/views/guide/Introduction.vue +174 -0
  40. package/src/views/guide/QuickStart.vue +265 -0
@@ -0,0 +1,649 @@
1
+ .editor-content {
2
+ margin-top: 16px;
3
+ font-size: 16px;
4
+ line-height: 1.75;
5
+ color: $text-primary;
6
+
7
+ b, strong {
8
+ font-weight: 500;
9
+ color: $text-important;
10
+ }
11
+
12
+ h1, h1 * {
13
+ font-size: 40px;
14
+ font-weight: 500;
15
+ line-height: 1.2;
16
+ letter-spacing: .02em;
17
+ }
18
+
19
+ h2, h2 * {
20
+ font-size: 36px;
21
+ line-height: 1.33;
22
+ font-weight: 500;
23
+ }
24
+
25
+ h3, h3 * {
26
+ font-size: 26px;
27
+ font-weight: 700;
28
+ line-height: 1.69;
29
+ letter-spacing: .1em;
30
+ }
31
+
32
+ h4, h4 * {
33
+ font-size: 24px;
34
+ font-weight: 500;
35
+ line-height: 1.5;
36
+ }
37
+
38
+ h5, h5 * {
39
+ font-size: 20px;
40
+ font-weight: 700;
41
+ line-height: 1.6;
42
+ letter-spacing: .1em;
43
+ }
44
+
45
+ a {
46
+ color: #0048e8;
47
+ text-decoration: none;
48
+ background-image: linear-gradient(90deg,#0048e8,#0048e8);
49
+ background-size: 0 1px,100% 1px;
50
+ background-position: 0 100%,100% 100%;
51
+ background-repeat: no-repeat;
52
+ transition: background-size .3s;
53
+ padding-bottom: 2px;
54
+ }
55
+
56
+ a:focus, a:hover {
57
+ background-size: 100% 1px,0 1px;
58
+ }
59
+
60
+ ol:not(:last-child),ul:not(:last-child) {
61
+ margin-bottom: 16px;
62
+ }
63
+
64
+ ol:not(:first-child),ul:not(:first-child) {
65
+ margin-top: 16px;
66
+ }
67
+
68
+ ol>li,ul>li {
69
+ position: relative;
70
+ padding-left: 1.6em;
71
+ }
72
+
73
+ ul>li:before {
74
+ content: "";
75
+ position: absolute;
76
+ top: .7em;
77
+ left: .5em;
78
+ width: 5px;
79
+ height: 5px;
80
+ background: #000;
81
+ border-radius: 50%;
82
+ }
83
+
84
+ ol {
85
+ counter-reset: section;
86
+ list-style-type: none;
87
+ }
88
+
89
+ ol>li {
90
+ list-style-type: none;
91
+ position: relative;
92
+ }
93
+
94
+ ol>li:before {
95
+ counter-increment: section;
96
+ content: counters(section,".") ".";
97
+ position: absolute;
98
+ top: 0;
99
+ left: 0;
100
+ background: none;
101
+ }
102
+
103
+ img {
104
+ width: 100%;
105
+ }
106
+
107
+ em {
108
+ font-style: italic;
109
+ }
110
+
111
+ table.scrollable {
112
+ display: block;
113
+ overflow-x: auto;
114
+ white-space: nowrap;
115
+ scrollbar-color: $primary-color #e4e4e6;
116
+ scrollbar-width: thin;
117
+ }
118
+
119
+ table.scrollable::-webkit-scrollbar-track {
120
+ border-radius: 8px;
121
+ background-color: #e4e4e6;
122
+ }
123
+
124
+ table.scrollable::-webkit-scrollbar {
125
+ width: 8px;
126
+ height: 8px;
127
+ border-radius: 8px;
128
+ background-color: $primary-color;
129
+ }
130
+
131
+ table.scrollable::-webkit-scrollbar-thumb {
132
+ border-radius: 8px;
133
+ background-color: $primary-color;
134
+ }
135
+
136
+ table:not(.table-striped) tr {
137
+ background-color: #fff;
138
+ }
139
+
140
+ table:not(.table-striped) tr td {
141
+ padding: 8px 32px 8px 16px;
142
+ vertical-align: middle;
143
+ line-height: 1.25;
144
+ }
145
+
146
+ table:not(.table-striped) tr td:first-child:not(:only-child) {
147
+ background-color: #f2f8ff;
148
+ }
149
+
150
+ table:not(.table-striped) tr th {
151
+ background-color: $primary-color;
152
+ background-color: var(--text-color--secondary,$primary-color);
153
+ color: #fff;
154
+ padding: 8px 32px 8px 16px;
155
+ vertical-align: middle;
156
+ }
157
+
158
+ table:not(.table-striped) tr th *,table:not(.table-striped) tr th b,table:not(.table-striped) tr th em,table:not(.table-striped) tr th p,table:not(.table-striped) tr th strong {
159
+ color: #fff;
160
+ }
161
+
162
+ table:not(.table-striped) tr th p {
163
+ font-size: 18px;
164
+ font-weight: 500;
165
+ line-height: 1.33;
166
+ }
167
+
168
+ table.table-striped td {
169
+ font-size: 16px;
170
+ font-weight: 400;
171
+ line-height: 1.75;
172
+ padding: 13.5px 36px;
173
+ color: #1a1c20;
174
+ }
175
+
176
+ .column-1 {
177
+ -moz-column-count: 1;
178
+ column-count: 1;
179
+ grid-column-gap: 80px;
180
+ -moz-column-gap: 80px;
181
+ column-gap: 80px;
182
+ }
183
+
184
+ .column-1>* {
185
+ -moz-column-break-inside: avoid;
186
+ break-inside: avoid-column;
187
+ }
188
+
189
+ .column-2 {
190
+ -moz-column-count: 2;
191
+ column-count: 2;
192
+ grid-column-gap: 80px;
193
+ -moz-column-gap: 80px;
194
+ column-gap: 80px;
195
+ }
196
+
197
+ .column-2>* {
198
+ -moz-column-break-inside: avoid;
199
+ break-inside: avoid-column;
200
+ }
201
+
202
+ .column-3 {
203
+ -moz-column-count: 3;
204
+ column-count: 3;
205
+ grid-column-gap: 80px;
206
+ -moz-column-gap: 80px;
207
+ column-gap: 80px;
208
+ }
209
+
210
+ .column-3>* {
211
+ -moz-column-break-inside: avoid;
212
+ break-inside: avoid-column;
213
+ }
214
+
215
+ .column-4 {
216
+ -moz-column-count: 4;
217
+ column-count: 4;
218
+ grid-column-gap: 80px;
219
+ -moz-column-gap: 80px;
220
+ column-gap: 80px;
221
+ }
222
+
223
+ .column-4>* {
224
+ -moz-column-break-inside: avoid;
225
+ break-inside: avoid-column;
226
+ }
227
+
228
+ table.table-striped tr:nth-child(2n) {
229
+ background-color: #f2f8ff;
230
+ }
231
+
232
+ table.table-striped tr:nth-child(odd) {
233
+ background-color: #fff;
234
+ }
235
+
236
+ table.table-striped tr:first-child {
237
+ background-color: $primary-color;
238
+ }
239
+
240
+ table.table-striped th {
241
+ font-size: 16px;
242
+ font-weight: 400;
243
+ line-height: 1.25;
244
+ letter-spacing: .01em;
245
+ padding: 8px 36px;
246
+ color: #fff;
247
+ }
248
+ }
249
+
250
+ @media(max-width: 1023.98px) {
251
+ .editor-content {
252
+ font-size:14px;
253
+ line-height: 1.714;
254
+ letter-spacing: .01em;
255
+ }
256
+ }
257
+
258
+ @media(max-width: 1023.98px) {
259
+ .editor-content h1,.editor-content h1 * {
260
+ font-size:32px;
261
+ font-weight: 500;
262
+ line-height: 1.2;
263
+ letter-spacing: .02em;
264
+ }
265
+ }
266
+
267
+ @media(max-width: 767.98px) {
268
+ .editor-content h1,.editor-content h1 * {
269
+ font-size:24px;
270
+ line-height: 1.09;
271
+ }
272
+ }
273
+
274
+ @media(max-width: 1023.98px) {
275
+ .editor-content h2,.editor-content h2 * {
276
+ font-size:26px;
277
+ line-height: 1.2;
278
+ font-weight: 700;
279
+ }
280
+ }
281
+
282
+ @media(max-width: 767.98px) {
283
+ .editor-content h2,.editor-content h2 * {
284
+ font-size: 22px;
285
+ line-height: 1.2;
286
+ font-weight: 500;
287
+ }
288
+ }
289
+
290
+ @media(max-width: 1023.98px) {
291
+ .editor-content h3,.editor-content h3 * {
292
+ font-size:24px;
293
+ line-height: 1;
294
+ }
295
+ }
296
+
297
+ @media(max-width: 767.98px) {
298
+ .editor-content h3,.editor-content h3 * {
299
+ font-size:20px;
300
+ line-height: 1.2;
301
+ letter-spacing: .08em;
302
+ }
303
+ }
304
+
305
+ @media(max-width: 767.98px) {
306
+ .editor-content h4,.editor-content h4 * {
307
+ font-size:20px;
308
+ line-height: 1.2;
309
+ letter-spacing: -.005em;
310
+ }
311
+ }
312
+
313
+ @media(max-width: 1023.98px) {
314
+ .editor-content h5,.editor-content h5 * {
315
+ font-size:16px;
316
+ font-weight: 500;
317
+ line-height: 1.125;
318
+ letter-spacing: .01em;
319
+ }
320
+ }
321
+
322
+ @media(max-width: 767.98px) {
323
+ .editor-content h5,.editor-content h5 * {
324
+ font-weight:700;
325
+ line-height: 1.25;
326
+ letter-spacing: .06em;
327
+ }
328
+ }
329
+
330
+ @media(max-width: 575.98px) {
331
+ .editor-content table.scrollable-sm {
332
+ display:block;
333
+ overflow-x: auto;
334
+ white-space: nowrap;
335
+ scrollbar-color: $primary-color #e4e4e6;
336
+ scrollbar-width: thin;
337
+ }
338
+
339
+ .editor-content table.scrollable-sm::-webkit-scrollbar-track {
340
+ border-radius: 8px;
341
+ background-color: #e4e4e6;
342
+ }
343
+
344
+ .editor-content table.scrollable-sm::-webkit-scrollbar {
345
+ width: 8px;
346
+ height: 8px;
347
+ border-radius: 8px;
348
+ background-color: $primary-color;
349
+ }
350
+
351
+ .editor-content table.scrollable-sm::-webkit-scrollbar-thumb {
352
+ border-radius: 8px;
353
+ background-color: $primary-color;
354
+ }
355
+ }
356
+
357
+ @media(max-width: 767.98px) {
358
+ .editor-content table.scrollable-md {
359
+ display:block;
360
+ overflow-x: auto;
361
+ white-space: nowrap;
362
+ scrollbar-color: $primary-color #e4e4e6;
363
+ scrollbar-width: thin;
364
+ }
365
+
366
+ .editor-content table.scrollable-md::-webkit-scrollbar-track {
367
+ border-radius: 8px;
368
+ background-color: #e4e4e6;
369
+ }
370
+
371
+ .editor-content table.scrollable-md::-webkit-scrollbar {
372
+ width: 8px;
373
+ height: 8px;
374
+ border-radius: 8px;
375
+ background-color: $primary-color;
376
+ }
377
+
378
+ .editor-content table.scrollable-md::-webkit-scrollbar-thumb {
379
+ border-radius: 8px;
380
+ background-color: $primary-color;
381
+ }
382
+ }
383
+
384
+ @media(max-width: 1023.98px) {
385
+ .editor-content table.scrollable-lg {
386
+ display:block;
387
+ overflow-x: auto;
388
+ white-space: nowrap;
389
+ scrollbar-color: $primary-color #e4e4e6;
390
+ scrollbar-width: thin;
391
+ }
392
+
393
+ .editor-content table.scrollable-lg::-webkit-scrollbar-track {
394
+ border-radius: 8px;
395
+ background-color: #e4e4e6;
396
+ }
397
+
398
+ .editor-content table.scrollable-lg::-webkit-scrollbar {
399
+ width: 8px;
400
+ height: 8px;
401
+ border-radius: 8px;
402
+ background-color: $primary-color;
403
+ }
404
+
405
+ .editor-content table.scrollable-lg::-webkit-scrollbar-thumb {
406
+ border-radius: 8px;
407
+ background-color: $primary-color;
408
+ }
409
+ }
410
+
411
+ @media(max-width: 1279.98px) {
412
+ .editor-content table.scrollable-xl {
413
+ display:block;
414
+ overflow-x: auto;
415
+ white-space: nowrap;
416
+ scrollbar-color: $primary-color #e4e4e6;
417
+ scrollbar-width: thin;
418
+ }
419
+
420
+ .editor-content table.scrollable-xl::-webkit-scrollbar-track {
421
+ border-radius: 8px;
422
+ background-color: #e4e4e6;
423
+ }
424
+
425
+ .editor-content table.scrollable-xl::-webkit-scrollbar {
426
+ width: 8px;
427
+ height: 8px;
428
+ border-radius: 8px;
429
+ background-color: $primary-color;
430
+ }
431
+
432
+ .editor-content table.scrollable-xl::-webkit-scrollbar-thumb {
433
+ border-radius: 8px;
434
+ background-color: $primary-color;
435
+ }
436
+ }
437
+
438
+ @media(max-width: 767.98px) {
439
+ .editor-content table:not(.table-striped) tr td {
440
+ padding:10px 8px;
441
+ }
442
+ }
443
+
444
+ @media(max-width: 767.98px) {
445
+ .editor-content table:not(.table-striped) tr th {
446
+ height:34px;
447
+ padding: 8px 12px;
448
+ }
449
+ }
450
+
451
+ @media(max-width: 1023.98px) {
452
+ .editor-content table:not(.table-striped) tr th p {
453
+ font-size:16px;
454
+ line-height: 1.25;
455
+ letter-spacing: .01em;
456
+ }
457
+ }
458
+
459
+ @media(max-width: 767.98px) {
460
+ .editor-content table:not(.table-striped) tr th p {
461
+ line-height:1.5;
462
+ font-size: 16px;
463
+ font-weight: 400;
464
+ line-height: 1.25;
465
+ letter-spacing: .01em;
466
+ }
467
+ }
468
+
469
+ @media(max-width: 767.98px)and (max-width:1023.98px) {
470
+ .editor-content table:not(.table-striped) tr th p {
471
+ font-size:14px;
472
+ line-height: 1.285;
473
+ letter-spacing: .01em;
474
+ }
475
+ }
476
+
477
+ @media(max-width: 1023.98px) {
478
+ .editor-content table.table-striped th {
479
+ font-size:14px;
480
+ line-height: 1.285;
481
+ letter-spacing: .01em;
482
+ padding: 8px 16px;
483
+ }
484
+ }
485
+
486
+ @media(max-width: 767.98px) {
487
+ .editor-content table.table-striped th {
488
+ padding:8px;
489
+ }
490
+ }
491
+
492
+ @media(max-width: 1023.98px) {
493
+ .editor-content table.table-striped td {
494
+ font-size:14px;
495
+ line-height: 1.714;
496
+ letter-spacing: .01em;
497
+ padding: 12px 16px;
498
+ }
499
+ }
500
+
501
+ @media(max-width: 767.98px) {
502
+ .editor-content table.table-striped td {
503
+ padding:10px 8px;
504
+ }
505
+ }
506
+
507
+ @media(min-width: 768px) {
508
+ .editor-content .column-tablet-1 {
509
+ -moz-column-count:1;
510
+ column-count: 1;
511
+ grid-column-gap: 80px;
512
+ -moz-column-gap: 80px;
513
+ column-gap: 80px;
514
+ }
515
+
516
+ .editor-content .column-tablet-1>* {
517
+ -moz-column-break-inside: avoid;
518
+ break-inside: avoid-column;
519
+ }
520
+ }
521
+
522
+ @media(min-width: 768px) {
523
+ .editor-content .column-tablet-2 {
524
+ -moz-column-count:2;
525
+ column-count: 2;
526
+ grid-column-gap: 80px;
527
+ -moz-column-gap: 80px;
528
+ column-gap: 80px;
529
+ }
530
+
531
+ .editor-content .column-tablet-2>* {
532
+ -moz-column-break-inside: avoid;
533
+ break-inside: avoid-column;
534
+ }
535
+ }
536
+
537
+ @media(min-width: 768px) {
538
+ .editor-content .column-tablet-3 {
539
+ -moz-column-count:3;
540
+ column-count: 3;
541
+ grid-column-gap: 80px;
542
+ -moz-column-gap: 80px;
543
+ column-gap: 80px;
544
+ }
545
+
546
+ .editor-content .column-tablet-3>* {
547
+ -moz-column-break-inside: avoid;
548
+ break-inside: avoid-column;
549
+ }
550
+ }
551
+
552
+ @media(min-width: 768px) {
553
+ .editor-content .column-tablet-4 {
554
+ -moz-column-count:4;
555
+ column-count: 4;
556
+ grid-column-gap: 80px;
557
+ -moz-column-gap: 80px;
558
+ column-gap: 80px;
559
+ }
560
+
561
+ .editor-content .column-tablet-4>* {
562
+ -moz-column-break-inside: avoid;
563
+ break-inside: avoid-column;
564
+ }
565
+ }
566
+
567
+ @media(min-width: 1280px) {
568
+ .editor-content .column-desktop-1 {
569
+ -moz-column-count:1;
570
+ column-count: 1;
571
+ grid-column-gap: 80px;
572
+ -moz-column-gap: 80px;
573
+ column-gap: 80px;
574
+ }
575
+
576
+ .editor-content .column-desktop-1>* {
577
+ -moz-column-break-inside: avoid;
578
+ break-inside: avoid-column;
579
+ }
580
+ }
581
+
582
+ @media(min-width: 1280px) {
583
+ .editor-content .column-desktop-2 {
584
+ -moz-column-count:2;
585
+ column-count: 2;
586
+ grid-column-gap: 80px;
587
+ -moz-column-gap: 80px;
588
+ column-gap: 80px;
589
+ }
590
+
591
+ .editor-content .column-desktop-2>* {
592
+ -moz-column-break-inside: avoid;
593
+ break-inside: avoid-column;
594
+ }
595
+ }
596
+
597
+ @media(min-width: 1280px) {
598
+ .editor-content .column-desktop-3 {
599
+ -moz-column-count:3;
600
+ column-count: 3;
601
+ grid-column-gap: 80px;
602
+ -moz-column-gap: 80px;
603
+ column-gap: 80px;
604
+ }
605
+
606
+ .editor-content .column-desktop-3>* {
607
+ -moz-column-break-inside: avoid;
608
+ break-inside: avoid-column;
609
+ }
610
+ }
611
+
612
+ @media(min-width: 1280px) {
613
+ .editor-content .column-desktop-4 {
614
+ -moz-column-count:4;
615
+ column-count: 4;
616
+ grid-column-gap: 80px;
617
+ -moz-column-gap: 80px;
618
+ column-gap: 80px;
619
+ }
620
+
621
+ .editor-content .column-desktop-4>* {
622
+ -moz-column-break-inside: avoid;
623
+ break-inside: avoid-column;
624
+ }
625
+ }
626
+
627
+ @media(max-width: 1023.98px) {
628
+ .container-content,.container-content-952 {
629
+ padding-left:24px;
630
+ padding-right: 24px;
631
+ max-width: calc(var(--max-width) + 48px);
632
+ }
633
+ }
634
+
635
+ @media(max-width: 767.98px) {
636
+ .container-content,.container-content-952 {
637
+ padding-left:12px;
638
+ padding-right: 12px;
639
+ max-width: calc(var(--max-width) + 24px);
640
+ }
641
+ }
642
+
643
+ @media(max-width: 575.98px) {
644
+ .container-content,.container-content-952 {
645
+ padding-left:12px;
646
+ padding-right: 12px;
647
+ max-width: calc(var(--max-width) + 24px);
648
+ }
649
+ }
@@ -0,0 +1,20 @@
1
+ // 测试 Sass 功能和 @ 路径别名
2
+ @import '@/styles/variables.scss';
3
+
4
+ .test-sass {
5
+ // 测试 Sass 变量
6
+ color: $primary-color;
7
+ font-size: $font-size-lg;
8
+ padding: $spacing-md;
9
+
10
+ // 测试 Sass 嵌套
11
+ &:hover {
12
+ color: $primary-hover-color;
13
+ }
14
+
15
+ // 测试 Sass 混合器
16
+ @include flex-center;
17
+
18
+ // 测试 Sass 函数
19
+ background-color: lighten($primary-color, 20%);
20
+ }