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.

76 lines
2.3 KiB

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