@tarojs/components
Version:
Taro 组件库。
1 lines • 809 B
JavaScript
import{r as s,h as r,H as o}from"./p-f05e1558.js";let t=class{constructor(r){s(this,r),this.percent=0,this.showInfo=!1,this.borderRadius=0,this.fontSize=16,this.strokeWidth=6,this.activeColor="#09BB07",this.backgroundColor="#EBEBEB",this.active=!1}render(){const{percent:s,showInfo:t,borderRadius:i,fontSize:e,strokeWidth:a,activeColor:n,backgroundColor:h,active:c}=this,l=s>100?100:s<0?0:s,p=c?"width 1s ease-in-out":"none";return r(o,{class:"weui-progress"},r("div",{class:"weui-progress__bar",style:{height:a+"px",backgroundColor:h}},r("div",{class:"weui-progress__inner-bar",style:{width:`${l}%`,transition:p,WebkitTransition:p,backgroundColor:n,borderRadius:i?`${i}px`:"0px"}})),t&&r("div",{class:"weui-progress__opr",style:{"font-size":`${e}px`}},r("span",null,l,"%")))}};export{t as taro_progress_core}