Files
log-lottery/src/views/Config/Readme/index.vue
ex_zhangwenlei@exiot.cmcc b8e934e4ec fix: readme path
2024-01-20 00:14:59 +08:00

28 lines
490 B
Vue

<script setup lang='ts'>
import {ref,onMounted} from 'vue'
import markdownit from 'markdown-it'
const md = markdownit()
const readmeHtml=ref('')
const readMd=()=>{
fetch('/log-lottery/readme.md')
.then(res=>res.text())
.then(res=>{
readmeHtml.value = md.render(res)
})
}
onMounted(() => {
readMd()
})
</script>
<template>
<div class="mb-10 ml-3">
<div class="markdown-body" v-dompurify-html="readmeHtml"></div>
</div>
</template>
<style scoped>
</style>