diff --git a/ui/src/views/problem/component/CreateProblemDialog.vue b/ui/src/views/problem/component/CreateProblemDialog.vue index c1575fde1..2546f8aec 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')