Skip to content

Commit

Permalink
fix(runtime): 修复分类排序逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhandsome committed Dec 22, 2023
1 parent 9faf792 commit 4f481ea
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/runtime/miniprogram/src/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,20 @@ Component({
},
searchStr: '',
group: {
keys: store.group.getKeys(),
keys: store.group.getKeys((next, prev) => {
if (prev === '全部') {
return 1;
}
if (next === '全部') {
return -1;
}
if (prev === '未分类') {
return -1;
}
if (next === '未分类') {
return 1;
}
}),
actived: currentGroupCache.get() || DEFAULT_GROUP.ALL
}
},
Expand Down

0 comments on commit 4f481ea

Please sign in to comment.