在 service里面 public isShowSubject: Subject<Object> = new Subject(); 通过service this.Service.isShowSubject.next(数据); 在其他组件中使用 this.Service.isShowSubject.subscribe((data) => { console.log(data); } 相关文章: 2021-12-04 2022-02-20 2021-05-22 2022-12-23 2022-12-23 2021-06-06