Skip to content

Progress 进度条

用于展示操作进度。

基础用法

50%
75%
100%
vue
<template>
  <x-progress :percentage="50" />
</template>

<script setup>
import { Progress } from '@xto/data'
</script>

不同状态

100%
80%
30%
vue
<template>
  <x-progress :percentage="100" status="success" />
  <x-progress :percentage="80" status="warning" />
  <x-progress :percentage="30" status="exception" />
</template>

环形进度条

75%
100%
vue
<template>
  <x-progress type="circle" :percentage="75" />
</template>

API

Props

属性说明类型默认值
percentage百分比number0
type类型'line' | 'circle' | 'dashboard''line'
status状态'' | 'success' | 'warning' | 'exception'''
strokeWidth进度条的宽度number6
color进度条背景色string | string[] | Function'#409eff'
width环形进度条画布宽度number126
showText是否显示进度条文字内容booleantrue

基于 MIT 许可发布