元気?私はRxjsの初心者です。私はどのように異なるイベントから観測可能なものをマージするか分からない。私はVue.jsRxjsで複数のイベントから観測可能にするには?
今イベントはSEARCHKEYの変化からくるexport default {
name: 'useraside',
data: function() {
return {
searchKey: '',
isPublic: true
}
},
components: {
User
},
subscriptions() {
return {
// this is the example in RxJS's readme.
raps: this.$watchAsObservable('searchKey')
.pluck('newValue')
// .filter(text => text.length > 1)
.debounceTime(500)
.distinctUntilChanged()
.switchMap(terms => fetchRaps(terms, this.userdata._id, this.isPublic))
.map(formatResult)
}
}
}
とRxjsを統合し、今私は、同じ観察可能なときisPublic値の変更をサブスクライブしたいと思います。 searchKeyやisPublicが変更されるたびにラップを取得したいと思います。おかげさまで
だけMerge演算子を使用します。)http://reactivex.io/rxjs/class/es6 /Observable.js~Observable.html#static-method-merge – Maxime
ありがとうございます。それは今働いている –