提交 5c5d8cb0 编写于 作者: D DebugIsFalse

Update ProsePre.global.vue

上级 94ef6534
......@@ -54,10 +54,9 @@ const handleCopy = () => {
}
const codeBlock = ref(null)
const handleRender = () => {
if (props.language) {
const lang = props.language === 'vue' ? 'html' : props.language
const language = props.language || 'html';
const lang = language.startsWith('vue') ? 'html' : language
codeBlock.value = hljs.highlight(lang, props.code, true).value
}
}
watch(()=> props.code, () => {
handleRender();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册