mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 04:58:16 +08:00
fix: vc-slider Range
This commit is contained in:
parent
e825830079
commit
8e533e6b8e
@ -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 (
|
||||
<Tooltip
|
||||
@ -45,7 +43,7 @@ export default {
|
||||
)
|
||||
}
|
||||
|
||||
const handleRange = (h, { value, dragging, index, disabled, style, ...restProps }) => {
|
||||
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 (
|
||||
|
@ -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) {
|
||||
|
@ -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 }),
|
||||
|
Loading…
Reference in New Issue
Block a user