摘要:
百度编辑器 用node.js 做服务端 demo 大神已整理的 记录一下 以作参考 https://github.com/netpi/ueditor 1. 前端图片工具栏上传input file在这里: 搜索 ueditor.all.js文件里的 UE.plugin.register('simple 阅读全文
摘要:
1、对于普通数组(数组元素为数字或者字符串) var _testCopy = [1,2,3].concat();//拷贝数组(浅拷贝) 2、对于对象数组 (深拷贝) //形如var _objArr=[{"name":''weifeng"},{"name":"boy"}] var _testCopy 阅读全文
摘要:
vue-cli 的webpack中已配置了less,但 package.json 中没有选项,为了方便开发中使用,需安装一下: 安装方式一: 安装less和less-loader,并记录到devDependencies中,因为这是我们在开发中使用的而非在生产中使用 安装方式二: 或直接在 packa 阅读全文
摘要:
粘贴html的table表格会有间隔大,黑色边线,可以在: ueditor.all.js 里 找到以下处,修改里面的样式即可 . 阅读全文
摘要:
百度编辑器很强,但有时候复制到html里时,会带有 body html head 等标签,切到视图时,内容都不见了 是因为白名单 解决办法: 我测的是1.4.3版本 在 ueditor.config.js 找到白名单 : ,whitList: { body: [], html: [], //...把 阅读全文
摘要:
Date.prototype.format = function(format) { var date = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": th... 阅读全文
摘要:
实现点击 用纯 js(非jquery) 下载文件到本地 自己尝试,加网上找了好久未果,如: window.open(url) location.href=url form表单提交 iframe 体验和浏览器兼容都不完美 还是博客园一兄弟给了方法,非常感谢! 阅读全文
摘要:
getBoundingClientRect用于获取某个元素相对于视窗的位置集合。集合中有top, right, bottom, left等属性。 1.语法:这个方法没有参数。 阅读全文
摘要:
前端在做 input file 美化的时候,通常 把 input 定位position 到 已美化的按钮最上方 opacity: 0 HTML5时代,已有更方便的方法,点击美化按钮直接触发选择文件事件 我这ref 是VUE里的,理解为id吧,不用VUE的话,直接 id=‘inputFile’ 是一样 阅读全文
摘要:
工作中经常会使用到,这里记录一下 判断数组是否为空: let arr = []; arr.length == 0; //true var aa = ['','','',''] aa.join('') '';//true 对象转数组: let obj = {1: 'a', 2: 'b', 3:'c'} 阅读全文