不使用 combineLatest 怎么达到这个效果?
const id$ = of({ id: '123', }).pipe(pluck('id')) const source$ = of({ '123': 1, '234': 2, }) combineLatest(source$, id$, (hash, id) => { return hash[id] }).subscribe(console.log) 
不使用 combineLatest 怎么达到这个效果?
const id$ = of({ id: '123', }).pipe(pluck('id')) const source$ = of({ '123': 1, '234': 2, }) combineLatest(source$, id$, (hash, id) => { return hash[id] }).subscribe(console.log) 1 Zhuzhuchenyan Aug 7, 2020 换汤不换药的推荐 withlatestfrom, 不过这个操作符分主次,根据你要的逻辑写就好了 |