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 { VNode } from 'vue';
|
||||||
import { MenuItem } from '../menuitem';
|
import { MenuItem } from '../menuitem';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom change event.
|
||||||
|
* @see {@link TabMenuEmits['tab-change']}
|
||||||
|
*/
|
||||||
export interface TabMenuChangeEvent {
|
export interface TabMenuChangeEvent {
|
||||||
/**
|
/**
|
||||||
* Browser event
|
* Browser event
|
||||||
|
@ -13,6 +26,9 @@ export interface TabMenuChangeEvent {
|
||||||
index: number;
|
index: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in TabMenu component.
|
||||||
|
*/
|
||||||
export interface TabMenuProps {
|
export interface TabMenuProps {
|
||||||
/**
|
/**
|
||||||
* An array of menuitems.
|
* An array of menuitems.
|
||||||
|
@ -20,12 +36,12 @@ export interface TabMenuProps {
|
||||||
model?: MenuItem[] | undefined;
|
model?: MenuItem[] | undefined;
|
||||||
/**
|
/**
|
||||||
* Defines if active route highlight should match the exact route path.
|
* Defines if active route highlight should match the exact route path.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Active index of menuitem.
|
* Active index of menuitem.
|
||||||
* Default value is 0.
|
* @defaultValue 0
|
||||||
*/
|
*/
|
||||||
activeIndex?: number | undefined;
|
activeIndex?: number | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -38,27 +54,45 @@ export interface TabMenuProps {
|
||||||
'aria-labelledby'?: string | undefined;
|
'aria-labelledby'?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in TabMenu component.
|
||||||
|
*/
|
||||||
export interface TabMenuSlots {
|
export interface TabMenuSlots {
|
||||||
/**
|
/**
|
||||||
* Custom content for each item.
|
* Custom content for each item.
|
||||||
* @param {Object} scope - item slot's params.
|
* @param {Object} scope - item slot's params.
|
||||||
*/
|
*/
|
||||||
item: (scope: {
|
item(scope: {
|
||||||
/**
|
/**
|
||||||
* Menuitem instance
|
* Menuitem instance
|
||||||
*/
|
*/
|
||||||
item: MenuItem;
|
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.
|
* Callback to invoke when an active tab is changed.
|
||||||
* @param {TabMenuChangeEvent} event - Custom tab change event.
|
* @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 class TabMenu extends ClassComponent<TabMenuProps, TabMenuSlots, TabMenuEmits> {}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
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;
|
export default TabMenu;
|
||||||
|
|
Loading…
Reference in New Issue