22 <a-modal
33 v-model:visible =" visible"
44 title =" 数据备份还原"
5- width =" 600px "
5+ width =" 520px "
66 :footer =" false"
77 @cancel =" handleCancel"
88 >
2626 <div class =" stat-value" >{{ stats.watchHistory }}</div >
2727 <div class =" stat-label" >观看记录</div >
2828 </div >
29+ <div class =" stat-item" >
30+ <div class =" stat-value" >{{ stats.parsers }}</div >
31+ <div class =" stat-label" >解析器</div >
32+ </div >
2933 <div class =" stat-item" >
3034 <div class =" stat-value" >{{ stats.sites }}</div >
3135 <div class =" stat-label" >站点</div >
4448 </h3 >
4549 <div class =" operation-content" >
4650 <p class =" operation-desc" >
47- 将当前所有设置、收藏、历史记录等数据导出为JSON文件
51+ 将当前所有设置、收藏、历史记录、解析器等数据导出为JSON文件
4852 </p >
4953 <a-button
5054 type =" primary"
6872 </h3 >
6973 <div class =" operation-content" >
7074 <p class =" operation-desc" >
71- 选择之前导出的备份文件来还原数据
75+ 选择之前导出的备份文件来还原设置、收藏、历史记录、解析器等数据
7276 </p >
7377 <div class =" restore-actions" >
7478 <a-upload
@@ -188,6 +192,7 @@ const stats = ref({
188192 favorites: 0 ,
189193 watchHistory: 0 ,
190194 sites: 0 ,
195+ parsers: 0 ,
191196 totalSize: 0
192197})
193198
@@ -308,7 +313,7 @@ const handleRemoveFile = (file) => {
308313 selectedFile .value = null
309314 fileList .value = []
310315
311- // 重置 Upload 组件
316+ // 清空 Upload 组件的文件列表
312317 if (uploadRef .value ) {
313318 uploadRef .value .clearFiles ()
314319 }
@@ -383,7 +388,7 @@ onMounted(() => {
383388
384389<style scoped>
385390.backup-restore-container {
386- padding : 8 px 0 ;
391+ padding : 4 px 0 ; /* 进一步减少容器内边距 */
387392}
388393
389394.section-title {
@@ -392,118 +397,124 @@ onMounted(() => {
392397 font-size : 16px ;
393398 font-weight : 600 ;
394399 color : var (--color-text-1 );
395- margin-bottom : 16 px ;
400+ margin-bottom : 8 px ;
396401}
397402
398403.title-icon {
399- margin-right : 8 px ;
404+ margin-right : 6 px ;
400405 color : var (--color-primary );
401406}
402407
403408.stats-section {
404- margin-bottom : 32 px ;
409+ margin-bottom : 16 px ;
405410}
406411
407412.stats-grid {
408413 display : grid ;
409- grid-template-columns : repeat (4 , 1fr );
410- gap : 16 px ;
411- margin-bottom : 12 px ;
414+ grid-template-columns : repeat (5 , 1fr );
415+ gap : 8 px ;
416+ margin-bottom : 8 px ;
412417}
413418
414419.stat-item {
415420 text-align : center ;
416- padding : 16 px ;
421+ padding : 8 px 4 px ;
417422 background : var (--color-bg-2 );
418- border-radius : 8 px ;
423+ border-radius : 6 px ;
419424 border : 1px solid var (--color-border-2 );
420425}
421426
422427.stat-value {
423- font-size : 24 px ;
428+ font-size : 18 px ;
424429 font-weight : 600 ;
425430 color : var (--color-primary );
426- margin-bottom : 4px ;
431+ margin-bottom : 2px ;
432+ line-height : 1.2 ;
427433}
428434
429435.stat-label {
430- font-size : 12 px ;
436+ font-size : 11 px ;
431437 color : var (--color-text-3 );
438+ line-height : 1.2 ;
432439}
433440
434441.data-size {
435442 text-align : center ;
436- font-size : 14 px ;
443+ font-size : 12 px ;
437444 color : var (--color-text-2 );
438- padding : 8 px ;
445+ padding : 6 px ;
439446 background : var (--color-bg-1 );
440- border-radius : 6px ;
447+ border-radius : 4px ;
448+ line-height : 1.2 ;
441449}
442450
443451.operation-section {
444- margin-bottom : 32 px ;
452+ margin-bottom : 16 px ;
445453}
446454
447455.operation-content {
448456 background : var (--color-bg-1 );
449- padding : 20 px ;
450- border-radius : 12 px ;
457+ padding : 12 px ;
458+ border-radius : 8 px ;
451459 border : 1px solid var (--color-border-2 );
452460}
453461
454462.operation-desc {
455- margin-bottom : 16 px ;
463+ margin-bottom : 10 px ;
456464 color : var (--color-text-2 );
457- line-height : 1.5 ;
465+ line-height : 1.3 ;
466+ font-size : 13px ;
458467}
459468
460469.restore-actions {
461470 display : flex ;
462471 flex-direction : column ;
463- gap : 12 px ;
464- margin-bottom : 16 px ;
472+ gap : 8 px ;
473+ margin-bottom : 10 px ;
465474 align-items : flex-start ;
466475}
467476
468477.selected-file {
469478 display : flex ;
470479 align-items : center ;
471- padding : 12 px ;
480+ padding : 8 px ;
472481 background : var (--color-bg-2 );
473- border-radius : 8 px ;
482+ border-radius : 6 px ;
474483 border : 1px solid var (--color-border-2 );
475484}
476485
477486.file-icon {
478- margin-right : 8 px ;
487+ margin-right : 6 px ;
479488 color : var (--color-primary );
480489}
481490
482491.file-name {
483492 flex : 1 ;
484- font-size : 14 px ;
493+ font-size : 13 px ;
485494 color : var (--color-text-1 );
486495 word-break : break-all ;
496+ line-height : 1.3 ;
487497}
488498
489499.warning-section {
490- margin-top : 24 px ;
500+ margin-top : 12 px ;
491501}
492502
493503.warning-list {
494- margin : 8 px 0 0 0 ;
495- padding-left : 20 px ;
504+ margin : 4 px 0 0 0 ;
505+ padding-left : 16 px ;
496506}
497507
498508.warning-list li {
499- margin-bottom : 4 px ;
509+ margin-bottom : 2 px ;
500510 color : var (--color-text-2 );
501- font-size : 14px ;
511+ font-size : 12px ;
512+ line-height : 1.3 ;
502513}
503514
504515/* 自定义文件列表样式 */
505516.custom-file-list {
506- margin-top : 12 px ;
517+ margin-top : 8 px ;
507518}
508519
509520/* 强制隐藏 Upload 组件内部的文件列表 */
@@ -519,46 +530,47 @@ onMounted(() => {
519530 display : flex ;
520531 align-items : center ;
521532 justify-content : space-between ;
522- padding : 12 px 16 px ;
533+ padding : 8 px 12 px ;
523534 background : var (--color-fill-2 );
524- border-radius : 6 px ;
525- margin-top : 8 px ;
526- min-height : 48 px ;
535+ border-radius : 4 px ;
536+ margin-top : 6 px ;
537+ min-height : 36 px ;
527538}
528539
529540.file-info {
530541 display : flex ;
531542 align-items : center ;
532543 flex : 1 ;
533- min-height : 24 px ;
544+ min-height : 20 px ;
534545}
535546
536547.file-icon {
537- margin-right : 8 px ;
548+ margin-right : 6 px ;
538549 color : var (--color-text-3 );
539- font-size : 16 px ;
550+ font-size : 14 px ;
540551}
541552
542553.file-name {
543554 color : var (--color-text-1 );
544555 font-weight : 500 ;
545- margin-right : 8px ;
546- line-height : 1.4 ;
556+ margin-right : 6px ;
557+ line-height : 1.3 ;
558+ font-size : 13px ;
547559}
548560
549561.file-size {
550562 color : var (--color-text-3 );
551- font-size : 12 px ;
552- line-height : 1.4 ;
563+ font-size : 11 px ;
564+ line-height : 1.3 ;
553565}
554566
555567.remove-btn {
556568 color : var (--color-text-3 );
557569 display : flex ;
558570 align-items : center ;
559571 justify-content : center ;
560- min-width : 24 px ;
561- min-height : 24 px ;
572+ min-width : 20 px ;
573+ min-height : 20 px ;
562574}
563575
564576.remove-btn :hover {
@@ -568,13 +580,13 @@ onMounted(() => {
568580/* 响应式设计 */
569581@media (max-width : 768px ) {
570582 .stats-grid {
571- grid-template-columns : repeat (2 , 1fr );
583+ grid-template-columns : repeat (3 , 1fr );
572584 }
573585}
574586
575587@media (max-width : 480px ) {
576588 .stats-grid {
577- grid-template-columns : 1fr ;
589+ grid-template-columns : repeat ( 2 , 1fr ) ;
578590 }
579591}
580592 </style >
0 commit comments