no message

Former-commit-id: 7e01c1356a2ab40ebb0e6ac05088c6c38e2540db
Former-commit-id: 27ed0e01cb981f2bd98d397cf0f09e8dd2956e96
Former-commit-id: dc771cb58b8af0ea02b588038767c1d6c7140989
This commit is contained in:
李杨
2018-02-23 13:14:11 +08:00
parent 864b56ab79
commit 3ec36d209a

View File

@@ -8,6 +8,12 @@
import SimpleMDE from 'simplemde' import SimpleMDE from 'simplemde'
export default { export default {
props: { props: {
// 值
value: {
type: String,
required: false,
default: ''
},
// 配置参数 // 配置参数
config: { config: {
type: Object, type: Object,
@@ -37,9 +43,14 @@ export default {
methods: { methods: {
// 初始化 // 初始化
init () { init () {
// 合并参数
const config = Object.assign({}, this.defaultConfig, this.config) const config = Object.assign({}, this.defaultConfig, this.config)
// 初始化
this.mde = new SimpleMDE({ this.mde = new SimpleMDE({
...config, ...config,
// 初始值
initialValue: this.value,
// 挂载元素
element: this.$refs.mde element: this.$refs.mde
}) })
} }