Skip to content

Commit 9cdb943

Browse files
committed
feat(docs): add migration guides and enhance theme configuration
- Introduced migration guides for Bubble and Kit components, detailing changes from v0.3.x to v0.4.x. - Updated theme configuration to include a new sidebar item for the migration guide. - Enhanced demo examples with improved styling and updated properties for better user experience. - Refactored demo components to align with the latest API changes and best practices. - Added new CSS variables for consistent styling across components.
1 parent b5dc893 commit 9cdb943

6 files changed

Lines changed: 640 additions & 3 deletions

File tree

docs/.vitepress/themeConfig.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const sharedSidebarItems = [
4545
const nav = [
4646
{ text: '指南', link: '/guide/quick-start', activeMatch: '/guide/' },
4747
{ text: '演示', link: '/examples/assistant', activeMatch: '/examples/' },
48+
{ text: '迁移指南', link: '/migration/bubble-migration', activeMatch: '/migration/' },
4849
]
4950

5051
const sidebar = {
@@ -58,6 +59,16 @@ const sidebar = {
5859
items: [{ text: '综合示例', link: 'assistant' }],
5960
},
6061
],
62+
'/migration/': [
63+
{
64+
text: '迁移指南',
65+
base: '/migration/',
66+
items: [
67+
{ text: 'Bubble 气泡', link: 'bubble-migration' },
68+
{ text: 'Kit 工具集', link: 'kit-migration' },
69+
],
70+
},
71+
],
6172
}
6273

6374
export const themeConfig = { nav, sidebar }

docs/demos/bubble/list-auto-scroll.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
ref="containerRef"
1313
style="height: 300px; border: 1px solid #ddd; border-radius: 4px; overflow-y: auto; padding: 8px"
1414
>
15-
<tr-bubble-list :messages="messages" :role-configs="roles" :auto-scroll="autoScroll"></tr-bubble-list>
15+
<tr-bubble-list
16+
:messages="messages"
17+
:role-configs="roles"
18+
:auto-scroll="autoScroll"
19+
style="max-height: 100%"
20+
></tr-bubble-list>
1621
</div>
1722
</div>
1823
</template>

docs/demos/bubble/list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ const roles: Record<string, BubbleRoleConfig> = {
3131

3232
<style scoped>
3333
:deep([data-role='user']) {
34-
--tr-bubble-content-bg: var(--tr-color-primary-light);
34+
--tr-bubble-box-bg: var(--tr-color-primary-light);
3535
}
3636
</style>

0 commit comments

Comments
 (0)