Expand description

封装的 ProgressBar 工具,方便在控制台输出进度

Constructors

constructor

new (description?: string, bar_length?: number): ProgressBar

Properties

bar_length

bar_length: number = 25

进度条的长度(单位:字符),默认设为 25

description

description: string = 'Progress'

命令行开头的文字信息

error

error: string = ''

Methods

render

(opts: {
    completed: number;
    err?: string;
    msg?: string;
    total: number;
}): void