0.1.2 • Published 2 years ago
canvas-react-timeline v0.1.2
canvas-react-timeline
快速上手
安装
npm install canvas-react-timeline
## 例子
import CanvasTimeLine from "canvas-react-timeline";
const getTime=(time)=>{
console.log(time)
}
<CanvasTimeLine canvasHeight={100} canvasWidth={1000} mouseMoveTime={getTime}/>
Api
参数 | 说明 | 是否必填 | 类型 | 默认值 |
---|---|---|---|---|
canvasHeight | 高 | true | string | 无 |
canvasWidth | 宽 | true | string | 无 |
mouseMoveTime | 鼠标移动获取时间 | true | function | 无 |
fontColor | 时间字体颜色 | false | string | rgba(20, 223, 235, 1) |
canvasColor | 时间刻度尺颜色 | false | string | rgba(20, 223, 235, 1) |