From d6278e4451825151743c35c9812248e5e335052a Mon Sep 17 00:00:00 2001 From: dichgrem Date: Mon, 1 Dec 2025 10:26:18 +0800 Subject: [PATCH] feat:edit_todos --- todos/src/App.vue | 7 ++++- todos/src/components/TodoList.vue | 50 +++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/todos/src/App.vue b/todos/src/App.vue index dfa2eed..f40ae7c 100644 --- a/todos/src/App.vue +++ b/todos/src/App.vue @@ -51,6 +51,11 @@ export default { this.todos = this.todos.filter((t) => t.id !== item.id); }, + editTodo({ item, text }) { + item.txt = text; + console.log("编辑 Todo:", item); + }, + toggleTodo(item) { console.log("完成状态切换:", item); }, @@ -75,7 +80,7 @@ export default {