摘要: 前端大合集必备 https://www.cnblogs.com/liuzhibin/p/5944821.html 统计图组件 http://echarts.baidu.com/index.html 各种语言基础学习汇总 http://www.runoob.com/ http://www.w3scho 阅读全文
posted @ 2017-10-28 10:24 狗 阅读(160) 评论(0) 推荐(0) 编辑
摘要: // 把多个空格替换成1个空格 let value = '1 张三'; value = value.replace(/ +/g, ' '); console.log(value); // 输出:1 张三 阅读全文
posted @ 2021-08-18 10:48 狗 阅读(1406) 评论(0) 推荐(0) 编辑
摘要: 1,修改hosts 打开该文件下的hosts文件 C:\Windows\System32\drivers\etc\ 2,复制添加下面内容 # GitHub Start 192.30.253.112 Build software better, together 192.30.253.119 gist 阅读全文
posted @ 2020-12-21 11:43 狗 阅读(295) 评论(0) 推荐(0) 编辑
摘要: // 为Promise添加finally方法支持 Promise.prototype.finally = function (callback) { let P = this.constructor; return this.then( value => P.resolve(callback()). 阅读全文
posted @ 2020-06-22 11:37 狗 阅读(690) 评论(2) 推荐(0) 编辑
摘要: CSS书写顺序 1.位置属性 (position, top, right, z-index, display, float等) 2.大小 (width, height, padding, margin) 3.文字系列 (font, line-height, letter-spacing, color 阅读全文
posted @ 2019-03-05 11:02 狗 阅读(131) 评论(0) 推荐(0) 编辑
摘要: //取数组交集 doIntersection(firstArray, secondArray) { // The logic here is to create a hashmap with the elements of the firstArray as the keys. // After t 阅读全文
posted @ 2018-02-22 11:43 狗 阅读(1153) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/printhelloworld/p/8426627.html 阅读全文
posted @ 2018-02-08 16:02 狗 阅读(122) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Page Title</title> <meta name="vie 阅读全文
posted @ 2017-12-21 19:47 狗 阅读(1200) 评论(0) 推荐(0) 编辑
摘要: // 去除数组里面为空的属性及子数组 export function deepCopy (source) { var result = [] //var result = {} for (var key in source) { if (source[key] instanceof Array) { 阅读全文
posted @ 2017-12-20 11:37 狗 阅读(1269) 评论(0) 推荐(0) 编辑
摘要: export function formatDate(date, fmt) { if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); 阅读全文
posted @ 2017-12-20 11:36 狗 阅读(1703) 评论(0) 推荐(0) 编辑
摘要: /** * 清除所有的空格 * @returns {*} */ String.prototype.removeSpace = function () { var str = this.replaceAll(' ', '').replaceAll('&nbsp;', '').replaceAll('\ 阅读全文
posted @ 2017-11-09 14:56 狗 阅读(635) 评论(0) 推荐(0) 编辑