From ba3ca832230be6bc36b570d3c64b78d5fa184e9e Mon Sep 17 00:00:00 2001 From: kira1928 Date: Sun, 5 May 2024 21:39:51 +0900 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=BD=95=E5=88=B6=E4=B8=AD=E6=8E=92=E6=9C=80=E5=89=8D?= =?UTF-8?q?=E9=9D=A2=20(#710)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webapp/src/component/live-list/index.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/webapp/src/component/live-list/index.tsx b/src/webapp/src/component/live-list/index.tsx index 3ffffdfb..524e0522 100644 --- a/src/webapp/src/component/live-list/index.tsx +++ b/src/webapp/src/component/live-list/index.tsx @@ -42,7 +42,7 @@ class LiveList extends React.Component { //定时器 timer!: NodeJS.Timeout; - runStatus = { + runStatus: ColumnProps = { title: '运行状态', key: 'tags', dataIndex: 'tags', @@ -71,9 +71,21 @@ class LiveList extends React.Component { })} ), + sorter: (a: ItemData, b: ItemData) => { + const isRecordingA = a.tags.includes('录制中'); + const isRecordingB = b.tags.includes('录制中'); + if (isRecordingA === isRecordingB) { + return 0; + } else if (isRecordingA) { + return 1; + } else { + return -1; + } + }, + defaultSortOrder: 'descend', }; - runAction = { + runAction: ColumnProps = { title: '操作', key: 'action', dataIndex: 'listening',