君临
君临
I added `"semicolon": [true, "never"]` in the **tslint.json**. And remove the semicolon in the files. Then the terminal outputs: ``` Failed to compile. xxx/my-app/src/App.tsx (1,31): Missing semicolon ```
`Function.__proto__ === Function.prototype` 导致 `Function.constructor === Function`,即: **Function 是它自己的构造函数** 引用自 http://www.mollypages.org/tutorials/js.mp
@2qiaoyu 可以试试这个组件 https://github.com/Jancat/react-native-slide-verify
https://github.com/Microsoft/vscode/issues/50065#issuecomment-399747632
我觉得在延迟执行时,应该计算剩余时间,在剩余时间后执行。这样能实现如果频繁调用的话,每个 threshhold 时间点都会执行一次。 否则如果每次都延迟 threshhold 时间执行,有可能会出现两次执行间隔接近 2*threshhold,延迟太久了。 ```js function throttle(fn, threshhold) { let timer, last return function() { const context = this const args = arguments const now = +new...
@Wangszzju 还是需要保存 context 上下文的。 **setTimout** 中的箭头函数中如果使用到`this`,则会绑定到调用该函数的目标对象,通常是目标元素,但 `this` 绑定**不会影响到箭头函数中调用的函数内部 this**。 如果不使用 **apply()**,则 `fn` 中的 `this` 指向 `window`,通常不是我们希望的,所以需要保存 **context**,通过 `fn.apply(context)` 来让 `fn` 中的 `this` 指向 `context`(目标元素)。
确实,没有 Dock 图标不太方便,主面板被其它窗口覆盖后无法通过 command + tab 切换回来,只能重新在 menu 栏上点 打开面板
same issue (blink twice)