- 博客(6)
- 收藏
- 关注
原创 vue使用ueditor关闭页面后的报“Cannot read property 'lang' of undefined”的解决办法
问题:vue项目中引用ueditor为组件,当编辑过程中突然放弃编辑后退或者关闭组件,浏览器报错:Uncaught TypeError: Cannot read property 'lang' of undefinedat UE.Editor.getLang (ueditor.all.js?6705:7893)at eval (ueditor.all.js?6705:29557)或者类...
2018-12-17 11:46:51
8187
5
转载 vue使用enter键阻止自动提交表单的解决方法
问题:项目中使用了element-ui,在某一个input上绑定了enter的键盘事件,代码如下 <el-form :inline="true"> <el-form-item> <el-input placeholder="请输入您要搜索内容的关键词" v-model="value" @keyup.native.enter="s.
2018-12-11 10:38:42
7161
原创 vue使用prerender-spa-plugin预渲染插件图片多导致build打包后页面异常大的解决方法
问题:build打包的时候会将图片文件转化成base64编码附加在页面中,使得页面异常大解决方法:可以在webpack.base.conf.js下的module下的第53行test: /\.(png|jpe?g|gif|svg)(\?.*)?$/下的limit设置阈值,单位为 k,阈值以下的图片会转化成base64编码打包进页面,以上的图片以链接形式引入,在请求和页面体积中尝试最佳优化...
2018-11-27 20:10:29
2200
原创 vue使用prerender-spa-plugin预渲染插件,生成文件中有大量sourceURL片段的解决方法
问题:使用prerender-spa-plugin预渲染插件时,在渲染出的页面中存在注释掉的“sourceURL”代码片段解决方法:修改“config/index.js”文件中的“productionSourceMap: true”为false即可...
2018-11-27 20:00:50
1263
转载 vue引用ueditor控制台Cannot read property 'scrollTo' of undefined的报错解决方法
问题重现:在引用ueditor的界面正常编辑,滚轮上下滑动均正常,当切换页面之后,鼠标滚轮滑到顶端控制台报错“Cannot read property ‘scrollTo’ of undefined”解决方法:打开 ueditor.all.js大概在17471行的位置修改 else if 中的判断 ‘this.scrollY == 0 &amp;&amp; lastScrollY != ...
2018-11-27 19:43:45
8993
1
原创 vue引用ueditor控制台显示'UE' is not defined的解决方法
将UE.getEditor()更改为window.UE.getEditor()即可原始代码:&lt;script id="content" type="text/plain"&gt;&lt;/script&gt;const _this = thisconst config = {}this.editor = UE.getEditor('content',
2018-11-27 13:56:26
14223
4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人