From 0b15ff1476cca85de513e69b98b4e94a1ae5f347 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 24 Oct 2025 20:46:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20AMF=E9=85=8D=E7=BD=AEWhiteList=20Cont?= =?UTF-8?q?ent=E5=AF=BC=E5=85=A5index0=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ne/neConfig/hooks/useArrayImport.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/ne/neConfig/hooks/useArrayImport.ts b/src/views/ne/neConfig/hooks/useArrayImport.ts index 419a0dc4..cd1dfa98 100644 --- a/src/views/ne/neConfig/hooks/useArrayImport.ts +++ b/src/views/ne/neConfig/hooks/useArrayImport.ts @@ -24,7 +24,7 @@ export default function useArrayImport({ fileetx: '.xlsx', itemKey: 'index', item: (row: Record) => { - const index = row['Index'] || 0; + const index = row['Index'] ?? -1; return { imeiPrefixValue: `${row['IMEI Prefix']}`, index: parseInt(index), @@ -36,7 +36,7 @@ export default function useArrayImport({ fileetx: '.xlsx', itemKey: 'index', item: (row: Record) => { - const index = row['Index'] || 0; + const index = row['Index'] ?? -1; return { imsiValue: `${row['IMSI Value']}`, imeiValue: `${row['IMEI Value/Prefix']}`, @@ -51,7 +51,7 @@ export default function useArrayImport({ fileetx: '.xlsx', itemKey: 'index', item: (row: Record) => { - const index = row['Index'] || 0; + const index = row['Index'] ?? -1; return { imei: `${row['IMEI']}`, index: parseInt(index), @@ -128,7 +128,7 @@ export default function useArrayImport({ importState.loading = true; for (const row of rows) { const rowItem = importState.item(row); - const rowKey = rowItem[importState.itemKey] || -1; + const rowKey = rowItem[importState.itemKey]; let result: any = null; // 检查index是否定义 const has = arrayState.columnsData.find(