@tarojs/components
Version:
1 lines • 1.12 kB
JavaScript
import{r as s,h as r,H as e}from"./p-d0cabaaa.js";const i=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:i,borderRadius:o,fontSize:t,strokeWidth:a,activeColor:n,backgroundColor:l,active:p}=this,c=s>100?100:s<0?0:s,d=p?"width 1s ease-in-out":"none";return r(e,{class:"weui-progress"},r("div",{class:"weui-progress__bar",style:{height:a+"px",backgroundColor:l}},r("div",{class:"weui-progress__inner-bar",style:{width:`${c}%`,transition:d,WebkitTransition:d,backgroundColor:n,borderRadius:o?`${o}px`:"0px"}})),i&&r("div",{class:"weui-progress__opr",style:{"font-size":`${t}px`}},r("span",null,c,"%")))}};i.style=".weui-progress{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.weui-progress__bar{background-color:#ebebeb;-ms-flex:1;flex:1;height:3px}.weui-progress__inner-bar{background-color:#09bb07;width:0;height:100%}.weui-progress__opr{margin-left:15px;font-size:0;display:block}";export{i as taro_progress_core}