提交 3e2c491e 编写于 作者: View Design's avatar View Design

Update mdc.vue

上级 cda6d39c
<template>
<MDC class="prose dark:prose-invert max-w-none" v-if="mdValue" :value="mdValue" tag="article" />
<MDC class="prose dark:prose-invert max-w-none" v-if="content" :value="content" tag="article" />
</template>
<script setup>
const props = defineProps({
content: String
})
const mdValue = ref('')
const parseContentToMarkdown = () => {
mdValue.value = props.content
}
watchDebounced(() => props.content, () => {
parseContentToMarkdown()
}, { debounce: 100, maxWait: 500, immediate: true })
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册