kun 191126 1730

This commit is contained in:
沈学坤
2019-11-26 17:29:35 +08:00
parent 5d70595d17
commit 9d888a5b26
15 changed files with 284 additions and 90 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div id="projectAssessment"></div>
<div ref="projectAssessment"></div>
</template>
<script>
@@ -19,20 +19,39 @@ export default {
created () {},
mounted () {
_this = this
phoneEditor = new E('projectAssessment')
phoneEditor.onchange = function () {
_this.$emit('projectAssessment', this.$txt.html())
phoneEditor = new E(this.$refs.projectAssessment)
phoneEditor.customConfig.onchange = html => {
_this.$emit('projectAssessment', html)
}
phoneEditor.customConfig.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
'backColor', // 背景颜色
// 'link', // 插入链接
// 'list', // 列表
'justify', // 对齐方式
// 'quote', // 引用
// 'emoticon', // 表情
// 'image', // 插入图片
'table', // 表格
// 'video', // 插入视频
// 'code', // 插入代码
'undo', // 撤销
'redo' // 重复
]
phoneEditor.create()
// phoneEditor.$txt.html(this.val)
},
methods: {},
computed: {},
watch: {
projectAssessmentVal (val) {
// console.log(val)
phoneEditor.$txt.html(_this.projectAssessmentVal)
phoneEditor.txt.html(val)
}
}
}