Fixed #1836 - For PanelMenu

pull/1846/head
mertsincan 2021-12-01 17:01:11 +03:00
parent 1f5e16ed71
commit d75cda39c6
1 changed files with 59 additions and 11 deletions

View File

@ -1,19 +1,67 @@
interface PanelMenuProps { import { VNode } from 'vue';
model?: any[]; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
expandedKeys?: any; import { MenuItem } from '../menuitem';
exact?: boolean;
export interface PanelMenuExpandedKeys {
[key: string]: any;
} }
interface PanelMenuItemSlotInterface { export interface PanelMenuProps {
item: any; /**
* An array of menuitems.
*/
model?: MenuItem[] | undefined;
/**
* A map of keys to represent the expansion state in controlled mode.
* @see PanelMenuExpandedKeys
*/
expandedKeys?: PanelMenuExpandedKeys;
/**
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
*/
exact?: boolean | undefined;
} }
declare class PanelMenu { export interface PanelMenuSlots {
$props: PanelMenuProps; /**
$emit(eventName: 'update:expandedKeys', value: any): this; * Custom content for each item.
$slots: { * @param {Object} scope - item slot's params.
item: PanelMenuItemSlotInterface; */
item: (scope: {
/**
* Menuitem instance
*/
item: MenuItem;
}) => VNode[];
}
export declare type PanelMenuEmits = {
/**
* Emitted when the expandedKeys changes.
* @param {*} value - New value.
*/
'update:expandedKeys': (value: any) => void;
}
declare class PanelMenu extends ClassComponent<PanelMenuProps, PanelMenuSlots, PanelMenuEmits> { }
declare module '@vue/runtime-core' {
interface GlobalComponents {
PanelMenu: GlobalComponentConstructor<PanelMenu>
} }
} }
/**
*
* PanelMenu is a hybrid of Accordion and Tree components.
*
* Helper API:
*
* - [MenuItem](https://www.primefaces.org/primevue/showcase/#/menumodel)
*
* Demos:
*
* - [PanelMenu](https://www.primefaces.org/primevue/showcase/#/panelmenu)
*
*/
export default PanelMenu; export default PanelMenu;