3
0

props.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // #ifdef VUE3
  6. // 绑定的值
  7. modelValue: {
  8. type: [String, Number, Boolean],
  9. default: () => defProps.radioGroup.value
  10. },
  11. // #endif
  12. // #ifdef VUE2
  13. // 绑定的值
  14. value: {
  15. type: [String, Number, Boolean],
  16. default: () => defProps.radioGroup.value
  17. },
  18. // #endif
  19. // 是否禁用全部radio
  20. disabled: {
  21. type: Boolean,
  22. default: () => defProps.radioGroup.disabled
  23. },
  24. // 形状,circle-圆形,square-方形
  25. shape: {
  26. type: String,
  27. default: () => defProps.radioGroup.shape
  28. },
  29. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  30. activeColor: {
  31. type: String,
  32. default: () => defProps.radioGroup.activeColor
  33. },
  34. // 未选中的颜色
  35. inactiveColor: {
  36. type: String,
  37. default: () => defProps.radioGroup.inactiveColor
  38. },
  39. // 标识符
  40. name: {
  41. type: String,
  42. default: () => defProps.radioGroup.name
  43. },
  44. // 整个组件的尺寸,默认px
  45. size: {
  46. type: [String, Number],
  47. default: () => defProps.radioGroup.size
  48. },
  49. // 布局方式,row-横向,column-纵向
  50. placement: {
  51. type: String,
  52. default: () => defProps.radioGroup.placement
  53. },
  54. // label的文本
  55. label: {
  56. type: [String],
  57. default: () => defProps.radioGroup.label
  58. },
  59. // label的颜色 (默认 '#303133' )
  60. labelColor: {
  61. type: [String],
  62. default: () => defProps.radioGroup.labelColor
  63. },
  64. // label的字体大小,px单位
  65. labelSize: {
  66. type: [String, Number],
  67. default: () => defProps.radioGroup.labelSize
  68. },
  69. // 是否禁止点击文本操作checkbox(默认 false )
  70. labelDisabled: {
  71. type: Boolean,
  72. default: () => defProps.radioGroup.labelDisabled
  73. },
  74. // 图标颜色
  75. iconColor: {
  76. type: String,
  77. default: () => defProps.radioGroup.iconColor
  78. },
  79. // 图标的大小,单位px
  80. iconSize: {
  81. type: [String, Number],
  82. default: () => defProps.radioGroup.iconSize
  83. },
  84. // 竖向配列时,是否显示下划线
  85. borderBottom: {
  86. type: Boolean,
  87. default: () => defProps.radioGroup.borderBottom
  88. },
  89. // 图标与文字的对齐方式
  90. iconPlacement: {
  91. type: String,
  92. default: () => defProps.radio.iconPlacement
  93. }
  94. }
  95. })