diff --git a/components/slider/index.jsx b/components/slider/index.jsx index 734debb74b..2ab533425c 100644 --- a/components/slider/index.jsx +++ b/components/slider/index.jsx @@ -81,6 +81,7 @@ const Slider = { tooltipVisible, tooltipPlacement, getTooltipPopupContainer, + vertical, } = this.$props; const { visibles } = this; const isTipFormatter = tipFormatter ? visibles[index] || dragging : false; @@ -90,7 +91,7 @@ const Slider = { prefixCls: tooltipPrefixCls, title: tipFormatter ? tipFormatter(value) : '', visible, - placement: tooltipPlacement || 'top', + placement: tooltipPlacement || vertical ? 'right' : 'top', transitionName: 'zoom-down', overlayClassName: `${prefixCls}-tooltip`, getPopupContainer: getTooltipPopupContainer || (() => document.body), diff --git a/components/slider/style/index.less b/components/slider/style/index.less index c9f3bc9186..69954a0502 100644 --- a/components/slider/style/index.less +++ b/components/slider/style/index.less @@ -160,7 +160,7 @@ } .@{slider-prefix-cls}-handle { - margin-bottom: -7px; + margin-top: -6px; // we chould consider border width as well: (10 + 2 ) / 2 margin-left: -5px; }