博客园 - 雷明nice
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=52315
2021-01-08T03:14:23Z
雷明nice
https://www.cnblogs.com/lanleiming/
feed.cnblogs.com
https://www.cnblogs.com/lanleiming/p/14250497.html
JS验证是否为URL - 雷明nice
网上很多的方法都不正确!! 1 function isUrl(str) { 2 var v = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[0
2021-01-08T03:14:00Z
2021-01-08T03:14:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】网上很多的方法都不正确!! 1 function isUrl(str) { 2 var v = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[0 <a href="https://www.cnblogs.com/lanleiming/p/14250497.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/13256099.html
vue中watch高级用法(deep和immediate) - 雷明nice
一、handler方法和immdiate属性 watch默认绑定,页面首次加载时,是不会执行的。只有值发生改变才会执行。 如果想立即执行怎么办? 1 watch:{ 2 name:{ 3 handler(newName,oldName){ 4 //执行代码 5 }, 6 immediate:true
2020-07-06T09:55:00Z
2020-07-06T09:55:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、handler方法和immdiate属性 watch默认绑定,页面首次加载时,是不会执行的。只有值发生改变才会执行。 如果想立即执行怎么办? 1 watch:{ 2 name:{ 3 handler(newName,oldName){ 4 //执行代码 5 }, 6 immediate:true <a href="https://www.cnblogs.com/lanleiming/p/13256099.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/13178214.html
博客皮肤 - 雷明nice
博客皮肤教程:https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v1.1/#/ 感谢作者。
2020-06-22T10:14:00Z
2020-06-22T10:14:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】博客皮肤教程:https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v1.1/#/ 感谢作者。 <a href="https://www.cnblogs.com/lanleiming/p/13178214.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/12102950.html
git密码相关问题 - 雷明nice
一、解决:每次都需要输入账号密码 git config --global credential.helper store 二、后期git密码更改后,重置密码操作 git config --system --unset credential.helper
2019-12-26T08:45:00Z
2019-12-26T08:45:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、解决:每次都需要输入账号密码 git config --global credential.helper store 二、后期git密码更改后,重置密码操作 git config --system --unset credential.helper <a href="https://www.cnblogs.com/lanleiming/p/12102950.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/10191592.html
【5分钟一个知识点】JS一文搞懂new操作符 - 雷明nice
关于new操作符,看了两本书《Javascript高级程序设计3》和《你不知道的JS上》,以及其他文档后,终于豁然开朗。 现总结如下,希望同样懵逼的你,彻底理解它。 如果有不同的意见,欢迎留言讨论。 一、先看看两本书中的定义 《Javascript高级程序设计3》 第145页 1)创建一个新对象 2
2018-12-28T09:09:00Z
2018-12-28T09:09:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】关于new操作符,看了两本书《Javascript高级程序设计3》和《你不知道的JS上》,以及其他文档后,终于豁然开朗。 现总结如下,希望同样懵逼的你,彻底理解它。 如果有不同的意见,欢迎留言讨论。 一、先看看两本书中的定义 《Javascript高级程序设计3》 第145页 1)创建一个新对象 2 <a href="https://www.cnblogs.com/lanleiming/p/10191592.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/9391079.html
gulp-px2rem-plugin 插件的一个小bug - 雷明nice
最近在使用这个插件的过程中发现一个bug: 不支持 含有小数的形式。 查看源码后,修改了下其中的正则,使其支持小数形式(66.66px、.6px )。 作者的源码最近一次更新都在两年前,所以就简单的记录下 插件地址:https://www.npmjs.com/package/gulp-px2rem-
2018-07-30T08:03:00Z
2018-07-30T08:03:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】最近在使用这个插件的过程中发现一个bug: 不支持 含有小数的形式。 查看源码后,修改了下其中的正则,使其支持小数形式(66.66px、.6px )。 作者的源码最近一次更新都在两年前,所以就简单的记录下 插件地址:https://www.npmjs.com/package/gulp-px2rem- <a href="https://www.cnblogs.com/lanleiming/p/9391079.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/9040365.html
windows下升级node&npm - 雷明nice
一、升级npm 二、升级node 1、查询node的安装目录 2、在官网下载最新的安装包,直接覆盖安装即可。 https://nodejs.org/zh-cn/
2018-05-15T04:22:00Z
2018-05-15T04:22:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、升级npm 二、升级node 1、查询node的安装目录 2、在官网下载最新的安装包,直接覆盖安装即可。 https://nodejs.org/zh-cn/ <a href="https://www.cnblogs.com/lanleiming/p/9040365.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/8473584.html
【转载】linux下升级npm以及node - 雷明nice
原文:http://blog.csdn.net/qq_16339527/article/details/73008708 npm升级 废话不多说,直接讲步骤。先从容易的开始,升级npm。 npm这款包管理工具虽然一直被人们诟病,很多人都推荐使用yarn,但其使用人数还是不见减少,况且npm都是随no
2018-02-26T07:45:00Z
2018-02-26T07:45:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】原文:http://blog.csdn.net/qq_16339527/article/details/73008708 npm升级 废话不多说,直接讲步骤。先从容易的开始,升级npm。 npm这款包管理工具虽然一直被人们诟病,很多人都推荐使用yarn,但其使用人数还是不见减少,况且npm都是随no <a href="https://www.cnblogs.com/lanleiming/p/8473584.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7726725.html
【前端】windows64位必备软件清单 - 雷明nice
目录 一、前言 二、日常必备 三、前端相关 四、个人习惯 一、前言 重做系统以后,安装各种软件就是挺烦人的一件事。 特地整理成文章,并且将相关软件上传到了百度网盘,省的以后再各种找资源了。 百度网盘下载链接:http://pan.baidu.com/s/1o8SM1VO 密码:jw6u 二、日常必备
2017-10-25T03:48:00Z
2017-10-25T03:48:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】目录 一、前言 二、日常必备 三、前端相关 四、个人习惯 一、前言 重做系统以后,安装各种软件就是挺烦人的一件事。 特地整理成文章,并且将相关软件上传到了百度网盘,省的以后再各种找资源了。 百度网盘下载链接:http://pan.baidu.com/s/1o8SM1VO 密码:jw6u 二、日常必备 <a href="https://www.cnblogs.com/lanleiming/p/7726725.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7606753.html
【转载】如何让图片按比例响应式缩放、并自动裁剪的css技巧 - 雷明nice
原文: http://blog.csdn.net/oulihong123/article/details/54601030 响应式网站、移动端页面在DIV CSS布局中对于图片列表或图片排版时, 如果想要图片按比例缩放, 最简单的就是把img宽度设为100%, 不设置高度,高度就会自动跟着高度缩放
2017-09-28T07:04:00Z
2017-09-28T07:04:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】原文: http://blog.csdn.net/oulihong123/article/details/54601030 响应式网站、移动端页面在DIV CSS布局中对于图片列表或图片排版时, 如果想要图片按比例缩放, 最简单的就是把img宽度设为100%, 不设置高度,高度就会自动跟着高度缩放 <a href="https://www.cnblogs.com/lanleiming/p/7606753.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7595876.html
【前端】JS文本比较插件 - 雷明nice
一、先上效果图 二、JS代码 三、调用 四、代码下载 https://pan.baidu.com/s/1o8n30MI
2017-09-26T03:31:00Z
2017-09-26T03:31:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、先上效果图 二、JS代码 三、调用 四、代码下载 https://pan.baidu.com/s/1o8n30MI <a href="https://www.cnblogs.com/lanleiming/p/7595876.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7516033.html
【转载】JavaScript中的属性:如何遍历属性 - 雷明nice
转载自:http://www.cnblogs.com/ziyunfei/archive/2012/11/03/2752905.html 在JavaScript中,遍历一个对象的属性往往没有在其他语言中遍历一个哈希(有些语言称为字典)的键那么简单.这主要有两个方面的原因:一个是,JavaScript中
2017-09-13T09:17:00Z
2017-09-13T09:17:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】转载自:http://www.cnblogs.com/ziyunfei/archive/2012/11/03/2752905.html 在JavaScript中,遍历一个对象的属性往往没有在其他语言中遍历一个哈希(有些语言称为字典)的键那么简单.这主要有两个方面的原因:一个是,JavaScript中 <a href="https://www.cnblogs.com/lanleiming/p/7516033.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7504206.html
【前端】三个bug - 雷明nice
目录 一、Array对象的indexOf() 二、使用jquery,clone()下拉框问题 三、jquery获取获取html5的data-*属性 一、Array对象的indexOf() 1、indexOf()定义: indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。 2、b
2017-09-11T07:30:00Z
2017-09-11T07:30:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】目录 一、Array对象的indexOf() 二、使用jquery,clone()下拉框问题 三、jquery获取获取html5的data-*属性 一、Array对象的indexOf() 1、indexOf()定义: indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。 2、b <a href="https://www.cnblogs.com/lanleiming/p/7504206.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7491531.html
WebStorm ES6 语法支持设置&babel使用及自动编译 - 雷明nice
一、语法支持设置 Preferences > Languages & Frameworks > JavaScript 二、Babel安装 1、全局安装 2、当前项目,适用于使用不同babel版本的情况 三、Babel基本用法 四、webstorm中使用babel 0、新建一个test.js文件,用作
2017-09-07T11:45:00Z
2017-09-07T11:45:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、语法支持设置 Preferences > Languages & Frameworks > JavaScript 二、Babel安装 1、全局安装 2、当前项目,适用于使用不同babel版本的情况 三、Babel基本用法 四、webstorm中使用babel 0、新建一个test.js文件,用作 <a href="https://www.cnblogs.com/lanleiming/p/7491531.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7491152.html
【转载】webstorm忽略node_modules目录 - 雷明nice
转载自:http://www.cnblogs.com/chengwb/p/6183440.html 我在使用了cnpm后node_modules之前的层级目录变成了同一级目录,所以目录很多,造成webstorm读取时卡死。 网上大家列了各种方法,在这里我归纳一下! 先给大家看看一些相关链接。 方法1
2017-09-07T10:21:00Z
2017-09-07T10:21:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】转载自:http://www.cnblogs.com/chengwb/p/6183440.html 我在使用了cnpm后node_modules之前的层级目录变成了同一级目录,所以目录很多,造成webstorm读取时卡死。 网上大家列了各种方法,在这里我归纳一下! 先给大家看看一些相关链接。 方法1 <a href="https://www.cnblogs.com/lanleiming/p/7491152.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7413736.html
webstorm2017添加vue模板 - 雷明nice
2017-08-22T13:19:00Z
2017-08-22T13:19:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】 <a href="https://www.cnblogs.com/lanleiming/p/7413736.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7405920.html
【记录】工作中遇到的两个小问题 - 雷明nice
一、使用zepto进行jsonp跨域请求时,请求失败时做一些处理? 需要同时设置timeout,才能捕获到error事件。 二、图片加载失败时,用默认图片替代? 这里有两种情况,一种是img标签,还有一个是background:url() 1)img标签: 可以在error事件中进行处理。 这种方法
2017-08-21T10:06:00Z
2017-08-21T10:06:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】一、使用zepto进行jsonp跨域请求时,请求失败时做一些处理? 需要同时设置timeout,才能捕获到error事件。 二、图片加载失败时,用默认图片替代? 这里有两种情况,一种是img标签,还有一个是background:url() 1)img标签: 可以在error事件中进行处理。 这种方法 <a href="https://www.cnblogs.com/lanleiming/p/7405920.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7246407.html
bootstrap-datepicker 插件修改为默认中文 - 雷明nice
datepicker插件默认为英文,而且格式为:mm/dd/yyyy这种情况,看起来不怎么直观。 修改目标: 1、默认显示为中文 2、格式为:yyyy年mm月dd日 需要修改两个地方: 1、更改datas对象, 增加zh-cn语言选项;参见源代码的1419行 2、修改默认参数,即defaults对象
2017-07-27T10:12:00Z
2017-07-27T10:12:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】datepicker插件默认为英文,而且格式为:mm/dd/yyyy这种情况,看起来不怎么直观。 修改目标: 1、默认显示为中文 2、格式为:yyyy年mm月dd日 需要修改两个地方: 1、更改datas对象, 增加zh-cn语言选项;参见源代码的1419行 2、修改默认参数,即defaults对象 <a href="https://www.cnblogs.com/lanleiming/p/7246407.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7096973.html
【最简单的方法】js判断字符串是否为JSON格式(20180115更新) - 雷明nice
前言 针对 “js判断字符串是否为JSON格式” 这个问题,在网上查了许多资料,都没找到自己想要的答案。 但是看到这个帖子《js判断字符串是否为JSON格式》后,突然灵光一闪,想到一种很简单的解决方案。 如果你对这个方法有异议,欢迎留言探讨。 解决方案 分析 就像之前的帖子所说,只是单纯的用JSON
2017-06-29T16:49:00Z
2017-06-29T16:49:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】前言 针对 “js判断字符串是否为JSON格式” 这个问题,在网上查了许多资料,都没找到自己想要的答案。 但是看到这个帖子《js判断字符串是否为JSON格式》后,突然灵光一闪,想到一种很简单的解决方案。 如果你对这个方法有异议,欢迎留言探讨。 解决方案 分析 就像之前的帖子所说,只是单纯的用JSON <a href="https://www.cnblogs.com/lanleiming/p/7096973.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/lanleiming/p/7070954.html
【从零开始】用node搭建一个jsonp&json服务 - 雷明nice
目录: 一、介绍 二、node安装 三、webstorm配置node环境 四、代码介绍 五、如何使用 六、自定义域名 七、其他 一、介绍 1、背景 日常工作中,跟后端商定好接口格式后;通常采用的开发方式,就是自己新建一个json文件,手动的模拟一批数据,进行ajax调用。 但是如果遇到后端提供的接口
2017-06-29T09:24:00Z
2017-06-29T09:24:00Z
雷明nice
https://www.cnblogs.com/lanleiming/
【摘要】目录: 一、介绍 二、node安装 三、webstorm配置node环境 四、代码介绍 五、如何使用 六、自定义域名 七、其他 一、介绍 1、背景 日常工作中,跟后端商定好接口格式后;通常采用的开发方式,就是自己新建一个json文件,手动的模拟一批数据,进行ajax调用。 但是如果遇到后端提供的接口 <a href="https://www.cnblogs.com/lanleiming/p/7070954.html" target="_blank">阅读全文</a>