摘要: 多接口请求时,要加个loading,以前做的是接口请求一次,loading加载,然后结束loading关闭,但是会出现打开,关闭又打开的情况, 产品经理需要弹出一次,最后一次请求完成才关闭,然后这样就只能通过计数完成,request时 加 1,response 时减1,大于0 loading, 等于 阅读全文
posted @ 2021-04-28 11:36 小猪宿州 阅读(340) 评论(0) 推荐(0) 编辑
摘要: string.match(/((?!hello).)*/) (?!hello)表示不包含hello, (?!hello).表示不包含hello的任意字符 阅读全文
posted @ 2019-12-30 18:03 小猪宿州 阅读(1537) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-12-27 12:01 小猪宿州 阅读(84) 评论(0) 推荐(0) 编辑
摘要: window.addEventListener('online', browserOnline); window.addEventListener('offline', browserOffline); 阅读全文
posted @ 2019-12-12 14:48 小猪宿州 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1 Array.prototype.unique=function(){ 2 let _uniqueArray = [...new Set(this)],_array = [],j=0; 4 for(let i=0; i < this.length; i++,j++){ 5 while(this[i]!==_uniqueArray[j]){ 6 ... 阅读全文
posted @ 2019-10-29 11:27 小猪宿州 阅读(537) 评论(0) 推荐(0) 编辑
摘要: -webkit-mask-image: linear-gradient(to bottom,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 15%,rgba(255,255,255,1) 25%,rgba(255,255,255,1) 75%,rgba(255,255,255,.6) 85%,rgba(255,255,255,0) 100%); 阅读全文
posted @ 2019-08-14 17:35 小猪宿州 阅读(1406) 评论(0) 推荐(0) 编辑
摘要: resolve 执行 setTimout 事宏任务加入队列里,then 原因是外部的setTimeout优先加入then内的setTimeout事件的队列里 阅读全文
posted @ 2019-07-11 09:13 小猪宿州 阅读(147) 评论(0) 推荐(0) 编辑
摘要: scss样式函数: 示例: 阅读全文
posted @ 2019-04-15 10:39 小猪宿州 阅读(945) 评论(0) 推荐(0) 编辑
摘要: URL Scheme —— 唤端媒介 [scheme]://[host]/[path]?[query]https://segmentfault.com/a/1190000018661914 阅读全文
posted @ 2019-03-29 08:57 小猪宿州 阅读(420) 评论(0) 推荐(0) 编辑
摘要: function extend(o, n, override) { for (var p in n) { if (n.hasOwnProperty(p) && (!o.hasOwnProperty(p) || override)) o[p] = n[p]; } } // 默认参数 var options = { pageIndex: 1... 阅读全文
posted @ 2018-08-15 08:54 小猪宿州 阅读(202) 评论(0) 推荐(0) 编辑