fix:bug
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<view>
|
||||
<rich-text :nodes="contentHtml"></rich-text>
|
||||
<rich-text :nodes="mdText"></rich-text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MarkdownIt from 'markdown-it';
|
||||
import DOMPurify from 'dompurify'
|
||||
export default {
|
||||
name:"markdown-preview",
|
||||
props: {
|
||||
@@ -29,6 +30,12 @@
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
mdText(){
|
||||
let _endtext = DOMPurify.sanitize(this.contentHtml)
|
||||
return _endtext
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
parseContent(text){
|
||||
if(this.mdObj){
|
||||
|
||||
Reference in New Issue
Block a user