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.
 
 
 

104 lines
3.1 KiB

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