From a71b6416b467cd3b2ec24efd68accc85223e8a3b Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Tue, 01 Mar 2022 01:09:04 +0800 Subject: [PATCH] 预览调整 --- src/components/group/MyPreviewModal.vue | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/src/components/group/MyPreviewModal.vue b/src/components/group/MyPreviewModal.vue new file mode 100644 index 0000000..92ef70d --- /dev/null +++ b/src/components/group/MyPreviewModal.vue @@ -0,0 +1,46 @@ +<template> + <div class="myModal"> + <a-modal v-model="visible" title="编辑预览" width="60%" :footer="null" + :bodyStyle="{'overflow':'overlay','width': '100%','height': '100%'}"> + <div style="display: flex;"> + <a-textarea style="height: 750px;min-width: 50%" v-model="text" /> + <div class="markdown-body article-detail" style="min-width: 50%;border: 1px solid #d9d9d9;"> + <vue-markdown :source="text"></vue-markdown> + </div> + </div> + </a-modal> + </div> + +</template> + +<script> + import VueMarkdown from 'vue-markdown' + + import md5 from 'js-md5'; + export default { + components: { + VueMarkdown + }, + data() { + return { + visible: false, + text: "### 十里平湖 \r> ##### (卢照邻) \r> 化自《长安古意》 \r* 十里平湖霜满天 \r* 寸寸青丝愁华年 \r* 对月形单望相护 \r* 只羡鸳鸯不羡仙 \r![](http://blog.inleft.com/photo/example.jpg)", + } + }, + methods: { + getCalendarContainer(trigger) { + return this.$refs.myModal; + }, + showModal() { + this.visible = true; + }, + handleCancel(e) { + this.visible = false; + }, + + }, + } +</script> + +<style> +</style> -- Gitblit v1.9.1