← 教程列表
news

Task 4: TodoInput Component

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 8 阅读

Create the input component for adding todos. **Do:** - Create `src/lib/TodoInput.svelte` - Text input bound to local state - Add button calls `addTodo()` and clears input - Enter key also submits - Disable Add button when input is empty - Add component tests **Verify:** - Tests pass - Component renders input and button ---

← 返回教程列表 AI8899 · 内容仅供学习参考