checkbox.d.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import type { ExtractPropTypes } from 'vue';
  2. import type Checkbox from './checkbox.vue';
  3. export type CheckboxValueType = string | number | boolean;
  4. export declare const checkboxProps: {
  5. ariaControls: StringConstructor;
  6. /**
  7. * @description binding value
  8. */
  9. modelValue: {
  10. type: (NumberConstructor | StringConstructor | BooleanConstructor)[];
  11. default: undefined;
  12. };
  13. /**
  14. * @description label of the Checkbox when used inside a `checkbox-group`
  15. */
  16. label: {
  17. type: (ObjectConstructor | NumberConstructor | StringConstructor | BooleanConstructor)[];
  18. default: undefined;
  19. };
  20. /**
  21. * @description value of the Checkbox when used inside a `checkbox-group`
  22. */
  23. value: {
  24. type: (ObjectConstructor | NumberConstructor | StringConstructor | BooleanConstructor)[];
  25. default: undefined;
  26. };
  27. /**
  28. * @description Set indeterminate state, only responsible for style control
  29. */
  30. indeterminate: BooleanConstructor;
  31. /**
  32. * @description whether the Checkbox is disabled
  33. */
  34. disabled: BooleanConstructor;
  35. /**
  36. * @description if the Checkbox is checked
  37. */
  38. checked: BooleanConstructor;
  39. /**
  40. * @description native 'name' attribute
  41. */
  42. name: {
  43. type: StringConstructor;
  44. default: undefined;
  45. };
  46. /**
  47. * @description value of the Checkbox if it's checked
  48. */
  49. trueValue: {
  50. type: (NumberConstructor | StringConstructor)[];
  51. default: undefined;
  52. };
  53. /**
  54. * @description value of the Checkbox if it's not checked
  55. */
  56. falseValue: {
  57. type: (NumberConstructor | StringConstructor)[];
  58. default: undefined;
  59. };
  60. /**
  61. * @deprecated use `trueValue` instead
  62. * @description value of the Checkbox if it's checked
  63. */
  64. trueLabel: {
  65. type: (NumberConstructor | StringConstructor)[];
  66. default: undefined;
  67. };
  68. /**
  69. * @deprecated use `falseValue` instead
  70. * @description value of the Checkbox if it's not checked
  71. */
  72. falseLabel: {
  73. type: (NumberConstructor | StringConstructor)[];
  74. default: undefined;
  75. };
  76. /**
  77. * @description input id
  78. */
  79. id: {
  80. type: StringConstructor;
  81. default: undefined;
  82. };
  83. /**
  84. * @description whether to add a border around Checkbox
  85. */
  86. border: BooleanConstructor;
  87. /**
  88. * @description size of the Checkbox
  89. */
  90. size: {
  91. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
  92. readonly required: false;
  93. readonly validator: ((val: unknown) => boolean) | undefined;
  94. __epPropKey: true;
  95. };
  96. /**
  97. * @description input tabindex
  98. */
  99. tabindex: (NumberConstructor | StringConstructor)[];
  100. /**
  101. * @description whether to trigger form validation
  102. */
  103. validateEvent: {
  104. type: BooleanConstructor;
  105. default: boolean;
  106. };
  107. };
  108. export declare const checkboxEmits: {
  109. "update:modelValue": (val: CheckboxValueType) => val is string | number | boolean;
  110. change: (val: CheckboxValueType) => val is string | number | boolean;
  111. };
  112. export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
  113. export type CheckboxEmits = typeof checkboxEmits;
  114. export type CheckboxInstance = InstanceType<typeof Checkbox> & unknown;