銀桑

Results 18 comments of 銀桑

add file to your project, named **react-css-module.d.ts**. ``` react-css-module.d.ts declare namespace React { interface Attributes { styleName?: string | undefined; } interface HTMLAttributes { styleName?: string | undefined; } interface...

I try to debug. It's your `notForPlugin` function in index.js return false while ``` extension === './table' ``` not './table.css' course the problem.

`WebkitOverflowScrolling: 'touch' ` may lead to iOS 11 broken. Wish you can have some ideas.

document.querySelector(".map-container").addEventListener("touchend", function(e){ e.stopPropagation() //阻止冒泡 }) 如果是添加在touchstart 和touchmove事件上是不行的。

> 同步就没有必要用地狱回调和Promise了,这里讲的回调默认指的是异步了。

``` function workMyCollection(arr) { return arr.reduce(function(promise, item) { return promise.then(function(result) { return doSomethingAsyncWithResult(item, result); }); }, Promise.resolve()); } ``` 队列这里是容易引起误解的。需要其实传入[函数1, 函数2],而不是Promise实例 [ new Promise(), new Promise()]。 arr需要包含一系列异步函数而不是直接包含Promise实例,如果直接包含实例,Promise实例会数组在初始化时就开始执行,而不会等到第一个Promise执行完再执行第二个。 ``` return doSomethingAsyncWithResult(item,...

还可以思考下如果按照队列执行,又想拿到所有的Promise实例结果怎么实现? 下面给出一个简单的版本,希望大家斧正。 ``` function loadSomething(){ return new Promise((resolve,reject)=>{ setTimeout(()=>{ console.log('reject loadSomething') resolve('loadSomethingDone') },2000) }) } function loadAnotherthing(){ return new Promise((resolve,reject)=>{ setTimeout(()=>{ console.log('reject loadAnotherthing') resolve('loadAnotherthingDone') },1000) }) } function promiseOrder(promises){ return...

Javascript Infinity is not equal Infinity in Math. While nines‘s Number value is 'bigger' than **Number.MAX_VALUE** , JS understand it as an Infinity number. I think it is expected that...

you may need another function like ``` function isBigNumber(str) { return Number(str) === Infinity && str.split('').every(item => (Number(item)) < 10) } ```