Fixed #1836 - For Checkbox
parent
2a62d2696a
commit
947d902c1b
|
@ -1,19 +1,77 @@
|
|||
interface CheckboxProps {
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export interface CheckboxProps {
|
||||
/**
|
||||
* Value of the checkbox.
|
||||
*/
|
||||
value?: any;
|
||||
/**
|
||||
* Value binding of the checkbox.
|
||||
*/
|
||||
modelValue?: any;
|
||||
/**
|
||||
* Allows to select a boolean value instead of multiple values.
|
||||
*/
|
||||
binary?: boolean;
|
||||
/**
|
||||
* Style class of the component input field.
|
||||
*/
|
||||
class?: string;
|
||||
/**
|
||||
* Inline style of the component.
|
||||
*/
|
||||
style?: any;
|
||||
/**
|
||||
* Value in checked state.
|
||||
*/
|
||||
trueValue?: any;
|
||||
/**
|
||||
* Value in unchecked state.
|
||||
*/
|
||||
falseValue?: any;
|
||||
}
|
||||
|
||||
declare class Checkbox {
|
||||
$props: CheckboxProps;
|
||||
$emit(eventName: 'update:page', value: any): this;
|
||||
$emit(eventName: 'click', event: Event): this;
|
||||
$emit(eventName: 'change', event: Event): this;
|
||||
$emit(eventName: 'input', value: boolean): this;
|
||||
export interface CheckboxSlots {
|
||||
}
|
||||
|
||||
export declare type CheckboxEmits = {
|
||||
/**
|
||||
* Emitted when the page changes.
|
||||
* @param {*} value - New page value.
|
||||
*/
|
||||
'update:page': (value: any) => void;
|
||||
/**
|
||||
* Callback to invoke on value click.
|
||||
* @param {MouseEvent} event - Browser event.
|
||||
*/
|
||||
'click': (event: MouseEvent) => void;
|
||||
/**
|
||||
* Callback to invoke on value change.
|
||||
* @param {Event} event - Browser event.
|
||||
*/
|
||||
'change': (event: Event) => void;
|
||||
/**
|
||||
* Callback to invoke on value change.
|
||||
* @param {boolean} value - New value.
|
||||
*/
|
||||
'input': (value: boolean) => void;
|
||||
}
|
||||
|
||||
declare class Checkbox extends ClassComponent<CheckboxProps, CheckboxSlots, CheckboxEmits> { }
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface GlobalComponents {
|
||||
Checkbox: GlobalComponentConstructor<Checkbox>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Checkbox is an extension to standard checkbox element with theming.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Checkbox](https://www.primefaces.org/primevue/showcase/#/checkbox)
|
||||
*
|
||||
*/
|
||||
export default Checkbox;
|
||||
|
|
Loading…
Reference in New Issue