Skip to content
On this page

基本使用

通过 percent 传入数字

html
<uvProgress :percent="60" />

不显示百分比

通过 show-percent关闭

html
<uvProgress :percent="60" :show-percent="false" />

外部百分比显示

通过 inset-percent关闭内部百分比显示外部

html
<uvProgress :percent="60" :inset-percent="false" />

修改颜色和高度

通过 height 修改进度条高度,通过 track-color 修改轨道的背景颜色,通过 progress-color修改进度条的颜色

html
<uvProgress
  :percent="60"
  height="15px"
  track-color="#fff"
  progress-color="#1989fa"
/>

props

属性含义类型默认值
percent进度条百分比Number0
showPercent是否显示进度条百分比文字Booleantrue
insetPercent文字内部显示Booleantrue
trackColor轨道背景颜色String-
progressColor进度条颜色String-
height进度条高度String-

css变量

css
--uv-progress-height: 12px;
  --uv-progress-content-border-radius: 100px;
  --uv-progress-content-length-bg-color: #19be6b;
  --uv-progress-transition-time: 0.3s;
  --uv-progress-inset-num-color: #ffffff;
  --uv-progress-inset-num-padding-right: 5px;
  --uv-progress-inset-num-font-size: 12px;
  --uv-progress-out-num-font-size: 14px;
  --uv-progress-out-num-width: 40px;
  --uv-progress-out-num-padding: 0 10px;
  --uv-progress-out-num-color: #c8c9cc;

Released under the MIT License.