0.0.1 • Published 5 years ago

bee-progress v0.0.1

Weekly downloads
44
License
MIT
Repository
github
Last release
5 years ago

bee-progress

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react bee-progress component for tinper-bee

some description...

依赖

  • react >= 15.3.0
  • react-dom >= 15.3.0
  • prop-types >= 15.6.0

使用方法

import Progress from 'bee-progress';
import 'bee-progress/build/Progress.css';

API

各类型共用的属性。

参数说明类型默认值
type类型,可选 line circle dashboardstringline
format内容的模板函数function(percent, successPercent)percent => percent + '%'
percent百分比number0
showInfo是否显示进度数值或状态图标booleantrue
status状态,可选:success exception normal active(仅限 line)string-
strokeLinecapEnum{ 'round', 'square' }round
strokeColor进度条的色彩string-
successPercent已完成的分段百分比number0

type="line"

参数说明类型默认值
strokeWidth进度条线的宽度,单位 pxnumber10
strokeColor进度条的色彩,传入 object 时为渐变string | { from: string; to: string; direction: string }-

type="circle"

参数说明类型默认值
width圆形进度条画布宽度,单位 pxnumber132
strokeWidth圆形进度条线的宽度,单位是进度条画布宽度的百分比number6
strokeColor圆形进度条线的色彩,传入 object 时为渐变string | object-

type="dashboard"

参数说明类型默认值
width仪表盘进度条画布宽度,单位 pxnumber132
strokeWidth仪表盘进度条线的宽度,单位是进度条画布宽度的百分比number6
gapDegree仪表盘进度条缺口角度,可取值 0 ~ 360number0
gapPosition仪表盘进度条缺口位置Enum{ 'top', 'bottom', 'left', 'right' }top

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-progress
$ cd bee-progress
$ npm install
$ npm run dev