feat: bubble组件封装

This commit is contained in:
renxiaodong
2025-08-21 00:24:36 +08:00
parent 6e3158cdb4
commit 64621d9add
17 changed files with 911 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<script lang="tsx">
import { message } from 'ant-design-vue';
import { BubbleList } from 'ant-design-x-vue';
import { message, Avatar } from 'ant-design-vue';
import { BubbleList } from '@/components/xt-chat/bubble';
import type { BubbleListProps } from 'ant-design-x-vue';
import { useRoute } from 'vue-router';
import SenderInput from '../sender-input/index.vue';
@ -28,16 +28,17 @@ export default {
conversationList.value.push({
role: QUESTION_ROLE,
content: searchValue.value,
avatar: () => <Avatar />
});
const tempId = Date.now();
const tempIndex = conversationList.value.length;
conversationList.value.push({
id: tempId,
loading: true,
role: ANSWER_ROLE
role: ANSWER_ROLE,
});
setTimeout(() => {
const content = `> Render as markdown content to show rich text!
Link: [Ant Design X](https://x.ant.design)