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