diff --git a/packages/ui-default/components/discussion/reaction.page.tsx b/packages/ui-default/components/discussion/reaction.page.tsx index a86aa7ab6..6cd3593bc 100644 --- a/packages/ui-default/components/discussion/reaction.page.tsx +++ b/packages/ui-default/components/discussion/reaction.page.tsx @@ -10,9 +10,9 @@ import { request } from 'vj/utils'; function renderReactions(reactions, self, rootEle) { let html = ''; - for (const key in reactions) { - if (!reactions[key]) continue; - html += `
${key} ${reactions[key]}
\n`; + for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) { + if (!v) continue; + html += `
${k} ${v}
\n`; } rootEle.html(html); }