From 4c6c668a3ee9630c5077096eb678e83c4a63ac79 Mon Sep 17 00:00:00 2001 From: Kagura Date: Thu, 21 Nov 2024 22:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90TODO=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TodoList.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TodoList.tsx b/src/TodoList.tsx index 41cc039..9e4df93 100644 --- a/src/TodoList.tsx +++ b/src/TodoList.tsx @@ -16,6 +16,14 @@ function TodoItems({ items, setItems }: { items: todoItem[], setItems: React.Dispatch> }) { + if (items.length == 0){ // 空 + return ( +
+

暂时没有TODO项目

+

从下面添加新的 TODO↓

+
+ )} + return ( <>