Menu d.ts updated
parent
097f9c9da7
commit
0668f65d25
|
@ -1,9 +1,19 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Menu is a navigation / command component that supports dynamic and static positioning.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/menu/)
|
||||||
|
*
|
||||||
|
* @module menu
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { VNode } from 'vue';
|
import { VNode } from 'vue';
|
||||||
import { MenuItem } from '../menuitem';
|
import { MenuItem } from '../menuitem';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
type MenuAppendToType = 'body' | 'self' | string | undefined | HTMLElement;
|
/**
|
||||||
|
* Defines valid properties in Menu component.
|
||||||
|
*/
|
||||||
export interface MenuProps {
|
export interface MenuProps {
|
||||||
/**
|
/**
|
||||||
* An array of menuitems.
|
* An array of menuitems.
|
||||||
|
@ -11,27 +21,27 @@ export interface MenuProps {
|
||||||
model?: MenuItem[] | undefined;
|
model?: MenuItem[] | undefined;
|
||||||
/**
|
/**
|
||||||
* Defines if menu would displayed as a popup.
|
* Defines if menu would displayed as a popup.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
popup?: boolean | undefined;
|
popup?: boolean | 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 MenuAppendToType
|
* @defaultValue body
|
||||||
* Default value is 'body'.
|
|
||||||
*/
|
*/
|
||||||
appendTo?: MenuAppendToType;
|
appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
|
||||||
/**
|
/**
|
||||||
* 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;
|
||||||
/**
|
/**
|
||||||
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -48,35 +58,58 @@ export interface MenuProps {
|
||||||
'aria-labelledby'?: string | undefined;
|
'aria-labelledby'?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in Menu component.
|
||||||
|
*/
|
||||||
export interface MenuSlots {
|
export interface MenuSlots {
|
||||||
/**
|
/**
|
||||||
* Custom start template.
|
* Custom start template.
|
||||||
*/
|
*/
|
||||||
start: () => VNode[];
|
start(): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom end template.
|
* Custom end template.
|
||||||
*/
|
*/
|
||||||
end: () => VNode[];
|
end(): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom item template.
|
* Custom item template.
|
||||||
* @param {Object} scope - item slot's params.
|
* @param {Object} scope - item slot's params.
|
||||||
*/
|
*/
|
||||||
item: (scope: { item: MenuItem }) => VNode[];
|
item(scope: {
|
||||||
|
/**
|
||||||
|
* Menuitem instance
|
||||||
|
*/
|
||||||
|
item: MenuItem;
|
||||||
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type MenuEmits = {
|
/**
|
||||||
|
* Defines valid emits in Menu component.
|
||||||
|
*/
|
||||||
|
export interface MenuEmits {
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when the component receives focus.
|
* Callback to invoke when the component receives focus.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
*/
|
*/
|
||||||
focus: (event: Event) => void;
|
focus(event: Event): void;
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when the component loses focus.
|
* Callback to invoke when the component loses focus.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
*/
|
*/
|
||||||
blur: (event: Event) => void;
|
blur(event: Event): void;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - Menu**
|
||||||
|
*
|
||||||
|
* _Menu is a navigation / command component that supports dynamic and static positioning._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/menu/)
|
||||||
|
* --- ---
|
||||||
|
* 
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*
|
||||||
|
*/
|
||||||
declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
|
declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
|
||||||
/**
|
/**
|
||||||
* Toggles the visibility of the overlay.
|
* Toggles the visibility of the overlay.
|
||||||
|
@ -84,14 +117,15 @@ declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
|
||||||
*
|
*
|
||||||
* @memberof Menu
|
* @memberof Menu
|
||||||
*/
|
*/
|
||||||
toggle: (event: Event) => void;
|
toggle(event: Event): void;
|
||||||
/**
|
/**
|
||||||
* Shows the overlay.
|
* Shows the overlay.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
|
* @param {*} [target] - Target element
|
||||||
*
|
*
|
||||||
* @memberof Menu
|
* @memberof Menu
|
||||||
*/
|
*/
|
||||||
show: (event: Event, target?: any) => void;
|
show(event: Event, target?: any): void;
|
||||||
/**
|
/**
|
||||||
* Hides the overlay.
|
* Hides the overlay.
|
||||||
*
|
*
|
||||||
|
@ -106,17 +140,4 @@ declare module '@vue/runtime-core' {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Menu is a navigation / command component that supports dynamic and static positioning.
|
|
||||||
*
|
|
||||||
* Helper API:
|
|
||||||
*
|
|
||||||
* - [MenuItem](https://www.primefaces.org/primevue/menumodel)
|
|
||||||
*
|
|
||||||
* Demos:
|
|
||||||
*
|
|
||||||
* - [Menu](https://www.primefaces.org/primevue/menu)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export default Menu;
|
export default Menu;
|
||||||
|
|
Loading…
Reference in New Issue