Skip to content

Commit 8e678da

Browse files
committed
🐛 修复列表名称排序错误
1 parent 0ec4cc6 commit 8e678da

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/options/routes/ScriptList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function ScriptList() {
188188
{
189189
title: "名称",
190190
dataIndex: "name",
191-
sorter: (a, b) => a.name.length - b.name.length,
191+
sorter: (a, b) => a.name.localeCompare(b.name),
192192
filterIcon: <IconSearch />,
193193
key: "name",
194194
// eslint-disable-next-line react/no-unstable-nested-components

src/pages/options/routes/SubscribeList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function SubscribeList() {
103103
{
104104
title: "名称",
105105
dataIndex: "name",
106-
sorter: (a, b) => a.name.length - b.name.length,
106+
sorter: (a, b) => a.name.localeCompare(b.name),
107107
filterIcon: <IconSearch />,
108108
key: "name",
109109
// eslint-disable-next-line react/no-unstable-nested-components

0 commit comments

Comments
 (0)