We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
第29天 在工作中能让你最有成就感的是什么?并介绍下你最得意的作品吧
能够探索到原理的问题,能够在生产环境运用,产生比较好绩效。 没有真正遇到过。
实现 Promise 不能多次"触发"的功能, this.call() 感觉比返回new Promise更方便啊 就是感觉有点鸡肋(毕竟需要自己实现), 但是感觉想法还是可以的哈 😂
new Callthen(document.addEventListener,['click']) .then(function(data){ // 在回调中 执行 this.call() 或 this.done(), 通过这两个接口控制流程的进行 // 执行 this.call() 将继续执行下一条 then 中的回调,否则后续 then 不再执行 // 执行 this.done() 则将执行 over 中的回调[若存在的话], 程序进入终态
console.log('then1',data); this.call(2); this.done('aaa'); setTimeout(()=>{ this.call(1111); //this.call(1); },1000)
}) .then(function(data){ console.log('then2',data); this.call(3); }) .then(function(data){ console.log('then3',data); setTimeout(()=>{ this.call(4) },1000) }) .then(function(data){ console.log('then4',data); }) .then(function(data){ console.log('then4',data); }) .over(function(err){ console.log('over1',err); });
https://www.npmjs.com/package/callthen
目前的工作主要是基础库维护和编写、UI组件制作、一个基于Vue的框架的维护。主要偏向基础设施而非业务编写。 使我最有成就感的是:这些基础设施被同事使用并称赞的时候。就像自己的儿子考上了清华北大一样的。
Activity
zivenday commentedon Aug 31, 2019
能够探索到原理的问题,能够在生产环境运用,产生比较好绩效。 没有真正遇到过。
justfn commentedon Sep 10, 2019
实现 Promise 不能多次"触发"的功能, this.call() 感觉比返回new Promise更方便啊
就是感觉有点鸡肋(毕竟需要自己实现), 但是感觉想法还是可以的哈 😂
new Callthen(document.addEventListener,['click'])
.then(function(data){
// 在回调中 执行 this.call() 或 this.done(), 通过这两个接口控制流程的进行
// 执行 this.call() 将继续执行下一条 then 中的回调,否则后续 then 不再执行
// 执行 this.done() 则将执行 over 中的回调[若存在的话], 程序进入终态
})
.then(function(data){
console.log('then2',data);
this.call(3);
})
.then(function(data){
console.log('then3',data);
setTimeout(()=>{
this.call(4)
},1000)
})
.then(function(data){
console.log('then4',data);
})
.then(function(data){
console.log('then4',data);
})
.over(function(err){
console.log('over1',err);
});
https://www.npmjs.com/package/callthen
FurryWolfX commentedon Nov 29, 2019
目前的工作主要是基础库维护和编写、UI组件制作、一个基于Vue的框架的维护。主要偏向基础设施而非业务编写。
使我最有成就感的是:这些基础设施被同事使用并称赞的时候。就像自己的儿子考上了清华北大一样的。
smile-2008 commentedon Sep 29, 2020
目前的工作主要是基础库维护和编写、UI组件制作、一个基于Vue的框架的维护。主要偏向基础设施而非业务编写。
使我最有成就感的是:这些基础设施被同事使用并称赞的时候。就像自己的儿子考上了清华北大一样的。