You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

4 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 最小可选值
  6. min: {
  7. type: [Number, String],
  8. default: () => defProps.slider.min
  9. },
  10. // 最大可选值
  11. max: {
  12. type: [Number, String],
  13. default: () => defProps.slider.max
  14. },
  15. // 步长,取值必须大于 0,并且可被(max - min)整除
  16. step: {
  17. type: [Number, String],
  18. default: () => defProps.slider.step
  19. },
  20. // #ifdef VUE3
  21. // 当前取值
  22. modelValue: {
  23. type: [String, Number],
  24. default: () => defProps.slider.value
  25. },
  26. // #endif
  27. // #ifdef VUE2
  28. // 当前取值
  29. value: {
  30. type: [String, Number],
  31. default: () => defProps.slider.value
  32. },
  33. // #endif
  34. // 滑块右侧已选择部分的背景色
  35. activeColor: {
  36. type: String,
  37. default: () => defProps.slider.activeColor
  38. },
  39. // 滑块左侧未选择部分的背景色
  40. inactiveColor: {
  41. type: String,
  42. default: () => defProps.slider.inactiveColor
  43. },
  44. // 滑块的大小,取值范围为 12 - 28
  45. blockSize: {
  46. type: [Number, String],
  47. default: () => defProps.slider.blockSize
  48. },
  49. // 滑块的颜色
  50. blockColor: {
  51. type: String,
  52. default: () => defProps.slider.blockColor
  53. },
  54. // 禁用状态
  55. disabled: {
  56. type: Boolean,
  57. default: () => defProps.slider.disabled
  58. },
  59. // 是否显示当前的选择值
  60. showValue: {
  61. type: Boolean,
  62. default: () => defProps.slider.showValue
  63. }
  64. }
  65. })