综合办公系统
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.

props.js 1.0KB

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