vue3中展示markdown格式文章的三种形式

2025年06月14日/ 浏览 2

1. 使用v-html指令

v-html

示例代码

“`vue

“`

2. 使用marked

markedmarked:

bash
npm install marked

然后,在Vue组件中引入并使用它:

示例代码

“`vue

“`

3. 使用iframe嵌入GitHub Gist或其它预览器

示例代码
“`vue

Zhizun,lnc.All Rights Reserved. 版权所有:广州智尊网络科技有限公司 粤ICP备2025387642号

picture loss