'use strict'; var Progressline = require('rc-progress').Line; var Progresscircle = require('rc-progress').Circle; var React = require('react'); var Line = React.createClass({ getDefaultProps: function(){ return { width: "100%", percent: 0, strokeWidth: 1, status: "normal" } }, render() { var style = { "width": this.props.width } var progressInfo if(this.props.status==='normal'){ progressInfo = ( {this.props.percent}% ) }else { progressInfo = ( ) } var statusColorMap = { "normal": "#3FC7FA", "exception": "#FE8C6A" }; return (
{progressInfo}
); } }); var Circle = React.createClass({ getDefaultProps: function(){ return { width: "100px", percent: 0, strokeWidth: 1, status: "normal" } }, render() { var style = { "width": this.props.width, "height": this.props.width } var progressInfo if(this.props.status==='normal'){ progressInfo = ( ) }else { progressInfo = ( {this.props.percent}% ) } var statusColorMap = { "normal": "#3FC7FA", "exception": "#FE8C6A" }; return (
{progressInfo}
); } }); module.exports = { Line: Line, Circle: Circle };