rc-chart-slider
rc-chart-slider copied to clipboard
使用 context 传递 props?
在 time-gantt 中是这么使用的:
import { DraggingDecorator, DragComponent } from 'rc-chart-slider';
data={{
showPercent,
showStartPercent,
}}
width={CHART_WIDTH}
clickJumpPercent={CLICK_JUMP_PERCENT}
callback={this.callBack}
_dragActions={this.props._dragActions}
/>
props _dragActions 和 data 这两个内部 属性, 可以通过 context 来进行传递, 免除一些操作.