1、结合扩展运算符 //剩余参数是做聚合的,扩展运算符是做展开的 function sum(...args){ console.log(arguments); console.log(arguments instanceof Array); //false 因为它是一个类数组对象 //以下代码均可将 ...
分类:
其他好文 时间:
2020-06-17 09:18:14
阅读次数:
67
首先新增一个js文件,用来放防抖等工具方法 src/utils/index.js // 防抖 export const Debounce = (fn, t) => { let delay = t || 500 let timer return function () { let args = arg ...
分类:
其他好文 时间:
2020-06-16 23:45:21
阅读次数:
133
Scope: Current File Program: (node地址): E:\node\node_global\lessc.cmd Arguments: --no-color $FileName$ Output paths to refresh: $FileNameWithoutExtensi ...
分类:
Web程序 时间:
2020-06-16 18:27:31
阅读次数:
79
版本2.3.4: 在cocos中,自定义的类如果在构造函数里传参数,会有警告提示。 例如下面的类,在构造函数传入a,b参数 Test.ts const {ccclass, property} = cc._decorator; @ccclass export default class Test ex ...
分类:
其他好文 时间:
2020-06-15 22:51:02
阅读次数:
202
函数绑定 函数绑定要创建一个函数,可以在特定的this环境中以指定参数调用另一个函数 实现一个简单的bind函数 function bind(fn, context) { return function() { return fn.apply(context, arguments) } } 在bin ...
分类:
其他好文 时间:
2020-06-14 11:12:19
阅读次数:
58
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var ...
分类:
其他好文 时间:
2020-06-14 11:07:22
阅读次数:
72
1.定义:在一个类里面,方法名字相同,而参数不同。返回类型可以相同也可以不同,只要他们的参数个数或参数类型不同即可。 2.总结:“两同一不同”:同一个类、相同方法名 参数列表不同:参数个数不同,参数类型不同 用来判断是否够成重载。 与方法的权限修饰符、返回值类型、形参变量名、方法体都没有关系! 3. ...
分类:
编程语言 时间:
2020-06-13 19:17:49
阅读次数:
87
1、JavaScript中的Array.prototype.slice.call(arguments)能将有length属性的对象转换为数组(特别注意: 这个对象一定要有length属性) 理解第一步: 其中,arguments是一个具有length属性的对象, 通过call 这个方法,把argum ...
分类:
编程语言 时间:
2020-06-13 19:14:43
阅读次数:
75
void SendConsoleCommand(int x,int y,char *cvar) { _asm push cvar //push the arguments to stack _asm push x2 //push the arguments to stack _asm push x ...
分类:
其他好文 时间:
2020-06-13 18:59:40
阅读次数:
56
Oracle索引修复 ,ORA-00600: internal error code, arguments: [6200], 问题背景:客户反馈DB每天产生的incident日志很多,需要排查原因 查看alert日志发现大量的ORA-07445、ORA-00600错误 1 Errors in fil ...
分类:
数据库 时间:
2020-06-13 11:13:12
阅读次数:
51