开发者

如何解决highlightjs在vue?

开发者 https://www.devze.com 2023-03-21 12:56 出处:网络 作者:运维问答
megcjgm 14小时前 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 na
megcjgm 14小时前

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...)


shenme_2015 14小时前

开发者_JAVA百科

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.


360U3180755915 14小时前

Highlightjs offers a method开发者_C百科 for "Custom Initialization"with hljs.highlightBlock(), which you should warp in a custom directive:


0

精彩评论

暂无评论...
验证码 换一张
取 消