Js中Proxy对象 Proxy对象用于定义基本操作的自定义行为,例如属性查找、赋值、枚举、函数调用等。 语法 const proxy = new Proxy(target, handler); target: 要使用Proxy包装的目标对象,可以是任何类型的对象,包括原生数组,函数,甚至另一个代理 ...
分类:
Web程序 时间:
2020-11-24 12:04:00
阅读次数:
13
作为一个记录,写自适应的时候加入的Js,其实也大可不必,直接定死根部front-size即可用rem。 (function flex(window, document) { var docEl = document.documentElement var dpr = window.devicePix ...
分类:
Web程序 时间:
2020-11-23 12:31:52
阅读次数:
12
VC中的CRect环境VS2013头文件:#include <afxwin.h>A CRect object can be passed as a function parameter wherever a RECT structure, LPCRECT, or LPRECT can be pass ...
分类:
编程语言 时间:
2020-11-23 12:17:41
阅读次数:
9
问题1:ES6中的class 与 ES5中function的关系 ES6 中: class Person { constructor(name) { this.name = name; } sayHello() { return 'hello, I am ' + this.name; } } var ...
分类:
Web程序 时间:
2020-11-23 12:12:24
阅读次数:
11
1 const domainUrl = getApp().data.domainUrl; 2 Page({ 3 data: {}, 4 onLoad: function (options) { 5 wx.getSystemInfo({ 6 success(res) { 7 if (res.envir ...
分类:
微信 时间:
2020-11-23 12:11:51
阅读次数:
25
SHA1 VS RSA: what's the difference between them? Fundamentally different. SHA1 is a hash algorithm, which is a one way function, turning an input of a ...
分类:
其他好文 时间:
2020-11-23 12:09:41
阅读次数:
4
double getDistance(cv::Point pointO, cv::Point pointA) { double distance; distance = powf((pointO.x - pointA.x), 2) + powf((pointO.y - pointA.y), 2); ...
分类:
其他好文 时间:
2020-11-23 11:51:01
阅读次数:
9
// 兼容ie8 不会改变原数组 function deWeight(arr) { for (var i = 0; i < arr.length - 1; i++) { for (var j = i + 1; j < arr.length; j++) { if (arr[i].name== arr[ ...
分类:
编程语言 时间:
2020-11-23 11:48:27
阅读次数:
12
父节点操作: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta htt ...
分类:
其他好文 时间:
2020-11-21 12:41:01
阅读次数:
28
在看阮一峰的react入门的时候,写到一段代码,但是写完就报错了,经过多方查找,终于解决掉了 错误描述: 解决方法: 将React.createClass换成React.Component, 但是不知道为什么这样就不报错了 (^._.^)? 文章地址:https://toddmotto.com/re ...
分类:
Web程序 时间:
2020-11-21 12:12:27
阅读次数:
15