perf:format code&&fix typo
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<code>Markdown 我们这里选用了
|
||||
<a href="https://github.com/sparksuite/simplemde-markdown-editor" target="_blank">simplemde-markdown-editor</a> ,简单的用vue封装了一下
|
||||
<a target="_blank" href="https://segmentfault.com/a/1190000009762198#articleHeader14">
|
||||
相关文章 </a>
|
||||
相关文章 </a>
|
||||
</code>
|
||||
<div class="editor-container">
|
||||
<markdown-editor id="contentEditor" ref="contentEditor" v-model="content" :height="300" :zIndex="20"></markdown-editor>
|
||||
@@ -16,26 +16,25 @@
|
||||
<script>
|
||||
import MarkdownEditor from '@/components/MarkdownEditor'
|
||||
|
||||
const content = `
|
||||
**this is test**
|
||||
|
||||
* vue
|
||||
* element
|
||||
* webpack
|
||||
|
||||
## Simplemde
|
||||
`
|
||||
|
||||
export default {
|
||||
name: 'markdown-demo',
|
||||
components: { MarkdownEditor },
|
||||
data() {
|
||||
return {
|
||||
content: '## Simplemde',
|
||||
content: content,
|
||||
html: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cachedViews() {
|
||||
return this.$store.state.app.cachedViews
|
||||
}
|
||||
},
|
||||
// deactivated() {
|
||||
// console.log(this.cachedViews.indexOf(this.$route.name))
|
||||
// if (this.cachedViews.indexOf(this.$route.name) < 0) {
|
||||
// this.$destroy()
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
markdown2Html() {
|
||||
import('showdown').then(showdown => {
|
||||
|
Reference in New Issue
Block a user