Keenwon
Keenwon
> 定位到开头的题目,流程如下: > 1. 当前task运行,执行代码。首先setTimeout的callback被添加到tasks queue中; > 2. 实例化promise,输出 1; promise resolved;输出 2; > 3. promise.then的callback被添加到microtasks queue中; > 4. 输出 3; > 5. 已到当前task的end,执行microtasks,输出 5; > 6. 执行下一个task,输出4。 关于第2,3步,不是promise.resolve()的时候,promise.then的callback**已经**被添加到microtask queue了吗?然后输出2,然后跳到第四步输出3.
@mqliutie 你这例子不对吧?你的 `setTimeout` 在 `new Promise` 内部呀,大兄弟;`setTimeout` 不执行 `then` 也永远不执行,这是有明显的先后顺序的
 
试试去掉 test https://github.com/keenwon/antcolony/blob/master/Gruntfile.js#L108
暂无精力添加
这是你自己写的吧?你直接把你找到的地址,写到 `src/male.js` 就好了
记下了
目前的分页逻辑,没有考虑这种情况,因为 `totalCounts` 为 0 的时候,是不该显示 jqPaginator 分页
@lirenhao 因为 totalCounts 不能为空
```js if (!opts.totalPages && !opts.totalCounts) { throw new Error('[jqPaginator] totalCounts or totalPages is required'); } ``` 就是这样判断的。