haochuan9421 / vue-ueditor-wrap

🚴Vue + 🚄UEditor + v-model双向绑定🚀
https://hc199421.gitee.io/vue-ueditor-wrap/
MIT License
1.6k stars 449 forks source link

vue 中使用时首次渲染时需要3秒左右才能显示 多页面使用时 有时会提示Uncaught (in promise) TypeError: Cannot convert undefined or null to object 错误渲染不出来 #189

Open yinxuejing123 opened 5 months ago

yinxuejing123 commented 5 months ago

在Vue页面全局引入注册 <vue-ueditor-wrap v-model="editorContent" :config="editorConfig" :editor-id="editorId" ref="ueditorWrap" class="u-editor" @ready="handleEditorReady"> 封装的组件 editorConfig: { // 访问 UEditor 静态资源的根路径,可参考 https://hc199421.gitee.io/vue-ueditor-wrap/#/faq UEDITOR_HOME_URL: "./../../static/public/UEditor/", // 服务端接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!) serverUrl: "", toolbars: [ [ 'source', '|', 'bold', 'italic', 'underline', 'strikethrough', // 'blockquote', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', '|', 'removeformat', 'formatmatch', 'pasteplain', '|', // 'undo', // 'redo', // '|', 'simpleupload', // 'insertimage', ], ], }, 配置项
<editor :editor-disabled="disabled" @editor-return="editorReturn" :editor-id="editorId" :content="formData.content" :is-show-gallery="false" :gallery-type="2" :dataid="''" v-if="showEditor"> 页面引入