no message

Former-commit-id: 9366b08d16244946b67d0120c80418414151e5f1
Former-commit-id: 0118363ddb22225bd5300e3a68c373ef0e37540f
Former-commit-id: aa67632756f77292969803457cb6ef7454df42ae
This commit is contained in:
李杨
2018-02-23 12:22:31 +08:00
parent 7d650de86f
commit 864b56ab79

View File

@@ -7,10 +7,23 @@
<script>
import SimpleMDE from 'simplemde'
export default {
props: {
// 配置参数
config: {
type: Object,
required: false,
default: () => ({})
}
},
data () {
return {
// 编辑器实例
mde: null
mde: null,
// 编辑器默认参数
// 详见 https://github.com/sparksuite/simplemde-markdown-editor#configuration
defaultConfig: {
autoDownloadFontAwesome: false
}
}
},
mounted () {
@@ -24,7 +37,9 @@ export default {
methods: {
// 初始化
init () {
const config = Object.assign({}, this.defaultConfig, this.config)
this.mde = new SimpleMDE({
...config,
element: this.$refs.mde
})
}