import Slider from '../index'; import Tooltip from '../../vc-tooltip'; import '../assets/index.less'; import '../../vc-tooltip/assets/bootstrap.less'; const { createSliderWithTooltip } = Slider; function log(value) { console.log(value); //eslint-disable-line } const CustomizedSlider = { data() { return { value: 50, }; }, methods: { onSliderChange(value) { log(value); this.value = value; }, onAfterChange(value) { log(value); }, }, render() { return ( ); }, }; const DynamicBounds = { data() { return { min: 0, max: 100, }; }, methods: { onSliderChange(value) { log(value); this.value = value; }, onAfterChange(value) { log(value); }, onMinChange(e) { this.min = +e.target.value || 0; }, onMaxChange(e) { this.max = +e.target.value || 100; }, }, render() { return (



); }, }; const SliderWithTooltip = createSliderWithTooltip(Slider); export default { render() { const style = { width: '400px', margin: '50px' }; const pStyle = { margin: '20px 0' }; return (

Basic Slider

Basic Slider,`step=20`

Basic Slider,`step=20, dots`

Basic Slider,`step=20, dots, dotStyle={"{borderColor: 'orange'}"}, activeDotStyle= {"{borderColor: 'yellow'}"}`

Slider with tooltip, with custom `tipFormatter`

`${v} %`} tipProps={{ overlayClassName: 'foo' }} onChange={log} />

Slider with custom handle and track style.(old api, will be deprecated)

Slider with custom handle and track style.(The recommended new api)

Basic Slider, disabled

Controlled Slider

Customized Slider

Slider with dynamic `min` `max`

); }, };