如何解决highlightjs在vue
生活随笔
收集整理的這篇文章主要介紹了
如何解决highlightjs在vue
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
So, simply add v-highlightjs to each tag that is supposed to be highlighted. That will re-highlight those tags each time Vue inserts them into the DOM (router navigation to another component etc...)
you should not use that global init function, as it is intended to highlight all pre tags on page load, and is meant to be used on static pages.
Highlightjs offers a method for "Custom Initialization"with hljs.highlightBlock(), which you should warp in a custom directive:
you should not use that global init function, as it is intended to highlight all pre tags on page load, and is meant to be used on static pages.
Highlightjs offers a method for "Custom Initialization"with hljs.highlightBlock(), which you should warp in a custom directive:
總結(jié)
以上是生活随笔為你收集整理的如何解决highlightjs在vue的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 本命年送什么礼物好 男士兔年(老人本命年
- 下一篇: 九华山门票多少钱一张