22 <a-modal
33 v-model:visible =" modalVisible"
44 title =" 搜索设置"
5- :width =" 600 "
5+ :width =" 800 "
66 :mask-closable =" false"
77 @ok =" handleConfirm"
88 @cancel =" handleCancel"
99 >
1010 <div class =" search-settings" >
1111 <div class =" settings-header" >
12- <h4 >选择搜索源</h4 >
13- <p class =" settings-desc" >选择要参与聚合搜索的数据源</p >
12+ <div class =" header-left" >
13+ <h4 >选择搜索源</h4 >
14+ <p class =" settings-desc" >选择要参与聚合搜索的数据源</p >
15+ </div >
16+ <div class =" header-right" >
17+ <div class =" search-tip" >
18+ <icon-info-circle class =" tip-icon" />
19+ <span class =" tip-text" >只有 searchable 属性不为 0 的源才支持搜索功能</span >
20+ </div >
21+ </div >
1422 </div >
1523
1624 <div class =" sources-section" >
113121 </div >
114122 </div >
115123
116- <div class =" settings-footer" >
117- <div class =" footer-info" >
118- <icon-info-circle class =" info-icon" />
119- <span class =" info-text" >
120- 只有 searchable 属性不为 0 的源才支持搜索功能
121- </span >
122- </div >
123- </div >
124+
124125 </div >
125126
126127 <template #footer >
@@ -382,10 +383,17 @@ export default defineComponent({
382383}
383384
384385.settings-header {
385- margin-bottom : 24px ;
386+ margin-bottom : 16px ;
387+ display : flex ;
388+ align-items : flex-start ;
389+ justify-content : space-between ;
390+ }
391+
392+ .header-left {
393+ flex : 1 ;
386394}
387395
388- .settings- header h4 {
396+ .header-left h4 {
389397 margin : 0 0 8px 0 ;
390398 font-size : 16px ;
391399 font-weight : 600 ;
@@ -399,8 +407,36 @@ export default defineComponent({
399407 line-height : 1.5 ;
400408}
401409
410+ .header-right {
411+ flex-shrink : 0 ;
412+ margin-left : 24px ;
413+ }
414+
415+ .search-tip {
416+ display : flex ;
417+ align-items : center ;
418+ gap : 6px ;
419+ padding : 8px 12px ;
420+ background : var (--color-fill-1 );
421+ border-radius : 6px ;
422+ border : 1px solid var (--color-border-2 );
423+ }
424+
425+ .tip-icon {
426+ font-size : 14px ;
427+ color : var (--color-primary-6 );
428+ flex-shrink : 0 ;
429+ }
430+
431+ .tip-text {
432+ font-size : 12px ;
433+ color : var (--color-text-2 );
434+ line-height : 1.4 ;
435+ white-space : nowrap ;
436+ }
437+
402438.sources-section {
403- margin-bottom : 24 px ;
439+ margin-bottom : 12 px ;
404440}
405441
406442.section-header {
@@ -441,20 +477,32 @@ export default defineComponent({
441477}
442478
443479.sources-list {
444- max-height : 400 px ;
480+ max-height : 480 px ;
445481 overflow-y : auto ;
446482 border : 1px solid var (--color-border-2 );
447483 border-radius : 6px ;
448484 background : var (--color-bg-1 );
485+ display : grid ;
486+ grid-template-columns : 1fr 1fr ;
487+ gap : 0 ;
449488}
450489
451490.source-item {
452- padding : 16 px ;
491+ padding : 12 px ;
453492 border-bottom : 1px solid var (--color-border-2 );
493+ border-right : 1px solid var (--color-border-2 );
454494 transition : background-color 0.2s ease ;
455495}
456496
457- .source-item :last-child {
497+ .source-item :nth-child (odd ) {
498+ border-right : 1px solid var (--color-border-2 );
499+ }
500+
501+ .source-item :nth-child (even ) {
502+ border-right : none ;
503+ }
504+
505+ .source-item :nth-last-child (-n+2 ) {
458506 border-bottom : none ;
459507}
460508
@@ -479,32 +527,38 @@ export default defineComponent({
479527 display : flex ;
480528 align-items : center ;
481529 justify-content : space-between ;
482- margin-bottom : 8 px ;
530+ margin-bottom : 6 px ;
483531}
484532
485533.source-name {
486- font-size : 14 px ;
534+ font-size : 13 px ;
487535 font-weight : 500 ;
488536 color : var (--color-text-1 );
537+ flex : 1 ;
538+ margin-right : 8px ;
539+ overflow : hidden ;
540+ text-overflow : ellipsis ;
541+ white-space : nowrap ;
489542}
490543
491544.source-tags {
492545 display : flex ;
493- gap : 6px ;
546+ gap : 4px ;
547+ flex-shrink : 0 ;
494548}
495549
496550.source-meta {
497551 display : flex ;
498- gap : 12 px ;
552+ gap : 8 px ;
499553 flex-wrap : wrap ;
500554}
501555
502556.meta-item {
503- font-size : 12 px ;
557+ font-size : 11 px ;
504558 color : var (--color-text-3 );
505559 background : var (--color-fill-2 );
506- padding : 2 px 8 px ;
507- border-radius : 4 px ;
560+ padding : 1 px 6 px ;
561+ border-radius : 3 px ;
508562}
509563
510564.empty-sources {
@@ -533,31 +587,7 @@ export default defineComponent({
533587 color : var (--color-text-4 );
534588}
535589
536- .settings-footer {
537- padding-top : 16px ;
538- border-top : 1px solid var (--color-border-2 );
539- }
540-
541- .footer-info {
542- display : flex ;
543- align-items : center ;
544- gap : 8px ;
545- padding : 12px 16px ;
546- background : var (--color-fill-1 );
547- border-radius : 6px ;
548- }
549590
550- .info-icon {
551- font-size : 16px ;
552- color : var (--color-primary-6 );
553- flex-shrink : 0 ;
554- }
555-
556- .info-text {
557- font-size : 13px ;
558- color : var (--color-text-2 );
559- line-height : 1.4 ;
560- }
561591
562592.modal-footer {
563593 display : flex ;
0 commit comments