更新时间:2022-05-02 16:07:21
使用 delay
运算符和 pipe
运算符
use the delay
operator withe the pipe
operator
import { delay, take } from 'rxjs/operators';
import { forkJoin } from 'rxjs/observable/forkJoin';
import { of } from 'rxjs/observable/of';
return forkJoin(
of(call1()).pipe(delay(1000)),
of(call2()).pipe(delay(2000)),
of(call3()).pipe(delay(1000))
);