From 26a67a61a648581ea8fbbeed0045a93aa31bf1ad Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 9 Apr 2024 18:03:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=97=AE=E9=A2=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/problem/component/CreateProblemDialog.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/views/problem/component/CreateProblemDialog.vue b/ui/src/views/problem/component/CreateProblemDialog.vue index c1575fde..2546f8ae 100644 --- a/ui/src/views/problem/component/CreateProblemDialog.vue +++ b/ui/src/views/problem/component/CreateProblemDialog.vue @@ -75,7 +75,9 @@ const submit = async (formEl: FormInstance | undefined) => { if (!formEl) return await formEl.validate((valid, fields) => { if (valid) { - const arr = form.value.data.split('\n') + const arr = form.value.data.split('\n').filter(function (item: string) { + return item !== '' + }) problem.asyncPostProblem(id, arr, loading).then((res: any) => { MsgSuccess('εˆ›ε»ΊζˆεŠŸ') emit('refresh')