inleft
2022-02-28 9c695b19fc896c497c20bda6089f824c1705836c
commit | author | age
9c695b 1 <template>
I 2     <div class="myModal">
3         <a-modal v-model="visible" title="编辑预览" on-ok="handleOk" width="90%" :footer="null"
4             :bodyStyle="{'overflow':'overlay','width': '100%','height': '100%'}">
5             <div style="display: flex;">
6                 <a-textarea style="height: 750px;min-width: 50%" v-model="text" :rows="4" />
7                 <div class="markdown-body article-detail" style="min-width: 50%;">
8                     <vue-markdown  :source="text"></vue-markdown>
9                 </div>
10             </div>
11         </a-modal>
12     </div>
13
14 </template>
15
16 <script>
17     import VueMarkdown from 'vue-markdown'
18
19     import md5 from 'js-md5';
20     export default {
21         components: {
22             VueMarkdown
23         },
24         data() {
25             return {
26                 visible: false,
27                 text: "### 长安古意   \r* 十里平湖霜满天 \r* 寸寸青丝愁华年 \r* 对月形单望相护 \r* 只羡鸳鸯不羡仙 ",
28             }
29         },
30         methods: {
31             getCalendarContainer(trigger) {
32                 return this.$refs.myModal;
33             },
34             showModal() {
35                 this.visible = true;
36             },
37             handleOk(e) {
38                 console.log(111);
39             },
40
41             handleCancel(e) {
42                 this.visible = false;
43             },
44
45         },
46     }
47 </script>
48
49 <style>
50 </style>