03 2019 档案
研究字符串模板
摘要:https://gist.github.com/lygaret/a68220defa69174bdec5define(function(require) { var React = require('react'); var paramRegex = /__(\d)+/; var parser = new DOMParser(); var error...
阅读全文
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...
阅读全文
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(
阅读全文
总结各种奇葩原型继承,面试向
摘要:1. 原型链继承 function Brother(name){ this.name = name; this.wives = ["奶茶"]; this.marry = function(){}; } function Employee(name) { this.name = name; } Emp
阅读全文
彻底搞懂js原型与原型链
摘要:原生的原型链 function fn(){},fn 为 Function的一个实例,原型链为 null -> Object -> Function -> fn: fn.__proto__ Function.prototype Function.prototype.__proto Object.pro
阅读全文
移动端根据dpr适配
摘要:在html插入这段代码,然后在样式文件使用base字体为75px的基准转换px到rem即可。必要时还可以通过vh,vw调整。 https://www.jianshu.com/p/e96ccb603a50
阅读全文
浙公网安备 33010602011771号