|
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-circle-progress/u-circle-progress"],{727:function(t,e,r){"use strict";r.r(e);var n=r(728),i=r(730);for(var o in i)"default"!==o&&function(t){r.d(e,t,(function(){return i[t]}))}(o);r(732);var s,c=r(17),u=Object(c["default"])(i["default"],n["render"],n["staticRenderFns"],!1,null,"b1742f34",null,!1,n["components"],s);u.options.__file="uview-ui/components/u-circle-progress/u-circle-progress.vue",e["default"]=u.exports},728:function(t,e,r){"use strict";r.r(e);var n=r(729);r.d(e,"render",(function(){return n["render"]})),r.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),r.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),r.d(e,"components",(function(){return n["components"]}))},729:function(t,e,r){"use strict";var n;r.r(e),r.d(e,"render",(function(){return i})),r.d(e,"staticRenderFns",(function(){return s})),r.d(e,"recyclableRender",(function(){return o})),r.d(e,"components",(function(){return n}));var i=function(){var t=this,e=t.$createElement;t._self._c},o=!1,s=[];i._withStripped=!0},730:function(t,e,r){"use strict";r.r(e);var n=r(731),i=r.n(n);for(var o in n)"default"!==o&&function(t){r.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},731:function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={name:"u-circle-progress",props:{percent:{type:Number,default:0,validator:function(t){return t>=0&&t<=100}},inactiveColor:{type:String,default:"#ececec"},activeColor:{type:String,default:"#19be6b"},borderWidth:{type:[Number,String],default:14},width:{type:[Number,String],default:200},duration:{type:[Number,String],default:1500},type:{type:String,default:""},bgColor:{type:String,default:"#ffffff"}},data:function(){return{elBgId:"uCircleProgressBgId",elId:"uCircleProgressElId",widthPx:t.upx2px(this.width),borderWidthPx:t.upx2px(this.borderWidth),startAngle:-Math.PI/2,progressContext:null,newPercent:0,oldPercent:0}},watch:{percent:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>100&&(t=100),t<0&&(r=0),this.newPercent=t,this.oldPercent=r,setTimeout((function(){e.drawCircleByProgress(r)}),50)}},created:function(){this.newPercent=this.percent,this.oldPercent=0},computed:{circleColor:function(){return["success","error","info","primary","warning"].indexOf(this.type)>=0?this.$u.color[this.type]:this.activeColor}},mounted:function(){var t=this;setTimeout((function(){t.drawProgressBg(),t.drawCircleByProgress(t.oldPercent)}),50)},methods:{drawProgressBg:function(){var e=t.createCanvasContext(this.elBgId,this);e.setLineWidth(this.borderWidthPx),e.setStrokeStyle(this.inactiveColor),e.beginPath();var r=this.widthPx/2;e.arc(r,r,r-this.borderWidthPx,0,2*Math.PI,!1),e.stroke(),e.draw()},drawCircleByProgress:function(e){var r=this,n=this.progressContext;n||(n=t.createCanvasContext(this.elId,this),this.progressContext=n),n.setLineCap("round"),n.setLineWidth(this.borderWidthPx),n.setStrokeStyle(this.circleColor);var i=Math.floor(this.duration/100),o=2*Math.PI/100*e+this.startAngle;n.beginPath();var s=this.widthPx/2;if(n.arc(s,s,s-this.borderWidthPx,this.startAngle,o,!1),n.stroke(),n.draw(),this.newPercent>this.oldPercent){if(e++,e>this.newPercent)return}else if(e--,e<this.newPercent)return;setTimeout((function(){r.drawCircleByProgress(e)}),i)}}};e.default=r}).call(this,r(1)["default"])},732:function(t,e,r){"use strict";r.r(e);var n=r(733),i=r.n(n);for(var o in n)"default"!==o&&function(t){r.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},733:function(t,e,r){}}]);
- //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-circle-progress/u-circle-progress.js.map
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'uview-ui/components/u-circle-progress/u-circle-progress-create-component',
- {
- 'uview-ui/components/u-circle-progress/u-circle-progress-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('1')['createComponent'](__webpack_require__(727))
- })
- },
- [['uview-ui/components/u-circle-progress/u-circle-progress-create-component']]
- ]);
|