From 889692c56b9aa3d3c7e2fddd965690bd37200215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 13 Dec 2024 18:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA=E6=8A=A5?= =?UTF-8?q?=E9=94=99=EF=BC=9B=E5=B0=9D=E8=AF=95=E6=89=93=E5=8C=85map?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscodeignore | 1 - src/editorTable/editorData.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscodeignore b/.vscodeignore index 7431b1a..7024b64 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -3,7 +3,6 @@ .gitignore **/tsconfig.json **/.eslintrc.json -**/*.map .github/ tmp/ src/ diff --git a/src/editorTable/editorData.ts b/src/editorTable/editorData.ts index 579bc7b..fcbebf2 100644 --- a/src/editorTable/editorData.ts +++ b/src/editorTable/editorData.ts @@ -59,7 +59,7 @@ interface KVShape { function fromKV(kvMap: Record): KV { let result: Record = {}; // 按照 sort 字段的值排序,然后将重新组成 { K: V.value } 的形式 - let kvList = Object.values(kvMap).sort((a, b) => Number(a.sort - b.sort)); + let kvList = Object.values(kvMap).sort((a, b) => Number(a.sort) - Number(b.sort)); for (let kv of kvList) { result[kv.key] = kv.value; }