Documentation
¶
Index ¶
- type Model
- func (m *Model) AddTask(task Task)
- func (m *Model) EnsureVisible(taskID string)
- func (m Model) GetProgress() (completed, total int)
- func (m Model) GetTasks() []Task
- func (m Model) Init() tea.Cmd
- func (m Model) RenderWithTitle(title string, width int) string
- func (m *Model) SetShowAll(show bool)
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m *Model) UpdateTaskStatus(taskID string, status types.TaskStatus)
- func (m Model) View() string
- func (m Model) WithTasks(tasks []Task) Model
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model Todo List 组件模型
func (*Model) EnsureVisible ¶ added in v0.0.7
EnsureVisible 将指定任务滚动到可视区域
func (Model) RenderWithTitle ¶
RenderWithTitle 带标题渲染
func (*Model) SetShowAll ¶ added in v0.1.0
SetShowAll 控制是否展开全部任务(完成/失败态)
func (*Model) UpdateTaskStatus ¶
func (m *Model) UpdateTaskStatus(taskID string, status types.TaskStatus)
UpdateTaskStatus 更新任务状态
Click to show internal directories.
Click to hide internal directories.