Fork me on GitHub

03 2019 档案
研究字符串模板
摘要:https://gist.github.com/lygaret/a68220defa69174bdec5define(function(require) { var React = require('react'); var paramRegex = /__(\d)+/; var parser = new DOMParser(); var error... 阅读全文
posted @ 2019-03-31 21:36 huashiyiqike 阅读(298) 评论(0) 推荐(1)
fetch跨域浏览器请求头待研究
摘要:fetch('https://wwww.baidu.com', {headers: { "Access-Control-Allow-Origin": "*", 'Access-Control-Allow-Methods': 'GET, POST, PATCH, PUT, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'Origin, Cont... 阅读全文
posted @ 2019-03-25 11:57 huashiyiqike 阅读(856) 评论(0) 推荐(0)
穿透dom触发事件
摘要:使用document.elementsFromPoint能穿透获取dom节点,通过dispatchEvent模拟事件 阅读全文
posted @ 2019-03-21 16:33 huashiyiqike 阅读(844) 评论(0) 推荐(0)
bind与继承 待研究
摘要:class a { f() { console.log('a') } get f2() { console.log('f2') return (this['f'] = this.f.bind(this)); } } class b extends a { constructor() { super( 阅读全文
posted @ 2019-03-19 17:37 huashiyiqike 阅读(333) 评论(0) 推荐(0)
总结各种奇葩原型继承,面试向
摘要:1. 原型链继承 function Brother(name){ this.name = name; this.wives = ["奶茶"]; this.marry = function(){}; } function Employee(name) { this.name = name; } Emp 阅读全文
posted @ 2019-03-17 01:27 huashiyiqike 阅读(218) 评论(0) 推荐(0)
彻底搞懂js原型与原型链
摘要:原生的原型链 function fn(){},fn 为 Function的一个实例,原型链为 null -> Object -> Function -> fn: fn.__proto__ Function.prototype Function.prototype.__proto Object.pro 阅读全文
posted @ 2019-03-16 15:47 huashiyiqike 阅读(686) 评论(0) 推荐(0)
移动端根据dpr适配
摘要:在html插入这段代码,然后在样式文件使用base字体为75px的基准转换px到rem即可。必要时还可以通过vh,vw调整。 https://www.jianshu.com/p/e96ccb603a50 阅读全文
posted @ 2019-03-13 10:39 huashiyiqike 阅读(409) 评论(0) 推荐(0)