SplitButton d.ts updated
parent
c2376c9639
commit
e6af1b56c0
|
@ -1,9 +1,19 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* SplitButton groups a set of commands in an overlay with a default command.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/autocomplete/)
|
||||||
|
*
|
||||||
|
* @module splitbutton
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { ButtonHTMLAttributes, VNode } from 'vue';
|
import { ButtonHTMLAttributes, VNode } from 'vue';
|
||||||
import { MenuItem } from '../menuitem';
|
import { MenuItem } from '../menuitem';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
type SplitButtonAppendToType = 'body' | 'self' | string | undefined | HTMLElement;
|
/**
|
||||||
|
* Defines valid properties in SplitButton component.
|
||||||
|
*/
|
||||||
export interface SplitButtonProps {
|
export interface SplitButtonProps {
|
||||||
/**
|
/**
|
||||||
* Text of the button.
|
* Text of the button.
|
||||||
|
@ -19,22 +29,23 @@ export interface SplitButtonProps {
|
||||||
model?: MenuItem[] | undefined;
|
model?: MenuItem[] | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to automatically manage layering.
|
* Whether to automatically manage layering.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
autoZIndex?: boolean | undefined;
|
autoZIndex?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Base zIndex value to use in layering.
|
* Base zIndex value to use in layering.
|
||||||
* Default value is 0.
|
* @defaultValue 0
|
||||||
*/
|
*/
|
||||||
baseZIndex?: number | undefined;
|
baseZIndex?: number | undefined;
|
||||||
/**
|
/**
|
||||||
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
||||||
* @see SplitButtonAppendToType
|
* Special keywords are 'body' for document body and 'self' for the element itself.
|
||||||
* Default value is true.
|
* @defaultValue body
|
||||||
*/
|
*/
|
||||||
appendTo?: SplitButtonAppendToType;
|
appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
disabled?: boolean | undefined;
|
disabled?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -59,21 +70,39 @@ export interface SplitButtonProps {
|
||||||
menuButtonIcon?: string | undefined;
|
menuButtonIcon?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in SplitButton component.
|
||||||
|
*/
|
||||||
export interface SplitButtonSlots {
|
export interface SplitButtonSlots {
|
||||||
/**
|
/**
|
||||||
* Button part of the content can easily be customized with the default slot instead of using the built-in modes.
|
* Button part of the content can easily be customized with the default slot instead of using the built-in modes.
|
||||||
*/
|
*/
|
||||||
default: () => VNode[];
|
default(): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type SplitButtonEmits = {
|
/**
|
||||||
|
* Defines valid emits in SplitButton component.
|
||||||
|
*/
|
||||||
|
export interface SplitButtonEmits {
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when main button is clicked.
|
* Callback to invoke when main button is clicked.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
*/
|
*/
|
||||||
click: (event: Event) => void;
|
click(event: Event): void;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - SplitButton**
|
||||||
|
*
|
||||||
|
* _SplitButton groups a set of commands in an overlay with a default command._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/splitbutton/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*
|
||||||
|
*/
|
||||||
declare class SplitButton extends ClassComponent<SplitButtonProps, SplitButtonSlots, SplitButtonEmits> {}
|
declare class SplitButton extends ClassComponent<SplitButtonProps, SplitButtonSlots, SplitButtonEmits> {}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
|
@ -82,17 +111,4 @@ declare module '@vue/runtime-core' {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* SplitButton groups a set of commands in an overlay with a default command.
|
|
||||||
*
|
|
||||||
* Helper API:
|
|
||||||
*
|
|
||||||
* - [MenuItem](https://www.primefaces.org/primevue/menumodel)
|
|
||||||
*
|
|
||||||
* Demos:
|
|
||||||
*
|
|
||||||
* - [SplitButton](https://www.primefaces.org/primevue/splitbutton)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export default SplitButton;
|
export default SplitButton;
|
||||||
|
|
Loading…
Reference in New Issue