File tree Expand file tree Collapse file tree 1 file changed +39
-9
lines changed Expand file tree Collapse file tree 1 file changed +39
-9
lines changed Original file line number Diff line number Diff line change 5353A Vue.js component that turns a Mermaid string into a diagram.
5454<!-- /DESCRIPTION -->
5555
56- <!-- INSTALL/ -->
57- ## Install
58-
56+ ## Install Via a Package Manager
5957``` bash
6058# npm
6159$ npm install vue-mermaid-string
6260
6361# Yarn
6462$ yarn add vue-mermaid-string
6563```
66- <!-- /INSTALL -->
64+
65+ Add to Local Components:
66+
67+ ``` js
68+ export default {
69+ import VueMermaidString from ' vue-mermaid-string'
70+
71+ components: {
72+ VueMermaidString,
73+ },
74+ }
75+ ```
76+
77+ Or register as global component:
78+
79+ ``` js
80+ import Vue from ' vue'
81+ import VueMermaidString from ' vue-mermaid-string'
82+
83+ Vue .component (' VueMermaidString' , VueMermaidString)
84+ ```
85+
86+ Or register as plugin:
87+
88+ ``` js
89+ import Vue from ' vue'
90+ import VueMermaidString from ' vue-mermaid-string'
91+
92+ Vue .use (VueMermaidString)
93+ ```
94+
95+ ## Install Via CDN
96+
97+ ``` html
98+ <script src =" https://unpkg.com/vue" ></script >
99+ <script src =" https://unpkg.com/mermaid/dist/mermaid.min.js" ></script >
100+ <script src =" https://unpkg.com/vue-mermaid-string" ></script >
101+ ```
67102
68103## Usage
69104
@@ -77,12 +112,7 @@ Usage is simple, you pass a Mermaid string to the component and you get a visual
77112
78113``` js
79114< script>
80- import VueMermaidString from ' vue-mermaid-string'
81-
82115export default {
83- components: {
84- VueMermaidString,
85- },
86116 computed: {
87117 diagram : () => ' graph TD\n A --> B' ,
88118 },
You can’t perform that action at this time.
0 commit comments