From afbba723f8ecad435c51e6a7384306ddbeefc7de Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 15 May 2024 10:48:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=B8=BA=E7=A9=BA=E6=97=B6=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=8A=A5=E9=94=99(#432)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/dataset/component/EditParagraphDialog.vue | 4 ++-- ui/src/views/dataset/step/StepSecond.vue | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/views/dataset/component/EditParagraphDialog.vue b/ui/src/views/dataset/component/EditParagraphDialog.vue index 15f82307a..ce53dd781 100644 --- a/ui/src/views/dataset/component/EditParagraphDialog.vue +++ b/ui/src/views/dataset/component/EditParagraphDialog.vue @@ -95,9 +95,9 @@ function delProblemHandle(item: any, index: number) { detail.value.problem_list.splice(index, 1) } function addProblemHandle() { - if (problemValue.value) { + if (problemValue.value.trim()) { detail.value?.problem_list?.push({ - content: problemValue.value + content: problemValue.value.trim() }) problemValue.value = '' isAddProblem.value = false diff --git a/ui/src/views/dataset/step/StepSecond.vue b/ui/src/views/dataset/step/StepSecond.vue index 52b8912fc..59abd10aa 100644 --- a/ui/src/views/dataset/step/StepSecond.vue +++ b/ui/src/views/dataset/step/StepSecond.vue @@ -136,10 +136,10 @@ function changeHandle(val: boolean) { const list = paragraphList.value list.map((item: any) => { item.content.map((v: any) => { - v['problem_list'] = v.title + v['problem_list'] = v.title.trim() ? [ { - content: v.title + content: v.title.trim() } ] : [] @@ -173,10 +173,10 @@ function splitDocument() { if (checkedConnect.value) { list.map((item: any) => { item.content.map((v: any) => { - v['problem_list'] = v.title + v['problem_list'] = v.title.trim() ? [ { - content: v.title + content: v.title.trim() } ] : []