基础内容progress:官方文档
Demo Code:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
Page({ data:{ percent:0 }, onReady:function(){ this.percentAdd(); }, percentAdd:function(e){ var that=this; setInterval(function(){ var cur=that.data.percent; cur++; if(cur==101){ cur=0; } that.setData({ percent:cur }); },100); } })
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<progress percent="20" show-info /> <progress percent="40" stroke-width="12" /> <progress percent="60" color="pink" /> <progress percent="80" active /> <progress percent="{{percent}}" />
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
progress{ margin-top: 20px; margin-left: 5px; margin-right: 5px; }