rename quick to util
This commit is contained in:
22
nginx/vue/src/components/util/Markdown.vue
Normal file
22
nginx/vue/src/components/util/Markdown.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import MarkdownIt from "markdown-it";
|
||||
import { katex } from "@mdit/plugin-katex";
|
||||
|
||||
const mdIt = MarkdownIt().use(katex);
|
||||
//.use(wiki);
|
||||
|
||||
const props = defineProps({
|
||||
source: String,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-html="mdIt.render(props.source)"
|
||||
class="flex flex-col items-center"
|
||||
></div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@import "katex/dist/katex.min.css";
|
||||
</style>
|
||||
Reference in New Issue
Block a user