progressbar

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 进度条组件模型

func New

func New() Model

New 创建新的进度条组件

func (Model) GetPercent

func (m Model) GetPercent() float64

GetPercent 获取百分比

func (Model) Init

func (m Model) Init() tea.Cmd

Init 实现 tea.Model 接口

func (Model) RenderWithTitle

func (m Model) RenderWithTitle(title string) string

RenderWithTitle 带标题渲染

func (*Model) SetMessage

func (m *Model) SetMessage(msg string)

SetMessage 设置进度消息

func (*Model) SetProgress

func (m *Model) SetProgress(current, total int) tea.Cmd

SetProgress 设置进度

func (*Model) SetSize

func (m *Model) SetSize(width int)

SetSize 设置组件宽度

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