/vue-mermaid-render

🧜‍♀️ Vue 3 component to render diagrams with Mermaid. 用于渲染 mermaid 的 Vue 3 组件。

Primary LanguageVueMIT LicenseMIT

vue-mermaid-render

npm downloads

Vue 3 component to render diagrams with Mermaid.

Install

$ npm install vue-mermaid-render

Use

<script setup lang="ts">
import { VueMermaidRender } from 'vue-mermaid-render'

const content = `
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
`
</script>

<template>
  <VueMermaidRender :content="content" />
</template>

Props

  • content: string diagram content string
  • config: MermaidConfig mermaid config

Related

mermaid