NextBoy / quill-image-extend-module

vue-quill-editor的增强模块,提供图片上传,复制插入,拖拽插入,支持与其他模块一起使用
706 stars 128 forks source link

quill Overwriting modules/ImageExtend with class ImageExtend警告 #59

Open jikuodong opened 5 years ago

jikuodong commented 5 years ago

在nuxt中,浏览器控制警告quill Overwriting modules/ImageExtend with class ImageExtend

quill Overwriting modules/ImageExtend with class ImageExtend { /**

项目中代码如下: <div v-quill:myQuillEditor="editorOption" ref="myQuillEditor" :content="content" class="quill-editor" @change="onEditorChange($event)" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)" @ready="onEditorReady($event)"/>

// 在Nuxt.js框架中因为是后端渲染,所以为了使用image上传插件,在此处初始化和引入vue-quill-editor和quill-image-extend-module插件 beforeMount() { const VueQuillEditor = require('vue-quill-editor/dist/ssr') const Quill = require('quill') const { ImageExtend, QuillWatch, container } = require('quill-image-extend-module') this.editorOption = { bounds: 'app', placeholder: '想写啥你就写啥,我又不知道你要写啥.....', modules: { ImageExtend: { loading: true, name: 'img', // 后端接收的文件名称 action: this.serverUr1, // 后端接收文件api response: res => { return res.data } }, toolbar: { handlers: { image: function() { QuillWatch.emit(this.quill.id) } }, container: container } } } Quill.register('modules/ImageExtend', ImageExtend) Vue.use(VueQuillEditor) },