随笔分类 -  rxjs

摘要:distinct对数组中的对象指定的关键字来去重 阅读全文
posted @ 2019-08-12 10:29 蜗牛菜菜 阅读(1060) 评论(0) 推荐(0) 编辑
摘要:rxjs debounceTime用来减少搜索的频率,提高用户体验度, input$.pipe( filter(e => e.target.value.length > 1), debounceTime(300), distinctUntilChanged(), switchMap( e => from(getSuggestList(e.target.value)).pipe(retry(3)) ) ).subscribe((val)=>console.log(val)) 阅读全文
posted @ 2019-08-12 10:26 蜗牛菜菜 阅读(1608) 评论(0) 推荐(0) 编辑

footer
点击右上角即可分享
微信分享提示