statusbar

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TickCmd

func TickCmd() tea.Cmd

TickCmd 返回定时器命令

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model 状态栏组件模型

func New

func New() Model

New 创建新的状态栏组件

func (Model) Elapsed

func (m Model) Elapsed() time.Duration

Elapsed 返回已用时间

func (Model) Init

func (m Model) Init() tea.Cmd

Init 实现 tea.Model 接口

func (*Model) SetSize

func (m *Model) SetSize(width int)

SetSize 设置状态栏宽度

func (*Model) SetStage

func (m *Model) SetStage(name string, index, total int)

SetStage 设置当前阶段

func (*Model) SetTasks

func (m *Model) SetTasks(done, total int)

SetTasks 设置任务进度

func (*Model) Start

func (m *Model) Start()

Start 开始计时

func (*Model) Stop

func (m *Model) Stop()

Stop 停止计时

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

Update 实现 tea.Model 接口

func (Model) View

func (m Model) View() string

View 渲染状态栏

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL