9
9
<slot name =" header-right" />
10
10
</template >
11
11
</ComponentHeader >
12
- <div class =" docs-content" id =" doc-layout-scroller" ref =" scrollRef" @scroll =" onDocLayoutScroll" >
12
+ <div
13
+ class =" docs-content"
14
+ :class =" { 'docs-on-robot-show': show }"
15
+ id =" doc-layout-scroller"
16
+ ref =" scrollRef"
17
+ @scroll =" onDocLayoutScroll"
18
+ >
13
19
<div class =" ti-rel cmp-container" >
14
20
<div class =" flex-horizontal docs-content-main" >
15
21
<div class =" docs-tabs-wrap" >
@@ -554,7 +560,7 @@ const {
554
560
555
561
onMounted (() => {
556
562
// tiny-robot 通过路由参数存在 mcp-robot, 则弹出对话容器
557
- const hasRobot = router .currentRoute .value .params [' mcp-robot' ]
563
+ const hasRobot = router .currentRoute .value .query [' mcp-robot' ] !== undefined
558
564
show .value = !! hasRobot
559
565
})
560
566
</script >
@@ -566,6 +572,10 @@ onMounted(() => {
566
572
margin-top : 16px ;
567
573
transition : all ease-in-out 0.3s ;
568
574
575
+ & .docs-on-robot-show {
576
+ margin-right : 480px ;
577
+ }
578
+
569
579
.docs-tabs-wrap {
570
580
width : 100% ;
571
581
flex : 1 ;
@@ -676,3 +686,58 @@ onMounted(() => {
676
686
}
677
687
}
678
688
</style >
689
+
690
+ // mcp-robot的样式
691
+ <style scoped lang="less">
692
+ .chat-input {
693
+ margin-top : 8px ;
694
+ padding : 10px 15px ;
695
+ }
696
+
697
+ .tiny-container {
698
+ top : 64px ;
699
+
700
+ container- type: inline- size;
701
+
702
+ :deep(.tr-welcome__title-wrapper ) {
703
+ display : flex ;
704
+ align-items : center ;
705
+ justify-content : center ;
706
+ }
707
+ }
708
+
709
+ .welcome-footer {
710
+ margin-top : 12px ;
711
+ color : rgb (128 , 128 , 128 );
712
+ font-size : 12px ;
713
+ line-height : 20px ;
714
+ }
715
+
716
+ .tiny-prompts {
717
+ padding : 16px 24px ;
718
+
719
+ :deep(.prompt-item ) {
720
+ width : 100% ;
721
+ box-sizing : border-box ;
722
+
723
+ @container (width >= 64rem ) {
724
+ width : calc (50% - 8px );
725
+ }
726
+
727
+ .tr-prompt__content-label {
728
+ font-size : 14px ;
729
+ line-height : 24px ;
730
+ }
731
+ }
732
+ }
733
+
734
+ .tr-history-demo {
735
+ position : absolute ;
736
+ right : 100% ;
737
+ top : 100% ;
738
+ z-index : 100 ;
739
+ width : 300px ;
740
+ height : 600px ;
741
+ box-shadow : 0 4px 20px rgba (0 , 0 , 0 , 0.04 );
742
+ }
743
+ </style >
0 commit comments