slider.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { VNode } from 'vue';
  2. import { ElementUIComponent } from './component'
  3. export interface SliderTooltipFormat {
  4. /**
  5. * Format the displayed value of Slider
  6. *
  7. * @param value Value of the Slider
  8. * @returns formatted value
  9. */
  10. (value: number): string
  11. }
  12. /** Slider Component */
  13. export declare class ElSlider extends ElementUIComponent {
  14. /** Current value of the slider */
  15. value: number | number[]
  16. /** Minimum value */
  17. min: number
  18. /** Maximum value */
  19. max: number
  20. /** Whether Slider is disabled */
  21. disabled: boolean
  22. /** Step size */
  23. step: number
  24. /** Whether to display an input box, works when range is false */
  25. showInput: boolean
  26. /** Format of displayed tooltip value */
  27. formatTooltip: SliderTooltipFormat
  28. /** Whether to display control buttons when show-input is true */
  29. showInputControls: boolean
  30. /** Size of the input box */
  31. inputSize: string
  32. /** Whether to display breakpoints */
  33. showStops: boolean
  34. /** Whether to display tooltip value */
  35. showTooltip: boolean
  36. /** Whether to select a range */
  37. range: boolean
  38. /** Vertical mode */
  39. vertical: boolean
  40. /** Slider height, required in vertical mode */
  41. height: boolean
  42. /** Debounce delay when typing, in milliseconds, works when show-input is true */
  43. debounce: number
  44. /** Custom class name for the tooltip */
  45. tooltipClass: string
  46. /** Custom marks */
  47. marks: {
  48. [key: number]: string | { style: object; label: string | VNode }
  49. }
  50. }