1.3.2 • Published 7 years ago

sanyuelanv-circle v1.3.2

Weekly downloads
41
License
ISC
Repository
github
Last release
7 years ago

sanyuelanv-circle-progress

安装

  npm install --save sanyuelanv-circle

使用

  import Circle from 'sanyuelanv-circle'
  <Circle
    current = {this.state.current}
    startPoint = {0}
    gradientDirection = {"horizontal"}
    gradient = {
      [
        {offset:0,color:"rgb(255,255,0)",opacity:1},
        {offset:50,color:"rgb(255,0,0)",opacity:1},
      ]
    }
  />

参见例子:demo文件夹

参数

所有参数使用props传递。

参数名字说明默认值
sizeint整个svg的宽高,因为是圆形所以只要一个值200
strokeWidthint进度条的宽度10
radiusint进度条所在圆形的半径95
progressColorstring进度条激活的颜色"#249fff"
bottomColorstring进度条未激活的颜色"#cccccc"
progressFillColorstring进度条所在圆形激活的颜色"transparent"
bottomFillColorstring进度条所在圆形未激活的颜色"transparent"
timenumber进度条发生变化动画用时0.5
startPointnumber进度条起始位置0
gradientDirectionstring进度条渐变方向vertical,horizontalvertical
gradientobject进度条渐变配置null
currentnumber进度条当前进度(范围0-1)
showTextBoolean是否显示文字
textStyleobject文字样式(目前只能上下左右居中),type参数是文字显示形式。0:带百分比符号的整型数,1:不带百分比的两位小数,2:不带百分比的整型数{size:12,color:"#555",type:0}
linecapstring进度条两端的样式(round/square)"square"

启动例子

  npm install
  npm run demo
1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago