mirror of
https://github.com/wassname/slider.git
synced 2026-09-09 11:35:22 +08:00
refactor: remove prefixCls for Handle
This commit is contained in:
+2
-3
@@ -12,7 +12,7 @@ export default class Handle extends React.Component {
|
||||
|
||||
render() {
|
||||
const props = this.props;
|
||||
const {className, prefixCls, offset, tipTransitionName, value} = props;
|
||||
const {className, tipTransitionName, offset, value} = props;
|
||||
const {dragging, noTip} = props;
|
||||
|
||||
const style = { left: offset + '%' };
|
||||
@@ -27,7 +27,7 @@ export default class Handle extends React.Component {
|
||||
|
||||
const isTooltipVisible = dragging || this.state.isTooltipVisible;
|
||||
return (<Tooltip
|
||||
prefixCls={prefixCls + '-tooltip'}
|
||||
prefixCls={className.replace('handle', 'tooltip')}
|
||||
placement={{points: ['bc', 'tc']}}
|
||||
visible={isTooltipVisible}
|
||||
overlay={<span>{value}</span>}
|
||||
@@ -51,7 +51,6 @@ export default class Handle extends React.Component {
|
||||
|
||||
Handle.propTypes = {
|
||||
className: React.PropTypes.string,
|
||||
prefixCls: React.PropTypes.string,
|
||||
offset: React.PropTypes.number,
|
||||
tipTransitionName: React.PropTypes.string,
|
||||
value: React.PropTypes.number,
|
||||
|
||||
+2
-3
@@ -193,9 +193,8 @@ class Slider extends React.Component {
|
||||
onTouchStart={disabled ? noop : this.onTouchStart.bind(this)}
|
||||
onMouseDown={disabled ? noop : this.onSliderMouseDown.bind(this)}>
|
||||
{track}
|
||||
<Handle className={handleClassName} prefixCls={prefixCls}
|
||||
offset={offset} tipTransitionName={tipTransitionName} value={value}
|
||||
dragging={dragging} noTip={marksLen > 0} />
|
||||
<Handle className={handleClassName} tipTransitionName={tipTransitionName}
|
||||
offset={offset} value={value} dragging={dragging} noTip={marksLen > 0} />
|
||||
{steps}
|
||||
{mark}
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user