跳转到正文

组件

进度

显示任务进度。

用法

基础

HTML
<bs:bsui-progress value="64" max="100" label="Building" />

自定义刻度

最大值可以是任意总量,因此步骤计数器无需转换为百分比。

HTML
<bs:bsui-progress value="3" max="8" label="Step 3 of 8" />

构建步骤

纵向排列的多个进度条可展示已完成、正在运行和排队中的流程。

Install dependencies
Compile Tailwind
Warm the cache
HTML
<bs:bsui-stack direction="column" gap="4">
  <bs:bsui-stack direction="column" gap="2">
    <bs:bsui-text content="Install dependencies" variant="label" tag="span" />
    <bs:bsui-progress value="100" max="100" label="Install dependencies" />
  </bs:bsui-stack>
  <bs:bsui-stack direction="column" gap="2">
    <bs:bsui-text content="Compile Tailwind" variant="label" tag="span" />
    <bs:bsui-progress value="72" max="100" label="Compile Tailwind" />
  </bs:bsui-stack>
  <bs:bsui-stack direction="column" gap="2">
    <bs:bsui-text content="Warm the cache" variant="label" tag="span" />
    <bs:bsui-progress value="0" max="100" label="Warm the cache" />
  </bs:bsui-stack>
</bs:bsui-stack>

属性

属性类型默认
value number 0
max number 100
label text —