BehaviorSubject /* ehaviorSubject接受一个默认参数,相当于new Subject后自动next('aa') 之后到行为和Subject一致 */ const behave = new BehaviorSubject('aa'); behave.subscribe(res => { <