perf: add problem filter repeat
This commit is contained in:
parent
bdea68c4e6
commit
88deedad6c
@ -98,9 +98,14 @@ function delProblemHandle(item: any, index: number) {
|
||||
}
|
||||
function addProblemHandle() {
|
||||
if (problemValue.value.trim()) {
|
||||
if (
|
||||
!detail.value?.problem_list.some((item: any) => item.content === problemValue.value.trim())
|
||||
) {
|
||||
detail.value?.problem_list?.push({
|
||||
content: problemValue.value.trim()
|
||||
})
|
||||
}
|
||||
|
||||
problemValue.value = ''
|
||||
isAddProblem.value = false
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user