Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

75 řádky
2.3 KiB

  1. import { defineMixin } from '../../libs/vue'
  2. import RadioDefaultProps from './radio'
  3. import { registerComponentProps } from '../../libs/config/props.js'
  4. const defProps = registerComponentProps(RadioDefaultProps)
  5. export const props = defineMixin({
  6. props: {
  7. // radio的名称
  8. name: {
  9. type: [String, Number, Boolean],
  10. default: () => defProps.radio.name
  11. },
  12. // 形状,square为方形,circle为圆型
  13. shape: {
  14. type: String,
  15. default: () => defProps.radio.shape
  16. },
  17. // 是否禁用
  18. disabled: {
  19. type: [String, Boolean],
  20. default: () => defProps.radio.disabled
  21. },
  22. // 是否禁止点击提示语选中单选框
  23. labelDisabled: {
  24. type: [String, Boolean],
  25. default: () => defProps.radio.labelDisabled
  26. },
  27. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  28. activeColor: {
  29. type: String,
  30. default: () => defProps.radio.activeColor
  31. },
  32. // 未选中的颜色
  33. inactiveColor: {
  34. type: String,
  35. default: () => defProps.radio.inactiveColor
  36. },
  37. // 图标的大小,单位px
  38. iconSize: {
  39. type: [String, Number],
  40. default: () => defProps.radio.iconSize
  41. },
  42. // label的字体大小,px单位
  43. labelSize: {
  44. type: [String, Number],
  45. default: () => defProps.radio.labelSize
  46. },
  47. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  48. label: {
  49. type: [String, Number],
  50. default: () => defProps.radio.label
  51. },
  52. // 整体的大小
  53. size: {
  54. type: [String, Number],
  55. default: () => defProps.radio.size
  56. },
  57. // 图标颜色
  58. color: {
  59. type: String,
  60. default: () => defProps.radio.color
  61. },
  62. // label的颜色
  63. labelColor: {
  64. type: String,
  65. default: () => defProps.radio.labelColor
  66. },
  67. // 图标颜色
  68. iconColor: {
  69. type: String,
  70. default: () => defProps.radio.iconColor
  71. }
  72. }
  73. })