From 18cc06a4ae568d8d09eb9033df52bc96ce94b574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Mon, 29 Jun 2026 17:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEcreateTime=E9=99=8D=E5=BA=8F=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/factory/resource/factoryVersion/index.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/factory/resource/factoryVersion/index.jsx b/src/factory/resource/factoryVersion/index.jsx index 11bf1883..30206997 100644 --- a/src/factory/resource/factoryVersion/index.jsx +++ b/src/factory/resource/factoryVersion/index.jsx @@ -103,6 +103,13 @@ function Index(props) { } }); + // 按 createTime 降序排序,最新的版本排在最上面 + historyVersions.sort((a, b) => { + const timeA = a.createTime ? new Date(a.createTime).getTime() : 0; + const timeB = b.createTime ? new Date(b.createTime).getTime() : 0; + return timeB - timeA; + }); + return { currentVersions, historyVersions }; };