如图以下是代码。import Loading from '~/components/Loading.vue';import marked from "marked";import hljs from "highlight.js";// import 'highlight.js/styles/googlecode.css';import 'highlight.js/styles/atom-one-dark.css';marked.setOptions({ renderer: new marked.Renderer(), highlight: function(code) { return hljs.highlightAuto(code).value; }, pedantic: false, gfm: true, tables: true, breaks: false, sanitize: false, smartLists: true, smartypants: false, xhtml: false });article.content = marked(article.content);<div v-html="article.content" ></div>
添加回答
举报
0/150
提交
取消