9.chunk.js 8.68 KB
webpackJsonp([9],{1293:function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(476),i=a(n),s=r(5),o=a(s),l=r(9),p=a(l),c=r(8),u=a(c),f=r(1),d=a(f),h=r(4),y=a(h),m=r(2),v=a(m),k=r(3),g=a(k),W=r(0),b=a(W),C=r(133),x=function(e){function t(e){(0,d.default)(this,t);var r=(0,v.default)(this,(t.__proto__||(0,u.default)(t)).call(this,e));return r.getUpgradeInfo=function(){p.default.callApi({url:"/api/email/base/emailUpgrade",method:"GET"}).then(function(e){var t=e,a=t.completedcount,n=t.totalcount,i=(a/n).toFixed(4);i=Math.round(1e4*i)/100,"1"===e.status&&clearInterval(r.timer),e=(0,o.default)({},e,{percent:i}),r.setState((0,o.default)({},e,{loading:!1}))})},r.state={loading:!0},r.getUpgradeInfo(),r.timer=setInterval(function(){return r.getUpgradeInfo()},5e3),r}return(0,g.default)(t,e),(0,y.default)(t,[{key:"componentWillUnmount",value:function(){clearInterval(this.timer)}},{key:"render",value:function(){var e=this.state,t=e.status,r=e.percent;return e.loading?C.renderLoading:b.default.createElement("div",{className:"email-updrage"},t&&"0"===t&&b.default.createElement("div",{className:"email-updrage-container"},b.default.createElement(i.default,{type:"circle",percent:r,circleWidth:"100%",showInfo:!0}),b.default.createElement("div",{className:"tipinfo"},"\u6a21\u5757\u5347\u7ea7\u4e2d\uff0c\u8bf7\u7a0d\u540e\u8fdb\u5165")),t&&"1"===t&&this.props.children)}}]),t}(W.Component);t.default=x},297:function(e,t,r){"use strict";var a=r(1),n=r.n(a),i=r(2),s=r.n(i),o=r(3),l=r.n(o),p=function(e){return function(e){function t(){return n()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidUpdate=function(){var e=this,t=Date.now(),r=!1;Object.keys(this.paths).forEach(function(a){var n=e.paths[a];if(n){r=!0;var i=n.style;i.transitionDuration=".3s, .3s, .3s, .06s",e.prevTimeStamp&&t-e.prevTimeStamp<100&&(i.transitionDuration="0s, 0s")}}),r&&(this.prevTimeStamp=Date.now())},t.prototype.render=function(){return e.prototype.render.call(this)},t}(e)};t.a=p},298:function(e,t,r){"use strict";r.d(t,"a",function(){return i}),r.d(t,"b",function(){return o});var a=r(16),n=r.n(a),i={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=n.a.oneOfType([n.a.number,n.a.string]),o={className:n.a.string,percent:n.a.oneOfType([s,n.a.arrayOf(s)]),prefixCls:n.a.string,strokeColor:n.a.oneOfType([n.a.string,n.a.arrayOf(n.a.string)]),strokeLinecap:n.a.oneOf(["butt","round","square"]),strokeWidth:s,style:n.a.object,trailColor:n.a.string,trailWidth:s}},476:function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(5),i=a(n),s=r(15),o=a(s),l=r(1),p=a(l),c=r(4),u=a(c),f=r(2),d=a(f),h=r(3),y=a(h),m=r(7),v=a(m),k=r(0),g=a(k),W=r(477),b=r(13),C=a(b),x=function(e){function t(){return(0,p.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,y.default)(t,e),(0,u.default)(t,[{key:"componentWillReceiveProps",value:function(){this.noAppearTransition=!0}},{key:"componentDidMount",value:function(){var e=this;this.props.appearTransition&&setTimeout(function(){e.barRef&&(e.barRef.style.width=e.props.percent+"%")},10)}},{key:"render",value:function(){var e,t=this,r=this.props,a=r.className,n=r.prefixCls,s=r.position,l=r.unfilled,p=r.type,c=r.showInfo,u=r.style,f=void 0===u?{}:u,d=r.barStyle,h=void 0===d?{}:d,y=r.children,m=r.percent,k=r.circleWidth,b=r.strokeWidth,C=r.trailWidth,x=r.strokeLinecap,L={width:this.noAppearTransition||!this.props.appearTransition?m+"%":0,height:0},N=(0,v.default)(n+"-outer",a,(e={},(0,o.default)(e,n+"-fixed-outer","fixed"===s),(0,o.default)(e,n+"-hide-outer",!l),e)),P=(0,v.default)(n+"-circle",a),O=null;if("circle"===p){var w=c&&g.default.createElement("div",{className:n+"-circle-info"},y||m+"%"),_=(0,i.default)({},f,{width:k});O=g.default.createElement("div",{style:_,className:P},g.default.createElement(W.Circle,(0,i.default)({percent:m,strokeWidth:b,trailWidth:C,strokeLinecap:x},this.props)),w)}else O=g.default.createElement("div",{style:f,className:N,role:"progressbar","aria-valuenow":this.props.percent,"aria-valuemin":0,"aria-valuemax":100},g.default.createElement("div",{ref:function(e){return t.barRef=e},className:n+"-bar",style:(0,i.default)({},h,L)}));return O}}]),t}(g.default.Component);x.defaultProps={prefixCls:"am-progress",percent:0,position:"fixed",unfilled:!0,appearTransition:!1,type:"line",showInfo:!1,circleWidth:100,strokeWidth:4,trailWidth:4,strokeLinecap:"round"};var L=(0,C.default)(x,"Progress");window.WeaverMobile&&(window.WeaverMobile.Progress=L),t.default=L,e.exports=t.default},477:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r(478),n=r(479);r.d(t,"Line",function(){return a.a}),r.d(t,"Circle",function(){return n.a}),t.default={Line:a.a,Circle:n.a}},478:function(e,t,r){"use strict";var a=r(5),n=r.n(a),i=r(72),s=r.n(i),o=r(1),l=r.n(o),p=r(2),c=r.n(p),u=r(3),f=r.n(u),d=r(0),h=r.n(d),y=r(297),m=r(298),v=function(e){function t(){var r,a,n;l()(this,t);for(var i=arguments.length,s=Array(i),o=0;o<i;o++)s[o]=arguments[o];return r=a=c()(this,e.call.apply(e,[this].concat(s))),a.paths={},n=r,c()(a,n)}return f()(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.className,a=t.percent,i=t.prefixCls,o=t.strokeColor,l=t.strokeLinecap,p=t.strokeWidth,c=t.style,u=t.trailColor,f=t.trailWidth,d=s()(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth"]);delete d.gapPosition;var y=Array.isArray(a)?a:[a],m=Array.isArray(o)?o:[o],v=p/2,k=100-p/2,g="M "+("round"===l?v:0)+","+v+"\n           L "+("round"===l?k:100)+","+v,W="0 0 100 "+p,b=0;return h.a.createElement("svg",n()({className:i+"-line "+r,viewBox:W,preserveAspectRatio:"none",style:c},d),h.a.createElement("path",{className:i+"-line-trail",d:g,strokeLinecap:l,stroke:u,strokeWidth:f||p,fillOpacity:"0"}),y.map(function(t,r){var a={strokeDasharray:t+"px, 100px",strokeDashoffset:"-"+b+"px",transition:"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},n=m[r]||m[m.length-1];return b+=t,h.a.createElement("path",{key:r,className:i+"-line-path",d:g,strokeLinecap:l,stroke:n,strokeWidth:p,fillOpacity:"0",ref:function(t){e.paths[r]=t},style:a})}))},t}(d.Component);v.propTypes=m.b,v.defaultProps=m.a,t.a=Object(y.a)(v)},479:function(e,t,r){"use strict";var a=r(5),n=r.n(a),i=r(72),s=r.n(i),o=r(1),l=r.n(o),p=r(2),c=r.n(p),u=r(3),f=r.n(u),d=r(0),h=r.n(d),y=r(16),m=r.n(y),v=r(297),k=r(298),g=function(e){function t(){var r,a,n;l()(this,t);for(var i=arguments.length,s=Array(i),o=0;o<i;o++)s[o]=arguments[o];return r=a=c()(this,e.call.apply(e,[this].concat(s))),a.paths={},n=r,c()(a,n)}return f()(t,e),t.prototype.getPathStyles=function(e,t,r,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments[5],s=50-a/2,o=0,l=-s,p=0,c=-2*s;switch(i){case"left":o=-s,l=0,p=2*s,c=0;break;case"right":o=s,l=0,p=-2*s,c=0;break;case"bottom":l=s,c=2*s}var u="M 50,50 m "+o+","+l+"\n     a "+s+","+s+" 0 1 1 "+p+","+-c+"\n     a "+s+","+s+" 0 1 1 "+-p+","+c,f=2*Math.PI*s;return{pathString:u,pathStyle:{stroke:r,strokeDasharray:t/100*(f-n)+"px "+f+"px",strokeDashoffset:"-"+(n/2+e/100*(f-n))+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}},t.prototype.getStokeList=function(){var e=this,t=this.props,r=t.prefixCls,a=t.percent,n=t.strokeColor,i=t.strokeWidth,s=t.strokeLinecap,o=t.gapDegree,l=t.gapPosition,p=Array.isArray(a)?a:[a],c=Array.isArray(n)?n:[n],u=0;return p.map(function(t,a){var n=c[a]||c[c.length-1],p=e.getPathStyles(u,t,n,i,o,l),f=p.pathString,d=p.pathStyle;return u+=t,h.a.createElement("path",{key:a,className:r+"-circle-path",d:f,strokeLinecap:s,strokeWidth:0===t?0:i,fillOpacity:"0",style:d,ref:function(t){e.paths[a]=t}})})},t.prototype.render=function(){var e=this.props,t=e.prefixCls,r=e.strokeWidth,a=e.trailWidth,i=e.gapDegree,o=e.gapPosition,l=e.trailColor,p=e.strokeLinecap,c=e.style,u=e.className,f=s()(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className"]),d=this.getPathStyles(0,100,l,r,i,o),y=d.pathString,m=d.pathStyle;return delete f.percent,delete f.strokeColor,h.a.createElement("svg",n()({className:t+"-circle "+u,viewBox:"0 0 100 100",style:c},f),h.a.createElement("path",{className:t+"-circle-trail",d:y,stroke:l,strokeLinecap:p,strokeWidth:a||r,fillOpacity:"0",style:m}),this.getStokeList())},t}(d.Component);g.propTypes=n()({},k.b,{gapPosition:m.a.oneOf(["top","bottom","left","right"])}),g.defaultProps=n()({},k.a,{gapPosition:"top"}),t.a=Object(v.a)(g)}});
//# sourceMappingURL=9.chunk.js.map?v=0ee06c89