Open haoxl3 opened 6 years ago
在nuxt中引入后,总是说highlightAuto is not a function,highlight.min.js是在markdown.vue中这样引入的: import * as hljs from './js/highlight.min.js'
highlight: function(code) { return hljs.highlightAuto(code).value }
改为:
highlight: function(code) { return self.hljs.highlightAuto(code).value }
这样就好啦!
在nuxt中引入后,总是说highlightAuto is not a function,highlight.min.js是在markdown.vue中这样引入的: import * as hljs from './js/highlight.min.js'