D2Admin 1.7

Former-commit-id: 3010ce31114fdc121006451c72f9e18306239fd2
This commit is contained in:
liyang
2019-05-07 09:26:18 +08:00
parent 46bc6ca451
commit d07d15ed8c
952 changed files with 171232 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
<template>
<vue-ueditor-wrap
ref="ueditor"
v-model="currentValue"
:config="config"
:destroy="true"
:init="init"/>
</template>
<script>
// 参考 https://github.com/HaoChuan9421/vue-ueditor-wrap
import config from './ueditor.config'
import buttonD2admin from './button/d2admin'
export default {
props: {
value: {
type: String,
default: ''
}
},
data () {
return {
config,
currentValue: ''
}
},
watch: {
// 对外提供 v-model
value: {
handler (val) {
if (this.currentValue !== val) {
this.currentValue = val
}
},
immediate: true
},
// 对外提供 v-model
currentValue (val) {
this.$emit('input', val)
}
},
methods: {
init () {
// 注册一个测试按钮
this.$refs.ueditor.registerButton(buttonD2admin)
}
}
}
</script>