feat: Markdown编辑/预览组件(基于vditor)

This commit is contained in:
dap
2024-10-15 08:31:39 +08:00
parent 72ae9edd2c
commit c27acef777
5 changed files with 65 additions and 17 deletions

View File

@@ -1,15 +1,24 @@
<script setup lang="ts">
import { ref } from 'vue';
import { MarkdownEditor, Page } from '@vben/common-ui';
import { MarkdownPreviewer, Page } from '@vben/common-ui';
import { Skeleton } from 'ant-design-vue';
import changelog from '../../../../../../CHANGELOG.md?raw';
const content = ref(changelog);
const loading = ref(true);
</script>
<template>
<Page :auto-content-height="true">
<MarkdownEditor id="changelog" v-model:value="content" height="100%" />
<Skeleton v-show="loading" active />
<MarkdownPreviewer
v-model:value="content"
height="100%"
@mounted="loading = false"
/>
</Page>
</template>