问题详情
下面的 pipe + map + sortBy 的排序代码,没有按照 useCount 降序排列,却按照升序排序,请问如何解决?
get allTags$() {
return (this._allTags$ ??= combineLatest([this.activeTags$, this.inactiveTags$]).pipe(
map(([activeTags, inactiveTags]) =>
sortBy(
activeTags.concat(inactiveTags),
['useCount'],
['desc']
)
),
shareReplay(1)
));
}
回答
问题补充:
也就是 'desc' 没起作用
版权:言论仅代表个人观点,不代表官方立场。转载请注明出处:https://www.stntk.com/question/222.html
还没有评论呢,快来抢沙发~