props.js 2.1 KB

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