@melt-js/comps-vue2 0.0.0-stage → 2026.11.5

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.
@@ -0,0 +1,650 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ | 从夯到拉排行榜样式
4
+ |
5
+ | 由 https://github.com/dayun-cloud/tools/blob/main/src/ranking.css 抽取而来,
6
+ | 差异:
7
+ | 1. 去掉 body / * 全局重置,改为挂载在 .ranking-board 根节点下,避免污染宿主页面
8
+ | 2. .container 重命名为 .ranking-board-container,防止与宿主同名类冲突
9
+ | 3. 去掉 .footer、.manbo-link 等站点级样式(不属于排行榜组件)
10
+ | 4. 帮助按钮由 fixed 改为 absolute,随组件定位而非贴住浏览器视口
11
+ | 5. 补充 .upload-btn.drag-over、.rb-toast 等交互反馈
12
+ |
13
+ | 使用方式:<style scoped src="./ranking.css">,所有选择器由 vue-loader 追加
14
+ | scope 属性,组件内生效且不影响宿主页面。
15
+ |--------------------------------------------------------------------------
16
+ */
17
+
18
+ .ranking-board,
19
+ .ranking-board * {
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .ranking-board {
24
+ position: relative;
25
+ width: 100%;
26
+ padding: 48px 20px 20px;
27
+ background: #1a1a1a;
28
+ color: #fff;
29
+ font-family: 'Microsoft YaHei', Arial, sans-serif;
30
+ font-size: 14px;
31
+ line-height: 1.5;
32
+ }
33
+
34
+ .ranking-board-container {
35
+ width: 1200px;
36
+ max-width: 100%;
37
+ min-height: 600px;
38
+ margin: 0 auto;
39
+ background: #2d2d2d;
40
+ }
41
+
42
+ .ranking-container {
43
+ display: flex;
44
+ flex-direction: column;
45
+ min-height: 500px;
46
+ }
47
+
48
+ .tier {
49
+ display: flex;
50
+ align-items: stretch;
51
+ min-height: 120px;
52
+ border-bottom: 2px solid #404040;
53
+ transition: all 0.3s ease;
54
+ }
55
+
56
+ .tier.fixed-height {
57
+ height: 130px;
58
+ min-height: 130px;
59
+ max-height: 130px;
60
+ }
61
+
62
+ .tier:hover {
63
+ background-color: #3a3a3a;
64
+ }
65
+
66
+ .tier.drag-over {
67
+ background-color: #404040;
68
+ }
69
+
70
+ .tier-label {
71
+ position: relative;
72
+ z-index: 100;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ width: 150px;
77
+ padding: 0;
78
+ border: none;
79
+ outline: none;
80
+ background: transparent;
81
+ color: white;
82
+ font-size: 1.9em;
83
+ font-weight: 900;
84
+ text-align: center;
85
+ text-shadow:
86
+ -1px -1px 0 #000,
87
+ 1px -1px 0 #000,
88
+ -1px 1px 0 #000,
89
+ 1px 1px 0 #000,
90
+ 0px -1px 0 #000,
91
+ 0px 1px 0 #000,
92
+ -1px 0px 0 #000,
93
+ 1px 0px 0 #000;
94
+ cursor: pointer;
95
+ }
96
+
97
+ .tier-name {
98
+ min-width: 20px;
99
+ font-weight: 900 !important;
100
+ outline: none;
101
+ }
102
+
103
+ .tier-name:focus {
104
+ padding: 0 5px;
105
+ background: rgba(255, 255, 255, 0.2);
106
+ border-radius: 4px;
107
+ }
108
+
109
+ .color-picker {
110
+ position: absolute;
111
+ top: 50%;
112
+ right: -40px;
113
+ z-index: 101;
114
+ width: 30px;
115
+ height: 30px;
116
+ padding: 0;
117
+ border: none;
118
+ border-radius: 50%;
119
+ cursor: pointer;
120
+ opacity: 0;
121
+ pointer-events: none;
122
+ transform: translateY(-50%);
123
+ transition: opacity 0.3s;
124
+ }
125
+
126
+ .tier-label.editing .color-picker {
127
+ opacity: 1;
128
+ pointer-events: auto;
129
+ }
130
+
131
+ .delete-tier-btn {
132
+ position: absolute;
133
+ top: 50%;
134
+ right: -75px;
135
+ z-index: 101;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ width: 32px;
140
+ height: 32px;
141
+ padding: 0;
142
+ border: 2px solid #ff3742;
143
+ border-radius: 50%;
144
+ background: #fff;
145
+ color: #ff3742;
146
+ font-size: 26px;
147
+ font-weight: bold;
148
+ cursor: pointer;
149
+ opacity: 0;
150
+ pointer-events: none;
151
+ transform: translateY(-50%);
152
+ transition: opacity 0.3s ease;
153
+ }
154
+
155
+ .tier-label.editing .delete-tier-btn {
156
+ opacity: 1;
157
+ pointer-events: auto;
158
+ }
159
+
160
+ .help-btn {
161
+ position: absolute;
162
+ top: 16px;
163
+ right: 16px;
164
+ z-index: 1000;
165
+ width: 50px;
166
+ height: 50px;
167
+ padding: 0;
168
+ border: none;
169
+ border-radius: 50%;
170
+ background: #65a6bc;
171
+ color: white;
172
+ font-size: 20px;
173
+ font-weight: bold;
174
+ cursor: pointer;
175
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
176
+ transition: all 0.3s ease;
177
+ }
178
+
179
+ .help-btn:hover {
180
+ background: #7dbece;
181
+ transform: scale(1.1);
182
+ }
183
+
184
+ .help-modal {
185
+ position: fixed;
186
+ top: 0;
187
+ left: 0;
188
+ z-index: 2000;
189
+ display: flex;
190
+ align-items: center;
191
+ justify-content: center;
192
+ width: 100%;
193
+ height: 100%;
194
+ background: rgba(0, 0, 0, 0.8);
195
+ }
196
+
197
+ .help-content {
198
+ position: relative;
199
+ width: 90%;
200
+ max-width: 500px;
201
+ padding: 30px;
202
+ border-radius: 10px;
203
+ background: #2d2d2d;
204
+ color: white;
205
+ }
206
+
207
+ .help-content h2 {
208
+ margin-bottom: 20px;
209
+ color: #7dbece;
210
+ text-align: center;
211
+ }
212
+
213
+ .help-content ul {
214
+ padding: 0;
215
+ list-style: none;
216
+ }
217
+
218
+ .help-content li {
219
+ position: relative;
220
+ margin-bottom: 15px;
221
+ padding-left: 20px;
222
+ }
223
+
224
+ .help-content li:before {
225
+ content: "•";
226
+ position: absolute;
227
+ left: 0;
228
+ color: #7dbece;
229
+ font-weight: bold;
230
+ }
231
+
232
+ .close-help {
233
+ position: absolute;
234
+ top: 10px;
235
+ right: 15px;
236
+ padding: 0;
237
+ border: none;
238
+ background: none;
239
+ color: #999;
240
+ font-size: 24px;
241
+ cursor: pointer;
242
+ }
243
+
244
+ .close-help:hover {
245
+ color: white;
246
+ }
247
+
248
+ .toggle-container {
249
+ display: flex;
250
+ gap: 20px;
251
+ justify-content: center;
252
+ }
253
+
254
+ .toggle-label {
255
+ color: #ccc;
256
+ cursor: pointer;
257
+ }
258
+
259
+ .save-image-container {
260
+ margin: 20px 0;
261
+ text-align: center;
262
+ }
263
+
264
+ .save-image-btn {
265
+ padding: 10px 20px;
266
+ border: 2px solid #666;
267
+ border-radius: 8px;
268
+ background: #444;
269
+ color: #ccc;
270
+ font-size: 14px;
271
+ cursor: pointer;
272
+ transition: all 0.3s ease;
273
+ }
274
+
275
+ .save-image-btn:hover {
276
+ border-color: #007bff;
277
+ background: #555;
278
+ color: #007bff;
279
+ }
280
+
281
+ .add-tier-btn {
282
+ min-width: 120px;
283
+ margin: 5px 0;
284
+ padding: 10px;
285
+ border: 2px dashed #666;
286
+ border-radius: 8px;
287
+ background: #444;
288
+ color: #ccc;
289
+ font-size: 14px;
290
+ text-align: center;
291
+ cursor: pointer;
292
+ transition: all 0.3s;
293
+ }
294
+
295
+ .add-tier-btn:hover {
296
+ border-color: #888;
297
+ background: #555;
298
+ color: #fff;
299
+ }
300
+
301
+ .reset-tier-btn {
302
+ display: inline-block;
303
+ min-width: 120px;
304
+ margin: 5px 0;
305
+ padding: 10px;
306
+ border: 2px solid #c82333;
307
+ border-radius: 8px;
308
+ background: #dc3545;
309
+ color: white;
310
+ font-size: 14px;
311
+ text-align: center;
312
+ cursor: pointer;
313
+ transition: all 0.3s;
314
+ }
315
+
316
+ .reset-tier-btn:hover {
317
+ border-color: #bd2130;
318
+ background: #c82333;
319
+ color: #fff;
320
+ }
321
+
322
+ .button-container {
323
+ display: flex;
324
+ flex-direction: column;
325
+ align-items: center;
326
+ justify-content: center;
327
+ order: 1001;
328
+ margin: 10px 0;
329
+ }
330
+
331
+ /* 重置确认模态框样式 */
332
+ .reset-modal {
333
+ position: fixed;
334
+ top: 0;
335
+ left: 0;
336
+ z-index: 2000;
337
+ display: flex;
338
+ align-items: center;
339
+ justify-content: center;
340
+ width: 100%;
341
+ height: 100%;
342
+ background: rgba(0, 0, 0, 0.8);
343
+ }
344
+
345
+ .reset-content {
346
+ position: relative;
347
+ width: 90%;
348
+ max-width: 400px;
349
+ padding: 30px;
350
+ border-radius: 10px;
351
+ background: #2d2d2d;
352
+ color: white;
353
+ text-align: center;
354
+ }
355
+
356
+ .reset-content h3 {
357
+ margin-bottom: 20px;
358
+ color: #dc3545;
359
+ }
360
+
361
+ .reset-content p {
362
+ margin-bottom: 25px;
363
+ line-height: 1.5;
364
+ }
365
+
366
+ .reset-buttons {
367
+ display: flex;
368
+ gap: 15px;
369
+ justify-content: center;
370
+ }
371
+
372
+ .reset-confirm-btn {
373
+ padding: 10px 20px;
374
+ border: none;
375
+ border-radius: 5px;
376
+ background: #dc3545;
377
+ color: white;
378
+ font-size: 14px;
379
+ cursor: pointer;
380
+ transition: background 0.3s;
381
+ }
382
+
383
+ .reset-confirm-btn:hover {
384
+ background: #c82333;
385
+ }
386
+
387
+ .reset-cancel-btn {
388
+ padding: 10px 20px;
389
+ border: none;
390
+ border-radius: 5px;
391
+ background: #6c757d;
392
+ color: white;
393
+ font-size: 14px;
394
+ cursor: pointer;
395
+ transition: background 0.3s;
396
+ }
397
+
398
+ .reset-cancel-btn:hover {
399
+ background: #5a6268;
400
+ }
401
+
402
+ .tier-content {
403
+ display: flex;
404
+ flex: 1;
405
+ flex-wrap: wrap;
406
+ align-items: center;
407
+ gap: 5px;
408
+ min-height: 130px;
409
+ padding: 5px;
410
+ }
411
+
412
+ .tier.fixed-height .tier-content {
413
+ align-items: flex-start;
414
+ flex-wrap: wrap;
415
+ height: 120px;
416
+ min-height: 120px;
417
+ max-height: 120px;
418
+ /* 去掉上下内边距,避免 120px 的图片被裁掉底部 */
419
+ padding: 0 5px;
420
+ overflow-x: hidden;
421
+ overflow-y: auto;
422
+ scrollbar-color: transparent transparent;
423
+ scrollbar-width: thin;
424
+ transition: scrollbar-color 0.3s ease;
425
+ }
426
+
427
+ .tier.fixed-height .tier-content:hover {
428
+ scrollbar-color: #65a6bc #404040;
429
+ }
430
+
431
+ .tier.fixed-height .tier-content::-webkit-scrollbar {
432
+ width: 6px;
433
+ }
434
+
435
+ .tier.fixed-height .tier-content::-webkit-scrollbar-track {
436
+ border-radius: 3px;
437
+ background: transparent;
438
+ }
439
+
440
+ .tier.fixed-height .tier-content::-webkit-scrollbar-thumb {
441
+ border-radius: 3px;
442
+ background: transparent;
443
+ transition: background 0.3s ease;
444
+ }
445
+
446
+ .tier.fixed-height .tier-content:hover::-webkit-scrollbar-track {
447
+ background: #404040;
448
+ }
449
+
450
+ .tier.fixed-height .tier-content:hover::-webkit-scrollbar-thumb {
451
+ background: #65a6bc;
452
+ }
453
+
454
+ .tier.fixed-height .tier-content:hover::-webkit-scrollbar-thumb:hover {
455
+ background: #7dbece;
456
+ }
457
+
458
+ .upload-btn {
459
+ display: flex;
460
+ align-items: center;
461
+ justify-content: center;
462
+ order: 999;
463
+ width: 120px;
464
+ height: 120px;
465
+ border: 2px dashed #666;
466
+ background: #404040;
467
+ color: #ccc;
468
+ font-size: 3em;
469
+ cursor: pointer;
470
+ transition: all 0.3s ease;
471
+ }
472
+
473
+ .upload-btn:hover {
474
+ border-color: #007bff;
475
+ background: #4a4a4a;
476
+ color: #007bff;
477
+ }
478
+
479
+ .upload-btn.drag-over {
480
+ border-color: #007bff;
481
+ background: #2f3b45;
482
+ color: #007bff;
483
+ }
484
+
485
+ .delete-zone {
486
+ display: flex;
487
+ align-items: center;
488
+ justify-content: center;
489
+ order: 1000;
490
+ width: 120px;
491
+ height: 120px;
492
+ border: 2px dashed #dc3545;
493
+ background: #4a3a3a;
494
+ color: #dc3545;
495
+ font-size: 3em;
496
+ transition: all 0.3s ease;
497
+ }
498
+
499
+ .delete-zone.drag-over {
500
+ background: #dc3545;
501
+ color: white;
502
+ }
503
+
504
+ .image-item {
505
+ position: relative;
506
+ width: 120px;
507
+ height: 120px;
508
+ overflow: hidden;
509
+ cursor: grab;
510
+ user-select: none;
511
+ -webkit-user-drag: none;
512
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
513
+ transition: all 0.3s ease;
514
+ }
515
+
516
+ .image-item.is-pressed {
517
+ opacity: 0.3;
518
+ }
519
+
520
+ .tier.fixed-height .image-item {
521
+ flex-shrink: 0;
522
+ }
523
+
524
+ .tier.fixed-height .image-item.single-row {
525
+ width: 120px;
526
+ height: 120px;
527
+ }
528
+
529
+ .tier.fixed-height .image-item.multi-row {
530
+ width: 70px;
531
+ height: 70px;
532
+ }
533
+
534
+ .tier.fixed-height .image-item.adaptive {
535
+ width: auto;
536
+ height: auto;
537
+ min-width: 70px;
538
+ min-height: 70px;
539
+ max-width: 120px;
540
+ max-height: 120px;
541
+ }
542
+
543
+ .image-item:hover {
544
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
545
+ transform: scale(1.05);
546
+ }
547
+
548
+ .image-item:active {
549
+ cursor: grabbing;
550
+ }
551
+
552
+ .image-item img {
553
+ display: block;
554
+ width: 100%;
555
+ height: 100%;
556
+ object-fit: cover;
557
+ -webkit-user-drag: none;
558
+ user-select: none;
559
+ }
560
+
561
+ .image-name-overlay {
562
+ position: absolute;
563
+ right: 0;
564
+ bottom: 0;
565
+ left: 0;
566
+ z-index: 10;
567
+ overflow: hidden;
568
+ padding: 4px 6px;
569
+ background: rgba(0, 0, 0, 0.5);
570
+ color: white;
571
+ font-size: 12px;
572
+ font-weight: 500;
573
+ text-align: center;
574
+ text-overflow: ellipsis;
575
+ white-space: nowrap;
576
+ transition: all 0.3s ease;
577
+ }
578
+
579
+ .image-item:hover .image-name-overlay {
580
+ background: rgba(0, 0, 0, 0.7);
581
+ }
582
+
583
+ .image-gallery {
584
+ display: flex;
585
+ flex-wrap: wrap;
586
+ justify-content: center;
587
+ gap: 5px;
588
+ padding: 10px 0 5px;
589
+ background: #2d2d2d;
590
+ }
591
+
592
+ .drag-preview {
593
+ position: fixed;
594
+ z-index: 1500;
595
+ width: 120px;
596
+ height: 120px;
597
+ overflow: hidden;
598
+ pointer-events: none;
599
+ opacity: 0.8;
600
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
601
+ transform: rotate(5deg);
602
+ }
603
+
604
+ .drag-preview img {
605
+ width: 100%;
606
+ height: 100%;
607
+ object-fit: cover;
608
+ }
609
+
610
+ .rb-file-input {
611
+ display: none;
612
+ }
613
+
614
+ /* 图片放大模态框样式 */
615
+ .image-modal {
616
+ position: fixed;
617
+ top: 0;
618
+ left: 0;
619
+ z-index: 3000;
620
+ display: flex;
621
+ align-items: flex-start;
622
+ justify-content: center;
623
+ width: 100%;
624
+ height: 100%;
625
+ padding-top: 60px;
626
+ background: transparent;
627
+ cursor: pointer;
628
+ }
629
+
630
+ .image-modal img {
631
+ min-width: 800px;
632
+ min-height: 500px;
633
+ max-width: 800px;
634
+ max-height: 500px;
635
+ object-fit: contain;
636
+ }
637
+
638
+ /* 轻量提示,替代 alert */
639
+ .rb-toast {
640
+ position: fixed;
641
+ bottom: 40px;
642
+ left: 50%;
643
+ z-index: 4000;
644
+ padding: 10px 18px;
645
+ border-radius: 6px;
646
+ background: rgba(0, 0, 0, 0.85);
647
+ color: #fff;
648
+ font-size: 14px;
649
+ transform: translateX(-50%);
650
+ }