From c29f4c6481e8c66cc744fdc26863e72e75f1d807 Mon Sep 17 00:00:00 2001 From: callmeyan Date: Tue, 7 Jan 2025 22:48:30 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20feat:=20=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/result/index.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/pages/result/index.vue b/src/pages/result/index.vue index f587fe8..530c9ef 100644 --- a/src/pages/result/index.vue +++ b/src/pages/result/index.vue @@ -117,7 +117,7 @@ function testExpression(item: ResultExpression) { notification.info({ message: '提示', description: `${item.title}:${value}`, - duration: 2 + duration: 0 }) } catch (e) { modal.warning({ @@ -134,15 +134,19 @@ function parseExpression(str: string) { if (!doc.content || doc.content.length == 0) { return ''; } - const expressionList = doc.content[0].content; - if (!expressionList) return ''; - const expression = expressionList.map(item => { - if (item.type == 'text') { - return item.text; - } - return item.attrs.id - }).join(''); - return expression; + const expList: string[] = []; + doc.content.forEach(p=>{ + const expressionList = p.content; + if (!expressionList) return; + const expression = expressionList.map(item => { + if (item.type == 'text') { + return item.text; + } + return item.attrs.id + }).join(''); + expList.push(expression); + }) + return expList.join(''); // console.log(JSON.stringify({content:doc.content[0].content})) }