This commit is contained in:
2025-09-08 16:37:47 +08:00
parent a05dde6c52
commit bbbb384e6c

View File

@@ -0,0 +1,35 @@
<script setup lang="ts">
import md from '@/utils/markdown.ts'
import 'highlight.js/styles/github.min.css'
import 'github-markdown-css/github-markdown-light.css'
import { computed } from 'vue'
const props = defineProps<{
message?: string
}>()
const renderMd = computed(() => {
return md.render(props.message ?? '')
})
</script>
<template>
<div v-dompurify-html="renderMd" class="markdown-body md-render-container"></div>
</template>
<style lang="less">
.md-render-container {
.hljs {
overflow: auto;
padding: 1rem;
display: block;
}
//ul {
// padding-left: 16px;
//}
//ol {
// padding-left: 16px;
//}
}
</style>