ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.05k stars 14.63k forks source link

[Feature Request] Fixed number in Slider range component #19788

Open luludada opened 4 years ago

luludada commented 4 years ago

Existing Component

Component Name

Slider

Description

Slider has range, max, min, and two possible value. One of value is set fixed at 0, another one can drag to change value In my website, I tried to construct a slider with a range from -10 to 10. There are two possible value input in slider, one value is 0 and it is fixed. Another value can drag and show the value based on the value to 0.

I initially want to disable one of the value input, but it does not work out, and I want to display like this:

[-30] |---------------------|[0]|-----------<->-----------| [ 30]

It will render the range from 0 to 30, and not from -30 to 30, and 0 as the fixed number in the slider to givespeople

I'm not sure where to start, any suggestions would be appreciated.

Here is my code: https://codepen.io/ymy0801/pen/jOWZvNZ?editable=true%3Dhttps%3A%2F%2Felement.eleme.io%2F

element-bot commented 4 years ago

Translation of this issue:

Existing Component

yes

Component Name

Slider

Description

Zero

Slider has range, max, min, and two possible value. One of value is set fixed at 0, another one can drag to change value In my website, I tried to construct a slider with a range from -10 to 10. There are two possible value input in slider, one value is 0 and it is fixed. Another value can drag and show the value based on the value to 0. I initially want to disable one of the value input, but it does not work out, and I want to display like this:

[-30] |---------------------|[0]|-----------<->-----------| [ 30] It will render the range from 0 to 30, and not from -30 to 30, and 0 as the fixed number in the slider to givespeople

I'm not sure where to start, any suggestions would be appreciated. Here is my code: https://codepen.io/ymy0801/pen/jOWZvNZ?editable=true%3Dhttps%3A%2F%2Felement.eleme.io%2F

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.