1
This commit is contained in:
41
components/Content.vue
Normal file
41
components/Content.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div v-html="data || '暂无'"></div>
|
||||
<!-- <MdPreview v-else :id="id" :modelValue="data" />-->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// import { MdPreview } from 'md-editor-v3';
|
||||
// import 'md-editor-v3/lib/preview.css';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
data?: any;
|
||||
editor?: number;
|
||||
isMobile?: boolean;
|
||||
}>(),
|
||||
{}
|
||||
);
|
||||
|
||||
const id = 'preview-only';
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
overflow: hidden;
|
||||
color: #333131;
|
||||
}
|
||||
.content p{
|
||||
padding: 0;
|
||||
line-height: 2.2rem;
|
||||
//text-indent: 2rem;
|
||||
}
|
||||
.content img{
|
||||
padding: 8px 0;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.content video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user