checkbox.d.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import type { ExtractPropTypes, ExtractPublicPropTypes } 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: {
  35. type: BooleanConstructor;
  36. default: undefined;
  37. };
  38. /**
  39. * @description if the Checkbox is checked
  40. */
  41. checked: BooleanConstructor;
  42. /**
  43. * @description native 'name' attribute
  44. */
  45. name: {
  46. type: StringConstructor;
  47. default: undefined;
  48. };
  49. /**
  50. * @description value of the Checkbox if it's checked
  51. */
  52. trueValue: {
  53. type: (NumberConstructor | StringConstructor)[];
  54. default: undefined;
  55. };
  56. /**
  57. * @description value of the Checkbox if it's not checked
  58. */
  59. falseValue: {
  60. type: (NumberConstructor | StringConstructor)[];
  61. default: undefined;
  62. };
  63. /**
  64. * @deprecated use `trueValue` instead
  65. * @description value of the Checkbox if it's checked
  66. */
  67. trueLabel: {
  68. type: (NumberConstructor | StringConstructor)[];
  69. default: undefined;
  70. };
  71. /**
  72. * @deprecated use `falseValue` instead
  73. * @description value of the Checkbox if it's not checked
  74. */
  75. falseLabel: {
  76. type: (NumberConstructor | StringConstructor)[];
  77. default: undefined;
  78. };
  79. /**
  80. * @description input id
  81. */
  82. id: {
  83. type: StringConstructor;
  84. default: undefined;
  85. };
  86. /**
  87. * @description whether to add a border around Checkbox
  88. */
  89. border: BooleanConstructor;
  90. /**
  91. * @description size of the Checkbox
  92. */
  93. size: {
  94. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
  95. readonly required: false;
  96. readonly validator: ((val: unknown) => boolean) | undefined;
  97. __epPropKey: true;
  98. };
  99. /**
  100. * @description input tabindex
  101. */
  102. tabindex: (NumberConstructor | StringConstructor)[];
  103. /**
  104. * @description whether to trigger form validation
  105. */
  106. validateEvent: {
  107. type: BooleanConstructor;
  108. default: boolean;
  109. };
  110. ariaLabel: StringConstructor;
  111. };
  112. export declare const checkboxEmits: {
  113. "update:modelValue": (val: CheckboxValueType) => val is string | number | boolean;
  114. change: (val: CheckboxValueType) => val is string | number | boolean;
  115. };
  116. export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
  117. export type CheckboxPropsPublic = ExtractPublicPropTypes<typeof checkboxProps>;
  118. export type CheckboxEmits = typeof checkboxEmits;
  119. export type CheckboxInstance = InstanceType<typeof Checkbox> & unknown;