diff --git a/components/vc-slider/demo/handle.jsx b/components/vc-slider/demo/handle.jsx index c3bcb9e0a..a0d4abadd 100644 --- a/components/vc-slider/demo/handle.jsx +++ b/components/vc-slider/demo/handle.jsx @@ -19,17 +19,15 @@ export default { }, render () { const handle = (h, props) => { - const { value, dragging, index, refStr, style, ...restProps } = props + const { value, dragging, index, ref, style, ...restProps } = props const handleProps = { props: { ...restProps, value, }, - attrs: { - refStr, - }, key: index, style, + ref, } return ( { + const handleRange = (h, { value, ref, dragging, index, disabled, style, ...restProps }) => { const tipFormatter = value => `${value}%` const tipProps = {} @@ -85,6 +83,7 @@ export default { style: { ...handleStyleWithIndex, }, + ref, } return ( diff --git a/components/vc-slider/src/Range.jsx b/components/vc-slider/src/Range.jsx index 170bfe447..ad4468683 100644 --- a/components/vc-slider/src/Range.jsx +++ b/components/vc-slider/src/Range.jsx @@ -118,7 +118,7 @@ const Range = { this.onChange({ bounds: nextBounds }) }, onEnd () { - this.setState({ sHandle: null }, this.onBlur) + this.setState({ sHandle: null }, this.blur) this.removeDocumentEvents() this.$emit('afterChange', this.bounds) }, @@ -210,7 +210,7 @@ const Range = { nextHandle = nextBounds.indexOf(value) } this.onChange({ - handle: nextHandle, + sHandle: nextHandle, bounds: nextBounds, }) if (isFromKeyboardEvent) { diff --git a/components/vc-slider/src/createSliderWithTooltip.jsx b/components/vc-slider/src/createSliderWithTooltip.jsx index 06dd657ae..779f1fb06 100644 --- a/components/vc-slider/src/createSliderWithTooltip.jsx +++ b/components/vc-slider/src/createSliderWithTooltip.jsx @@ -6,7 +6,7 @@ import Handle from './Handle' export default function createSliderWithTooltip (Component) { return { - mixins: [BaseMixin], + mixins: [BaseMixin, Component], props: { ...Component.props, tipFormatter: PropTypes.func.def((value) => { return value }),