<template>
    <div
        class="markdown-body"
        v-html="htmlStr"
    />
</template>

<script setup>
import { ref } from 'vue';
import { marked } from 'marked';
import { getMarkdownContent } from '@/utils/tools';

const htmlStr = ref('');

getMarkdownContent('./md/vue3中渲染markdown.md').then((res) => {
    htmlStr.value = marked(res);
});
</script>
