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.

54 lines
1.6 KiB

8 months ago
  1. export default {
  2. props: {
  3. // 是否为加载中状态
  4. loading: {
  5. type: Boolean,
  6. default: uni.$u.props.switch.loading
  7. },
  8. // 是否为禁用装填
  9. disabled: {
  10. type: Boolean,
  11. default: uni.$u.props.switch.disabled
  12. },
  13. // 开关尺寸,单位px
  14. size: {
  15. type: [String, Number],
  16. default: uni.$u.props.switch.size
  17. },
  18. // 打开时的背景颜色
  19. activeColor: {
  20. type: String,
  21. default: uni.$u.props.switch.activeColor
  22. },
  23. // 关闭时的背景颜色
  24. inactiveColor: {
  25. type: String,
  26. default: uni.$u.props.switch.inactiveColor
  27. },
  28. // 通过v-model双向绑定的值
  29. value: {
  30. type: [Boolean, String, Number],
  31. default: uni.$u.props.switch.value
  32. },
  33. // switch打开时的值
  34. activeValue: {
  35. type: [String, Number, Boolean],
  36. default: uni.$u.props.switch.activeValue
  37. },
  38. // switch关闭时的值
  39. inactiveValue: {
  40. type: [String, Number, Boolean],
  41. default: uni.$u.props.switch.inactiveValue
  42. },
  43. // 是否开启异步变更,开启后需要手动控制输入值
  44. asyncChange: {
  45. type: Boolean,
  46. default: uni.$u.props.switch.asyncChange
  47. },
  48. // 圆点与外边框的距离
  49. space: {
  50. type: [String, Number],
  51. default: uni.$u.props.switch.space
  52. }
  53. }
  54. }