File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,7 @@ export default tester(
5959 } ,
6060 } ,
6161 [
62- testerPluginComponent ( {
63- componentPath : require . resolve ( './index.vue' ) ,
64- pluginMode : 'client' ,
65- } ) ,
62+ testerPluginComponent ( { componentPath : require . resolve ( './index.vue' ) } ) ,
6663 testerPluginPuppeteer ( ) ,
6764 ]
6865)
Original file line number Diff line number Diff line change 11<script >
2- import mermaid from ' mermaid'
3-
42export default {
53 mounted () {
6- mermaid .parseError = error => {
7- console .log (' this is a parse error' )
8- this .$emit (' parse-error' , error)
4+ if (typeof window !== ' undefined' ) {
5+ const mermaid = require (' mermaid' )
6+ mermaid .parseError = error => this .$emit (' parse-error' , error)
7+ mermaid .initialize ({
8+ securityLevel: ' loose' ,
9+ startOnLoad: false ,
10+ theme: ' default' ,
11+ })
12+ mermaid .init (this .value , this .$el )
913 }
10- mermaid .initialize ({
11- securityLevel: ' loose' ,
12- startOnLoad: false ,
13- theme: ' default' ,
14- })
15- mermaid .init (this .value , this .$el )
1614 },
1715 name: ' VueMermaidComponent' ,
1816 props: {
You can’t perform that action at this time.
0 commit comments