| | |
| | | <template> |
| | | <div id='quillEditorQiniu'> |
| | | <div id='quillEditorQiniu' v-if="display"> |
| | | <!-- 基于elementUi的上传组件 el-upload begin--> |
| | | <el-upload |
| | | :accept="'image'" |
| | |
| | | class="avatar-uploader"> |
| | | </el-upload> |
| | | <!-- 基于elementUi的上传组件 el-upload end--> |
| | | <quill-editor ref="customQuillEditor" v-model="content" :options="editorOption" class="editor"> |
| | | <quill-editor ref="customQuillEditor" v-model="value" :disabled="disabled" :options="editorOption" class="editor"> |
| | | </quill-editor> |
| | | </div> |
| | | <!-- <template #footer>--> |
| | | <!-- <el-button size="small">确定</el-button>--> |
| | | <!-- <el-button size="small" @click="dialogVisible = false">关闭</el-button>--> |
| | | <!-- </template>--> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | ['clean'] // 清除文本格式 |
| | | ]; |
| | | export default { |
| | | name: 'richText', |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | value: { |
| | | type: String |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | display:{ |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | headers: { |
| | |
| | | }, |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | //上传图片之前async |
| | | beforeEditorUpload(file) { |
| | |
| | | console.log("开始加载") |
| | | // 初始给编辑器设置title |
| | | }, |
| | | watch: { |
| | | content(newVal, oldVal) { |
| | | //this.$emit('input', newVal); |
| | | console.log(newVal) |
| | | console.log(oldVal) |
| | | } |
| | | }, |
| | | watch: {}, |
| | | |
| | | |
| | | } |