Skip to content

Commit 1bcc505

Browse files
committed
fix(site): fix
1 parent c0183a5 commit 1bcc505

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

examples/sites/src/views/components-doc/common.vue

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
<slot name="header-right" />
1010
</template>
1111
</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+
>
1319
<div class="ti-rel cmp-container">
1420
<div class="flex-horizontal docs-content-main">
1521
<div class="docs-tabs-wrap">
@@ -554,7 +560,7 @@ const {
554560
555561
onMounted(() => {
556562
// tiny-robot 通过路由参数存在 mcp-robot, 则弹出对话容器
557-
const hasRobot = router.currentRoute.value.params['mcp-robot']
563+
const hasRobot = router.currentRoute.value.query['mcp-robot'] !== undefined
558564
show.value = !!hasRobot
559565
})
560566
</script>
@@ -566,6 +572,10 @@ onMounted(() => {
566572
margin-top: 16px;
567573
transition: all ease-in-out 0.3s;
568574
575+
&.docs-on-robot-show {
576+
margin-right: 480px;
577+
}
578+
569579
.docs-tabs-wrap {
570580
width: 100%;
571581
flex: 1;
@@ -676,3 +686,58 @@ onMounted(() => {
676686
}
677687
}
678688
</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

Comments
 (0)