Progress 进度条

用于展示操作进度,告知用户当前状态和预期。

线形进度条 — 百分比外显

Progress 组件设置percentage属性即可,表示进度条对应的百分比,必填,必须在 0-100。

1 <el-progress :percentage="0"></el-progress>
2 <el-progress :percentage="70"></el-progress>
3 <el-progress :percentage="100" status="success"></el-progress>
4 <el-progress :percentage="50" status="exception"></el-progress>
View Code

 

线形进度条 — 百分比内显

百分比不占用额外控件,适用于文件上传等场景。

Progress 组件可通过 stroke-width 属性更改进度条的高度,并可通过 text-inside 属性来将进度条描述置于进度条内部。

1 <el-progress :text-inside="true" :stroke-width="18" :percentage="0"></el-progress>
2 <el-progress :text-inside="true" :stroke-width="18" :percentage="70"></el-progress>
3 <el-progress :text-inside="true" :stroke-width="18" :percentage="100" status="success"></el-progress>
4 <el-progress :text-inside="true" :stroke-width="18" :percentage="50" status="exception"></el-progress>
View Code

 

环形进度条

Progress 组件可通过 type 属性来指定使用环形进度条,在环形进度条中,还可以通过 width 属性来设置其大小。

1 <el-progress type="circle" :percentage="0"></el-progress>
2 <el-progress type="circle" :percentage="25"></el-progress>
3 <el-progress type="circle" :percentage="100" status="success"></el-progress>
4 <el-progress type="circle" :percentage="50" status="exception"></el-progress>
View Code

 

Attributes

参数说明类型可选值默认值
percentage百分比(必填)number0-1000
type进度条类型stringline/circleline
stroke-width进度条的宽度,单位 pxnumber6
text-inside进度条显示文字内置在进度条内(只在 type=line 时可用)Booleanfalse
status进度条当前状态stringsuccess/exception
width环形进度条画布宽度(只在 type=circle 时可用)number 126
show-text是否显示进度条文字内容booleantrue

转载于:https://www.cnblogs.com/grt322/p/8564427.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值