agent-markdown-vue
@agent markdown library
2,973
32
| Install | |
|---|---|
npm install agent-markdown-vue |
|
| Latest Version: | 1.3.0 |
| Vue: | 3 |
| Last Updated: | Jan 26, 2026 |
| Links: | GitHub · npm |
Maintainer: lesliechueng
agent-markdown-vue
基于 markdown-it 的 Vue3 组件,助力开发者快速搭建企业级大模型应用。
特性
- ⚡️ 极致渲染性能:基于 Markdown 文本生成 VNode,实现增量渲染,大文本/图表场景无卡顿
- 🔧 高灵活拓展:覆盖全场景插槽,支持自定义代码块(含 mermaid)、行内/块级交互组件、图片等
- 🛡️ 企业级安全:内置 XSS 防护,支持 sanitize 模式(依赖 dompurify),渲染用户内容更安心
安装
使用任意包管理器安装:
npm install agent-markdown-vue --save-dev
yarn add agent-markdown-vue --save-dev
pnpm add agent-markdown-vue --save-dev
基本用法
组件默认支持所有标准 Markdown 语法渲染,包括 emoji、标题、文本样式、列表、链接、图片、表格、代码块、公式等。
<template>
<AgentMarkdown :content="markdownContent" />
</template>
<script setup lang="ts">
import { AgentMarkdown } from 'agent-markdown-vue';
const markdownContent = `
# Title Example
This is a **bold text** and this is an *italic text*.
- List item 1
- List item 2
`;
Related Packages
vue-markdown-render
A simple, lightweight markdown-it wrapper for Vue written in pure typescript.
5,081,259
138
vue3-markdown-it
An awesome Vue 3 markdown-it wrapper plugin that can even support external plugi...
462,640
250
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.0 | ^3.5.13 | ||
| 1.2.9 | ^3.5.13 | ||
| 1.2.6 | ^3.5.13 | ||
| 1.2.5 | ^3.5.13 | ||
| 1.2.4 | ^3.5.13 | ||
| 1.2.3 | catalog: | ||
| 1.2.2 | catalog: | ||
| 1.2.1 | ^3.5.13 | ||
| 1.2.0 | ^3.5.13 | ||
| 1.1.9 | ^3.5.13 | ||
| 1.1.8 | ^3.5.13 | ||
| 1.1.6 | ^3.5.13 | ||
| 1.1.5 | ^3.5.13 | ||
| 1.1.4 | catalog: | ||
| 1.1.3 | ^3.5.13 | ||
| 1.1.2 | ^3.5.13 | ||
| 1.1.1 | ^3.5.13 | ||
| 1.0.9 | ^3.5.13 | ||
| 1.0.7 | catalog: | ||
| 1.0.6 | catalog: | ||
| 1.0.5 | catalog: | ||
| 1.0.4 | catalog: | ||
| 1.0.3 | catalog: | ||
| 1.0.2 | catalog: | ||
| 1.0.1 | catalog: |