Fixed #1836 - For TieredMenu
parent
ce338c32d8
commit
e6617526e4
|
@ -1,24 +1,98 @@
|
||||||
interface TieredMenuProps {
|
import { VNode } from 'vue';
|
||||||
popup?: boolean;
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
model?: any[];
|
import { MenuItem } from '../menuitem';
|
||||||
appendTo?: string;
|
|
||||||
autoZIndex?: boolean;
|
type TieredMenuAppandToType = 'body' | 'self' | string | undefined;
|
||||||
baseZIndex?: number;
|
|
||||||
exact?: boolean;
|
export interface TieredMenuProps {
|
||||||
|
/**
|
||||||
|
* An array of menuitems.
|
||||||
|
*/
|
||||||
|
model?: MenuItem[] | undefined;
|
||||||
|
/**
|
||||||
|
* Defines if menu would displayed as a popup.
|
||||||
|
*/
|
||||||
|
popup?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
||||||
|
* @see TieredMenuAppandToType
|
||||||
|
* Default value is 'body'.
|
||||||
|
*/
|
||||||
|
appendTo?: TieredMenuAppandToType;
|
||||||
|
/**
|
||||||
|
* Whether to automatically manage layering.
|
||||||
|
* Default value is true.
|
||||||
|
*/
|
||||||
|
autoZIndex?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* Base zIndex value to use in layering.
|
||||||
|
* Default value is 0.
|
||||||
|
*/
|
||||||
|
baseZIndex?: number | undefined;
|
||||||
|
/**
|
||||||
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
|
* Default value is true.
|
||||||
|
*/
|
||||||
|
exact?: boolean | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TieredMenuItemSlotInterface {
|
export interface TieredMenuSlots {
|
||||||
item: any;
|
/**
|
||||||
|
* Custom content for each item.
|
||||||
|
* @param {Object} scope - item slot's params.
|
||||||
|
*/
|
||||||
|
item: (scope: {
|
||||||
|
/**
|
||||||
|
* Menuitem instance
|
||||||
|
*/
|
||||||
|
item: MenuItem;
|
||||||
|
}) => VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class TieredMenu {
|
export declare type TieredMenuEmits = {
|
||||||
$props: TieredMenuProps;
|
}
|
||||||
toggle(event: Event): void;
|
|
||||||
show(event: Event, target?: any): void;
|
declare class TieredMenu extends ClassComponent<TieredMenuProps, TieredMenuSlots, TieredMenuEmits> {
|
||||||
|
/**
|
||||||
|
* Toggles the visibility of the overlay.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*
|
||||||
|
* @memberof TieredMenu
|
||||||
|
*/
|
||||||
|
toggle: (event: Event) => void;
|
||||||
|
/**
|
||||||
|
* Shows the overlay.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
* @param {*} [target] - Optional target if event.target would not be used
|
||||||
|
*
|
||||||
|
* @memberof TieredMenu
|
||||||
|
*/
|
||||||
|
show: (event: Event, target?: any) => void;
|
||||||
|
/**
|
||||||
|
* Hides the overlay.
|
||||||
|
*
|
||||||
|
* @memberof TieredMenu
|
||||||
|
*/
|
||||||
hide(): void;
|
hide(): void;
|
||||||
$slots: {
|
}
|
||||||
item: TieredMenuItemSlotInterface;
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
interface GlobalComponents {
|
||||||
|
TieredMenu: GlobalComponentConstructor<TieredMenu>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* TieredMenu displays submenus in nested overlays.
|
||||||
|
*
|
||||||
|
* Helper API:
|
||||||
|
*
|
||||||
|
* - [MenuItem](https://www.primefaces.org/primevue/showcase/#/menumodel)
|
||||||
|
*
|
||||||
|
* Demos:
|
||||||
|
*
|
||||||
|
* - [TieredMenu](https://www.primefaces.org/primevue/showcase/#/tieredmenu)
|
||||||
|
*
|
||||||
|
*/
|
||||||
export default TieredMenu;
|
export default TieredMenu;
|
||||||
|
|
Loading…
Reference in New Issue