- toggleHandler(index)"
- />
+
+
+ toggleHandler(index)"
+ :key="todo.text"
+ />
+
+
diff --git a/src/pages/index.vue b/src/pages/index.vue
index a2f3de7..96c3b09 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -10,21 +10,24 @@
--
Gitee
From 2b9b958a1f58c367dbbf4075d9e7474a3c9157f4 Mon Sep 17 00:00:00 2001
From: liangjiajie <953682519@qq.com>
Date: Wed, 28 Aug 2024 16:20:56 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=A2=81=E5=AE=B6=E6=9D=B0=2013128888525?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/index.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 96c3b09..2a765c7 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -19,6 +19,7 @@ const todos = ref([])
const addTodo = () => {
if (
newTodo.value &&
+ newTodo.value.trim() &&
!todos.value.some(todo => todo.text.trim() === newTodo.value.trim())
) {
todos.value.push({ text: newTodo.value, completed: false })
--
Gitee