TabMenu d.ts updated
parent
757609cc44
commit
a20d44448c
|
@ -1,7 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu.
|
||||
*
|
||||
* [Live Demo](https://www.primevue.org/tabmenu/)
|
||||
*
|
||||
* @module tabmenu
|
||||
*
|
||||
*/
|
||||
import { VNode } from 'vue';
|
||||
import { MenuItem } from '../menuitem';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
/**
|
||||
* Custom change event.
|
||||
* @see {@link TabMenuEmits['tab-change']}
|
||||
*/
|
||||
export interface TabMenuChangeEvent {
|
||||
/**
|
||||
* Browser event
|
||||
|
@ -13,6 +26,9 @@ export interface TabMenuChangeEvent {
|
|||
index: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid properties in TabMenu component.
|
||||
*/
|
||||
export interface TabMenuProps {
|
||||
/**
|
||||
* An array of menuitems.
|
||||
|
@ -20,12 +36,12 @@ export interface TabMenuProps {
|
|||
model?: MenuItem[] | undefined;
|
||||
/**
|
||||
* Defines if active route highlight should match the exact route path.
|
||||
* Default value is true.
|
||||
* @defaultValue true
|
||||
*/
|
||||
exact?: boolean | undefined;
|
||||
/**
|
||||
* Active index of menuitem.
|
||||
* Default value is 0.
|
||||
* @defaultValue 0
|
||||
*/
|
||||
activeIndex?: number | undefined;
|
||||
/**
|
||||
|
@ -38,27 +54,45 @@ export interface TabMenuProps {
|
|||
'aria-labelledby'?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid slots in TabMenu component.
|
||||
*/
|
||||
export interface TabMenuSlots {
|
||||
/**
|
||||
* Custom content for each item.
|
||||
* @param {Object} scope - item slot's params.
|
||||
*/
|
||||
item: (scope: {
|
||||
item(scope: {
|
||||
/**
|
||||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
}) => VNode[];
|
||||
}): VNode[];
|
||||
}
|
||||
|
||||
export declare type TabMenuEmits = {
|
||||
/**
|
||||
* Defines valid emits in TabMenu component.
|
||||
*/
|
||||
export interface TabMenuEmits {
|
||||
/**
|
||||
* Callback to invoke when an active tab is changed.
|
||||
* @param {TabMenuChangeEvent} event - Custom tab change event.
|
||||
*/
|
||||
'tab-change': (event: TabMenuChangeEvent) => void;
|
||||
};
|
||||
'tab-change'(event: TabMenuChangeEvent): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* **PrimeVue - TabMenu**
|
||||
*
|
||||
* _TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu._
|
||||
*
|
||||
* [Live Demo](https://www.primevue.org/tabmenu/)
|
||||
* --- ---
|
||||
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||
*
|
||||
* @group Component
|
||||
*
|
||||
*/
|
||||
declare class TabMenu extends ClassComponent<TabMenuProps, TabMenuSlots, TabMenuEmits> {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
|
@ -67,13 +101,4 @@ declare module '@vue/runtime-core' {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [TabMenu](https://www.primefaces.org/primevue/tabmenu)
|
||||
*
|
||||
*/
|
||||
export default TabMenu;
|
||||
|
|
Loading…
Reference in New Issue