Skip to content

Progress 进度条

赛博朋克风格的进度条组件,支持多种主题和百分比显示位置。

基本用法

vue
<template>
  <cyber-progress :percentage="50" />
</template>

主题

组件支持四种赛博朋克主题:neonhologramterminalmatrix

vue
<template>
  <cyber-progress :percentage="60" theme="neon" />
  <cyber-progress :percentage="60" theme="hologram" />
  <cyber-progress :percentage="60" theme="terminal" />
  <cyber-progress :percentage="60" theme="matrix" />
</template>

百分比显示位置

支持在进度条内部或外部显示百分比

vue
<template>
  <cyber-progress :percentage="75" percentage-position="inside" />
  <cyber-progress :percentage="75" percentage-position="outside" />
</template>

隐藏百分比

vue
<template>
  <cyber-progress :percentage="80" :show-percentage="false" />
</template>

禁用动画

vue
<template>
  <cyber-progress :percentage="65" :animated="false" />
</template>

显示状态指示器

vue
<template>
  <cyber-progress :percentage="45" :show-status="true" />
  <cyber-progress :percentage="85" :show-status="true" />
</template>

属性

属性名说明类型可选值默认值
percentage进度百分比number0-1000
theme主题样式stringneon / hologram / terminal / matrixneon
animated是否显示动画boolean-true
showPercentage是否显示百分比boolean-true
percentagePosition百分比显示位置stringinside / outsideoutside
showStatus是否显示状态指示器boolean-false

状态文本

组件会根据进度自动显示状态文本:

  • 0-29%: INITIALIZING
  • 30-59%: PROCESSING
  • 60-89%: LOADING
  • 90-99%: ALMOST
  • 100%: COMPLETE

Relcased under the Mit Lincense.