Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

80 linhas
2.5 KiB

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