officialblock 1.0.1 → 1.0.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 (38) hide show
  1. package/README.md +25 -1
  2. package/dist/official-block.cjs.js +186 -1
  3. package/dist/official-block.es.js +22619 -73
  4. package/dist/official-block.umd.js +186 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +12 -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 +215 -48
  11. package/src/components/ArticleList/setting.vue +407 -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 +84 -0
  24. package/src/style.css +0 -1
  25. package/src/styles/editor.scss +649 -0
  26. package/src/styles/test.scss +20 -0
  27. package/src/styles/variables.scss +639 -0
  28. package/src/utils/common.ts +13 -0
  29. package/src/utils/theme.ts +335 -0
  30. package/src/views/Layout.vue +247 -0
  31. package/src/views/NotFound.vue +114 -0
  32. package/src/views/components/ArticleListDemo.vue +167 -0
  33. package/src/views/components/HeroSlideDemo.vue +353 -0
  34. package/src/views/components/RichTextEditorDemo.vue +53 -0
  35. package/src/views/components/ThemeDemo.vue +477 -0
  36. package/src/views/guide/Installation.vue +234 -0
  37. package/src/views/guide/Introduction.vue +174 -0
  38. package/src/views/guide/QuickStart.vue +265 -0
@@ -0,0 +1,639 @@
1
+ // Sass 变量文件 - 整合主题系统
2
+ // 这个文件会自动导入到所有 Sass/SCSS 文件中
3
+
4
+ // 导入 Google Fonts
5
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
6
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700;800&display=swap');
7
+
8
+ // ===== 主色调系统 =====
9
+ // 现代蓝色系 - 主色调
10
+ $primary-color: #0032a0;
11
+ $primary-50: #eff6ff;
12
+ $primary-100: #dbeafe;
13
+ $primary-200: #bfdbfe;
14
+ $primary-300: #93c5fd;
15
+ $primary-400: #60a5fa;
16
+ $primary-500: #3b82f6;
17
+ $primary-600: #0048e8;
18
+ $primary-700: #1d4ed8;
19
+ $primary-800: #1e40af;
20
+ $primary-900: #1e3a8a;
21
+ $primary-950: #172554;
22
+
23
+ // 兼容旧版本的变量名
24
+ $primary-hover-color: $primary-600;
25
+
26
+ // 现代紫色系 - 辅助色
27
+ $secondary-color: #a855f7;
28
+ $secondary-50: #faf5ff;
29
+ $secondary-100: #f3e8ff;
30
+ $secondary-200: #e9d5ff;
31
+ $secondary-300: #d8b4fe;
32
+ $secondary-400: #c084fc;
33
+ $secondary-500: #a855f7;
34
+ $secondary-600: #9333ea;
35
+ $secondary-700: #7c3aed;
36
+ $secondary-800: #6b21a8;
37
+ $secondary-900: #581c87;
38
+ $secondary-950: #3b0764;
39
+
40
+ // 功能色系
41
+ $success-color: #22c55e;
42
+ $warning-color: #f59e0b;
43
+ $error-color: #ef4444;
44
+ $info-color: #3b82f6;
45
+
46
+ // ===== 中性色系统 =====
47
+ // 现代灰色系
48
+ $gray-50: #f9fafb;
49
+ $gray-100: #f3f4f6;
50
+ $gray-200: #e5e7eb;
51
+ $gray-300: #d1d5db;
52
+ $gray-400: #9ca3af;
53
+ $gray-500: #6b7280;
54
+ $gray-600: #4b5563;
55
+ $gray-700: #374151;
56
+ $gray-800: #1f2937;
57
+ $gray-900: #1a1c20;
58
+ $gray-950: #030712;
59
+
60
+ // ===== 文本颜色系统 =====
61
+ $text-primary: $gray-900;
62
+ $text-white: #ffffff;
63
+ $text-important: $primary-color;
64
+ $text-secondary: $primary-600;
65
+ $text-tertiary: rgba($gray-900, 0.6);
66
+ $text-disabled: #c0c0c4;
67
+ $text-muted: $gray-600;
68
+
69
+ // ===== 背景颜色系统 =====
70
+ $bg-primary: #ffffff;
71
+ $bg-secondary: $gray-50;
72
+ $bg-tertiary: $gray-100;
73
+
74
+ // ===== 按钮颜色系统 =====
75
+ $button-bg: $primary-color;
76
+ $button-text: #ffffff;
77
+ $button-hover-bg: $primary-600;
78
+
79
+ // ===== 字体系统 =====
80
+ // 字体族
81
+ $font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
82
+ $font-family-mono: 'JetBrains Mono', 'Fira Code', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
83
+
84
+ // 字体大小 - 默认字号为 14px
85
+ $font-size-xs: 0.75rem; // 12px
86
+ $font-size-sm: 0.875rem; // 14px - 默认字号
87
+ $font-size-default: 0.875rem; // 14px - 默认字号
88
+ $font-size-base: 1rem; // 16px
89
+ $font-size-lg: 1.125rem; // 18px
90
+ $font-size-xl: 1.25rem; // 20px
91
+ $font-size-2xl: 1.5rem; // 24px
92
+ $font-size-3xl: 1.875rem; // 30px
93
+ $font-size-4xl: 2.25rem; // 36px
94
+
95
+ // 字体权重
96
+ $font-weight-light: 300;
97
+ $font-weight-normal: 400;
98
+ $font-weight-medium: 500;
99
+ $font-weight-semibold: 600;
100
+ $font-weight-bold: 700;
101
+
102
+ // 行高
103
+ $line-height-tight: 1.25;
104
+ $line-height-normal: 1.5;
105
+ $line-height-relaxed: 1.75;
106
+
107
+ // ===== 间距系统 =====
108
+ $spacing-xs: 0.25rem; // 4px
109
+ $spacing-sm: 0.5rem; // 8px
110
+ $spacing-md: 1rem; // 16px
111
+ $spacing-lg: 1.5rem; // 24px
112
+ $spacing-xl: 2rem; // 32px
113
+ $spacing-2xl: 3rem; // 48px
114
+ $spacing-3xl: 4rem; // 64px
115
+
116
+ // ===== 圆角系统 =====
117
+ $radius-none: 0;
118
+ $radius-sm: 0.25rem; // 4px
119
+ $radius-md: 0.375rem; // 6px
120
+ $radius-lg: 0.5rem; // 8px
121
+ $radius-xl: 0.75rem; // 12px
122
+ $radius-2xl: 1rem; // 16px
123
+ $radius-full: 9999px;
124
+
125
+ // ===== 阴影系统 =====
126
+ $shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
127
+ $shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
128
+ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
129
+ $shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
130
+ $shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
131
+
132
+ // ===== 过渡动画系统 =====
133
+ $transition-fast: 150ms ease-in-out;
134
+ $transition-normal: 200ms ease-in-out;
135
+ $transition-slow: 300ms ease-in-out;
136
+
137
+ // ===== 响应式断点系统 =====
138
+ $breakpoint-xs: 475px;
139
+ $breakpoint-sm: 640px;
140
+ $breakpoint-md: 768px;
141
+ $breakpoint-lg: 1024px;
142
+ $breakpoint-xl: 1280px;
143
+ $breakpoint-2xl: 1536px;
144
+
145
+ // ===== Z-index 层级系统 =====
146
+ $z-dropdown: 1000;
147
+ $z-sticky: 1020;
148
+ $z-fixed: 1030;
149
+ $z-modal-backdrop: 1040;
150
+ $z-modal: 1050;
151
+ $z-popover: 1060;
152
+ $z-tooltip: 1070;
153
+ $z-toast: 1080;
154
+
155
+ // 混合器 (Mixins)
156
+ @mixin flex-center {
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ }
161
+
162
+ @mixin flex-between {
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: space-between;
166
+ }
167
+
168
+ @mixin text-ellipsis {
169
+ overflow: hidden;
170
+ text-overflow: ellipsis;
171
+ white-space: nowrap;
172
+ }
173
+
174
+ @mixin visually-hidden {
175
+ position: absolute;
176
+ width: 1px;
177
+ height: 1px;
178
+ padding: 0;
179
+ margin: -1px;
180
+ overflow: hidden;
181
+ clip: rect(0, 0, 0, 0);
182
+ white-space: nowrap;
183
+ border: 0;
184
+ }
185
+
186
+ // 响应式混合器
187
+ @mixin mobile {
188
+ @media (max-width: #{$breakpoint-md - 1px}) {
189
+ @content;
190
+ }
191
+ }
192
+
193
+ @mixin tablet {
194
+ @media (min-width: #{$breakpoint-md}) and (max-width: #{$breakpoint-lg - 1px}) {
195
+ @content;
196
+ }
197
+ }
198
+
199
+ @mixin desktop {
200
+ @media (min-width: #{$breakpoint-lg}) {
201
+ @content;
202
+ }
203
+ }
204
+
205
+ @mixin mobile-up {
206
+ @media (min-width: #{$breakpoint-sm}) {
207
+ @content;
208
+ }
209
+ }
210
+
211
+ @mixin tablet-up {
212
+ @media (min-width: #{$breakpoint-md}) {
213
+ @content;
214
+ }
215
+ }
216
+
217
+ @mixin desktop-up {
218
+ @media (min-width: #{$breakpoint-lg}) {
219
+ @content;
220
+ }
221
+ }
222
+
223
+ // 按钮混合器
224
+ @mixin button-base {
225
+ display: inline-flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ padding: $spacing-sm $spacing-md;
229
+ border: 1px solid transparent;
230
+ border-radius: $radius-md;
231
+ font-size: $font-size-sm;
232
+ font-weight: $font-weight-medium;
233
+ line-height: $line-height-tight;
234
+ text-decoration: none;
235
+ cursor: pointer;
236
+ transition: all $transition-fast;
237
+ user-select: none;
238
+
239
+ &:focus {
240
+ outline: 2px solid transparent;
241
+ outline-offset: 2px;
242
+ }
243
+
244
+ &:disabled {
245
+ opacity: 0.5;
246
+ cursor: not-allowed;
247
+ }
248
+ }
249
+
250
+ @mixin button-primary {
251
+ @include button-base;
252
+ background-color: $button-bg;
253
+ color: $button-text;
254
+
255
+ &:hover:not(:disabled) {
256
+ background-color: $button-hover-bg;
257
+ }
258
+
259
+ &:focus {
260
+ box-shadow: 0 0 0 3px rgba($primary-color, 0.3);
261
+ }
262
+ }
263
+
264
+ @mixin button-secondary {
265
+ @include button-base;
266
+ background-color: $secondary-color;
267
+ color: white;
268
+
269
+ &:hover:not(:disabled) {
270
+ background-color: darken($secondary-color, 10%);
271
+ }
272
+
273
+ &:focus {
274
+ box-shadow: 0 0 0 3px rgba($secondary-color, 0.3);
275
+ }
276
+ }
277
+
278
+ @mixin button-outline {
279
+ @include button-base;
280
+ background-color: transparent;
281
+ color: $primary-color;
282
+ border-color: $primary-color;
283
+
284
+ &:hover:not(:disabled) {
285
+ background-color: $primary-color;
286
+ color: white;
287
+ }
288
+
289
+ &:focus {
290
+ box-shadow: 0 0 0 3px rgba($primary-color, 0.3);
291
+ }
292
+ }
293
+
294
+ // 卡片混合器
295
+ @mixin card {
296
+ background-color: white;
297
+ border-radius: $radius-lg;
298
+ box-shadow: $shadow-sm;
299
+ padding: $spacing-lg;
300
+ transition: box-shadow $transition-fast;
301
+
302
+ &:hover {
303
+ box-shadow: $shadow-md;
304
+ }
305
+ }
306
+
307
+ // 输入框混合器
308
+ @mixin input {
309
+ width: 100%;
310
+ padding: $spacing-sm $spacing-md;
311
+ border: 1px solid $gray-300;
312
+ border-radius: $radius-md;
313
+ font-size: $font-size-sm;
314
+ line-height: $line-height-normal;
315
+ background-color: white;
316
+ transition: border-color $transition-fast, box-shadow $transition-fast;
317
+
318
+ &:focus {
319
+ outline: none;
320
+ border-color: $primary-color;
321
+ box-shadow: 0 0 0 3px rgba($primary-color, 0.1);
322
+ }
323
+
324
+ &:disabled {
325
+ background-color: $gray-100;
326
+ color: $text-disabled;
327
+ cursor: not-allowed;
328
+ }
329
+
330
+ &::placeholder {
331
+ color: $gray-400;
332
+ }
333
+ }
334
+
335
+ // ===== CSS 变量定义 =====
336
+ // 将 Sass 变量转换为 CSS 变量,用于主题系统
337
+ :root {
338
+ // 主色调
339
+ --theme-primary: #{$primary-color};
340
+ --theme-primary-50: #{$primary-50};
341
+ --theme-primary-100: #{$primary-100};
342
+ --theme-primary-200: #{$primary-200};
343
+ --theme-primary-300: #{$primary-300};
344
+ --theme-primary-400: #{$primary-400};
345
+ --theme-primary-500: #{$primary-500};
346
+ --theme-primary-600: #{$primary-600};
347
+ --theme-primary-700: #{$primary-700};
348
+ --theme-primary-800: #{$primary-800};
349
+ --theme-primary-900: #{$primary-900};
350
+ --theme-primary-950: #{$primary-950};
351
+
352
+ // 辅助色
353
+ --theme-secondary: #{$secondary-color};
354
+ --theme-secondary-50: #{$secondary-50};
355
+ --theme-secondary-100: #{$secondary-100};
356
+ --theme-secondary-200: #{$secondary-200};
357
+ --theme-secondary-300: #{$secondary-300};
358
+ --theme-secondary-400: #{$secondary-400};
359
+ --theme-secondary-500: #{$secondary-500};
360
+ --theme-secondary-600: #{$secondary-600};
361
+ --theme-secondary-700: #{$secondary-700};
362
+ --theme-secondary-800: #{$secondary-800};
363
+ --theme-secondary-900: #{$secondary-900};
364
+ --theme-secondary-950: #{$secondary-950};
365
+
366
+ // 功能色
367
+ --theme-success: #{$success-color};
368
+ --theme-warning: #{$warning-color};
369
+ --theme-error: #{$error-color};
370
+ --theme-info: #{$info-color};
371
+
372
+ // 中性色
373
+ --theme-gray-50: #{$gray-50};
374
+ --theme-gray-100: #{$gray-100};
375
+ --theme-gray-200: #{$gray-200};
376
+ --theme-gray-300: #{$gray-300};
377
+ --theme-gray-400: #{$gray-400};
378
+ --theme-gray-500: #{$gray-500};
379
+ --theme-gray-600: #{$gray-600};
380
+ --theme-gray-700: #{$gray-700};
381
+ --theme-gray-800: #{$gray-800};
382
+ --theme-gray-900: #{$gray-900};
383
+ --theme-gray-950: #{$gray-950};
384
+
385
+ // 按钮颜色
386
+ --button-bg-color: #{$button-bg};
387
+ --button-text-color: #{$button-text};
388
+ --button-hover-bg-color: #{$button-hover-bg};
389
+
390
+ // 文本颜色
391
+ --text-primary-color: #{$text-primary};
392
+ --text-white-color: #{$text-white};
393
+ --text-important-color: #{$text-important};
394
+ --text-secondary-color: #{$text-secondary};
395
+ --text-tertiary-color: #{$text-tertiary};
396
+ --text-disabled-color: #{$text-disabled};
397
+
398
+ // 背景颜色
399
+ --bg-primary-color: #{$bg-primary};
400
+
401
+ // 字体配置
402
+ --font-family-sans: #{$font-family-sans};
403
+ --font-family-mono: #{$font-family-mono};
404
+
405
+ // 字号配置
406
+ --font-size-xs: #{$font-size-xs};
407
+ --font-size-sm: #{$font-size-sm};
408
+ --font-size-default: #{$font-size-default};
409
+ --font-size-base: #{$font-size-base};
410
+ --font-size-lg: #{$font-size-lg};
411
+ --font-size-xl: #{$font-size-xl};
412
+ --font-size-2xl: #{$font-size-2xl};
413
+ --font-size-3xl: #{$font-size-3xl};
414
+ --font-size-4xl: #{$font-size-4xl};
415
+
416
+ // 行高配置
417
+ --line-height-tight: #{$line-height-tight};
418
+ --line-height-normal: #{$line-height-normal};
419
+ --line-height-relaxed: #{$line-height-relaxed};
420
+
421
+ // 间距配置
422
+ --spacing-xs: #{$spacing-xs};
423
+ --spacing-sm: #{$spacing-sm};
424
+ --spacing-md: #{$spacing-md};
425
+ --spacing-lg: #{$spacing-lg};
426
+ --spacing-xl: #{$spacing-xl};
427
+ --spacing-2xl: #{$spacing-2xl};
428
+
429
+ // 圆角配置
430
+ --radius-sm: #{$radius-sm};
431
+ --radius-md: #{$radius-md};
432
+ --radius-lg: #{$radius-lg};
433
+ --radius-xl: #{$radius-xl};
434
+ --radius-2xl: #{$radius-2xl};
435
+
436
+ // 阴影配置
437
+ --shadow-sm: #{$shadow-sm};
438
+ --shadow-md: #{$shadow-md};
439
+ --shadow-lg: #{$shadow-lg};
440
+ --shadow-xl: #{$shadow-xl};
441
+
442
+ // 过渡动画
443
+ --transition-fast: #{$transition-fast};
444
+ --transition-normal: #{$transition-normal};
445
+ --transition-slow: #{$transition-slow};
446
+
447
+ // Z-index 层级
448
+ --z-dropdown: #{$z-dropdown};
449
+ --z-sticky: #{$z-sticky};
450
+ --z-fixed: #{$z-fixed};
451
+ --z-modal-backdrop: #{$z-modal-backdrop};
452
+ --z-modal: #{$z-modal};
453
+ --z-popover: #{$z-popover};
454
+ --z-tooltip: #{$z-tooltip};
455
+ --z-toast: #{$z-toast};
456
+ }
457
+
458
+ // ===== 暗色主题支持 =====
459
+ @media (prefers-color-scheme: dark) {
460
+ :root {
461
+ --theme-gray-50: #{$gray-950};
462
+ --theme-gray-100: #{$gray-900};
463
+ --theme-gray-200: #{$gray-800};
464
+ --theme-gray-300: #{$gray-700};
465
+ --theme-gray-400: #{$gray-600};
466
+ --theme-gray-500: #{$gray-500};
467
+ --theme-gray-600: #{$gray-400};
468
+ --theme-gray-700: #{$gray-300};
469
+ --theme-gray-800: #{$gray-200};
470
+ --theme-gray-900: #{$gray-100};
471
+ --theme-gray-950: #{$gray-50};
472
+ }
473
+ }
474
+
475
+ // ===== 全局基础样式 =====
476
+ * {
477
+ box-sizing: border-box;
478
+ }
479
+
480
+ html {
481
+ font-family: var(--font-family-sans);
482
+ font-size: var(--font-size-default);
483
+ line-height: var(--line-height-normal);
484
+ color: var(--theme-gray-900);
485
+ background-color: var(--theme-gray-50);
486
+ -webkit-font-smoothing: antialiased;
487
+ -moz-osx-font-smoothing: grayscale;
488
+ text-rendering: optimizeLegibility;
489
+ }
490
+
491
+ body {
492
+ margin: 0;
493
+ padding: 0;
494
+ font-size: var(--font-size-default);
495
+ line-height: var(--line-height-normal);
496
+ }
497
+
498
+ // ===== 标题样式 =====
499
+ h1, h2, h3, h4, h5, h6 {
500
+ margin: 0;
501
+ font-weight: $font-weight-semibold;
502
+ line-height: var(--line-height-tight);
503
+ color: var(--theme-gray-900);
504
+ }
505
+
506
+ h1 { font-size: var(--font-size-3xl); }
507
+ h2 { font-size: var(--font-size-2xl); }
508
+ h3 { font-size: var(--font-size-xl); }
509
+ h4 { font-size: var(--font-size-lg); }
510
+ h5 { font-size: var(--font-size-base); }
511
+ h6 { font-size: var(--font-size-sm); }
512
+
513
+ // ===== 段落样式 =====
514
+ p {
515
+ margin: 0;
516
+ }
517
+
518
+ // ===== 链接样式 =====
519
+ a {
520
+ color: var(--theme-primary);
521
+ text-decoration: none;
522
+ transition: color var(--transition-fast);
523
+
524
+ &:hover {
525
+ color: var(--theme-primary-600);
526
+ text-decoration: underline;
527
+ }
528
+ }
529
+
530
+ // ===== 代码样式 =====
531
+ code, pre {
532
+ font-family: var(--font-family-mono);
533
+ font-size: 0.875em;
534
+ }
535
+
536
+ code {
537
+ background-color: var(--theme-gray-100);
538
+ color: var(--theme-gray-800);
539
+ padding: 0.125rem 0.25rem;
540
+ border-radius: var(--radius-sm);
541
+ }
542
+
543
+ pre {
544
+ background-color: var(--theme-gray-100);
545
+ color: var(--theme-gray-800);
546
+ padding: var(--spacing-md);
547
+ border-radius: var(--radius-md);
548
+ overflow-x: auto;
549
+ line-height: var(--line-height-relaxed);
550
+
551
+ code {
552
+ background: none;
553
+ padding: 0;
554
+ border-radius: 0;
555
+ }
556
+ }
557
+
558
+ // ===== 滚动条样式 =====
559
+ ::-webkit-scrollbar {
560
+ width: 6px;
561
+ height: 6px;
562
+ }
563
+
564
+ ::-webkit-scrollbar-track {
565
+ background: var(--theme-gray-100);
566
+ border-radius: var(--radius-sm);
567
+ }
568
+
569
+ ::-webkit-scrollbar-thumb {
570
+ background: var(--theme-gray-300);
571
+ border-radius: var(--radius-sm);
572
+
573
+ &:hover {
574
+ background: var(--theme-gray-400);
575
+ }
576
+ }
577
+
578
+ // ===== 选择文本样式 =====
579
+ ::selection {
580
+ background-color: var(--theme-primary-200);
581
+ color: var(--theme-primary-900);
582
+ }
583
+
584
+ // ===== 焦点样式 =====
585
+ :focus-visible {
586
+ outline: 2px solid var(--theme-primary);
587
+ outline-offset: 2px;
588
+ }
589
+
590
+ // ===== 工具类 =====
591
+ .text-theme-primary { color: var(--theme-primary) !important; }
592
+ .bg-theme-primary { background-color: var(--theme-primary) !important; }
593
+ .border-theme-primary { border-color: var(--theme-primary) !important; }
594
+
595
+ .text-default {
596
+ font-size: var(--font-size-default) !important;
597
+ line-height: var(--line-height-normal) !important;
598
+ }
599
+
600
+ .text-muted {
601
+ color: var(--theme-gray-600) !important;
602
+ }
603
+
604
+ .font-sans { font-family: var(--font-family-sans) !important; }
605
+ .font-mono { font-family: var(--font-family-mono) !important; }
606
+
607
+ // ===== 响应式工具类 =====
608
+ .container-responsive {
609
+ max-width: 1280px;
610
+ margin: 0 auto;
611
+ padding: 0 var(--spacing-md);
612
+
613
+ @include mobile-up {
614
+ padding: 0 var(--spacing-lg);
615
+ }
616
+
617
+ @include desktop-up {
618
+ padding: 0 var(--spacing-xl);
619
+ }
620
+ }
621
+
622
+ // ===== 动画工具类 =====
623
+ .transition-fast { transition: all var(--transition-fast); }
624
+ .transition-normal { transition: all var(--transition-normal); }
625
+ .transition-slow { transition: all var(--transition-slow); }
626
+
627
+ // ===== 阴影工具类 =====
628
+ .shadow-sm { box-shadow: var(--shadow-sm); }
629
+ .shadow-md { box-shadow: var(--shadow-md); }
630
+ .shadow-lg { box-shadow: var(--shadow-lg); }
631
+ .shadow-xl { box-shadow: var(--shadow-xl); }
632
+
633
+ .pt-10 {
634
+ padding-top: 10px;
635
+ }
636
+
637
+ .mt-10 {
638
+ margin-top: 10px;
639
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 生成随机字符串
3
+ * @param len 字符串长度
4
+ * @returns 随机字符串
5
+ */
6
+ export function randomString(len: number = 16): string {
7
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
8
+ let result = '';
9
+ for (let i = 0; i < len; i++) {
10
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
11
+ }
12
+ return result;
13
+ }