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.
 
 
 

96 lines
2.8 KiB

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