feat: 测试markdown
This commit is contained in:
@@ -22,6 +22,7 @@ import { useUserStore } from '@/stores/modules/user';
|
||||
import { getUserProfilePicture, systemProfilePicture } from '@/utils/user.ts';
|
||||
import '@/styles/github-markdown.css';
|
||||
import '@/styles/yixin-markdown.scss';
|
||||
import YMarkdown from '@/vue-element-plus-y/components/XMarkdown/index.vue';
|
||||
|
||||
type MessageItem = BubbleProps & {
|
||||
key: number;
|
||||
@@ -316,7 +317,7 @@ function copy(item: any) {
|
||||
<!-- 自定义气泡内容 -->
|
||||
<template #content="{ item }">
|
||||
<!-- chat 内容走 markdown -->
|
||||
<XMarkdown v-if="item.content && (item.role === 'assistant' || item.role === 'system')" class="markdown-body" :markdown="item.content" :themes="{ light: 'github-light', dark: 'github-dark' }" default-theme-mode="dark" />
|
||||
<YMarkdown v-if="item.content && (item.role === 'assistant' || item.role === 'system')" class="markdown-body" :markdown="item.content" :themes="{ light: 'github-light', dark: 'github-dark' }" default-theme-mode="dark" />
|
||||
<!-- user 内容 纯文本 -->
|
||||
<div v-if="item.content && item.role === 'user'" class="user-content">
|
||||
{{ item.content }}
|
||||
|
||||
Reference in New Issue
Block a user