Commit ca11241a by lichengming

删除了富文本编辑

parent 12d71917
<template>
<div style="margin-top: 5px">
<quill-editor
ref="myTextEditor"
v-model="html"
:options="editorOption"
@change="onEditorChange($event)"></quill-editor>
</div>
</template>
<script>
export default {
props: ['html'],
data() {
return {
content: '',
editorOption: {
// 操作按钮
modules: {
toolbar: [
['bold', 'italic', 'underline'],
[{ header: 1 }, { header: 2 }],
[{ color: [] }],
['image']
]
},
placeholder: '请完善新闻详情'
}
}
},
methods: {
onEditorChange({ editor, html, text }) {
// 富文本编辑器 文本改变时 设置字段值
this.html = html
const data = {
html: this.html,
content: text
}
this.$emit('on-result-change', data)
}
}
}
</script>
<style>
.ql-container {
height: 300px !important;
}
.ql-snow {
border: 1px solid #dddee1 !important;
}
.ql-editor.ql-blank::before {
color: #bbbec4 /* rgba(0,0,0,0.6)*/;
font-style: normal;
}
.ql-toolbar.ql-snow {
border-radius: 5px 5px 0 0 !important;
}
.ql-container.ql-snow {
border-radius: 0 0 5px 5px !important;
border-top: none !important;
}
</style>
......@@ -100,7 +100,6 @@ module.exports = {
{ src: '~/plugins/common.js', ssr: true },
{ src: '~/plugins/drag.js', ssr: true },
{ src: '~/plugins/global.js', ssr: true },
{ src: '~/plugins/editor.js', ssr: false },
{ src: '@/plugins/gallery.js', ssr: false },
{ src: '@/plugins/ieCharts.js', ssr: false },
{ src: '@/plugins/fullcalendar.js', ssr: false }
......
......@@ -44,7 +44,6 @@
"vue-echarts-v3": "^2.0.1",
"vue-full-calendar": "^2.8.1-0",
"vue-gallery-slideshow": "^1.3.1",
"vue-quill-editor": "^3.0.6",
"vue-runtime-helpers": "^1.1.2",
"vxe-table": "^2.9.11",
"vxe-utils": "^1.9.3",
......
import Vue from 'vue'
import quillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default () => {
Vue.use(quillEditor)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment