Vue3 版本的 markdown 流式渲染组件。
A Vue 3 markdown rendering component support streaming, built on top of markdown-it
- Emoji, Subscript, Superscript, Footnotes
- Task lists, Definition lists
- KaTeX/LaTeX math
- Mermaid, ECharts, Flowchart diagrams
- Code highlighting with copy button
- Image viewer
- Alert containers:
::: success/info/warning/error - Streaming support for AI chat scenarios
npm install markdown-it-vue3<template>
<MarkdownItVue :content="content" />
</template>
<script setup>
import MarkdownItVue from 'markdown-it-vue3'
import 'markdown-it-vue3/dist/markdown-it-vue3.css'
const content = '# Hello World'
</script><template>
<MarkdownItVueStreaming
:content="streamContent"
:streaming="isStreaming"
@render-complete="onComplete"
/>
</template>
<script setup>
import { ref } from 'vue'
import { MarkdownItVueStreaming } from 'markdown-it-vue3'
import 'markdown-it-vue3/dist/markdown-it-vue3.css'
const streamContent = ref('')
const isStreaming = ref(false)
</script>📖 See example for complete implementation