From 25952d43a5241077c6aee703eadbbdbf4a731112 Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 21 Nov 2024 14:34:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=96=AD=E8=A8=80=E6=95=B0=E5=AD=97=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/api-test/components/fastExtraction/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/api-test/components/fastExtraction/index.vue b/frontend/src/views/api-test/components/fastExtraction/index.vue index ce66f8fbe1..21097fbf03 100644 --- a/frontend/src/views/api-test/components/fastExtraction/index.vue +++ b/frontend/src/views/api-test/components/fastExtraction/index.vue @@ -197,7 +197,7 @@ const expressionFormRef = ref(null); const parseJson = ref>({}); const isHtml = ref(false); - const matchResult = ref([]); // 当前匹配结果 + const matchResult = ref([]); // 当前匹配结果 const isMatched = ref(false); // 是否执行过匹配 watch( @@ -298,6 +298,8 @@ } else if (typeof results === 'object' && results !== null) { traverseJSONObject(results); matchResult.value = results; + } else if (typeof results === 'string' && results.includes('Number(')) { + matchResult.value = results.replace(/Number\(([^)]+)\)/g, '$1'); } else { matchResult.value = results === null || results === false ? `${results}` : results || []; }