UNPKG

908 BTypeScriptView Raw
1import { ElementUIComponent } from './component'
2
3export type TabType = 'card' | 'border-card'
4export type TabPosition = 'top' | 'right' | 'bottom' | 'left'
5
6/** Divide data collections which are related yet belong to different types */
7export declare class ElTabs extends ElementUIComponent {
8 /** Type of Tab */
9 type: TabType
10
11 /** Whether Tab is closable */
12 closable: boolean
13
14 /** Whether Tab is addable */
15 addable: boolean
16
17 /** Whether Tab is addable and closable */
18 editable: boolean
19
20 /** Name of the selected tab */
21 value: string
22
23 /** Position of tabs */
24 tabPosition: TabPosition
25
26 /** Whether width of tab automatically fits its container */
27 stretch: Boolean
28
29 /** Hook function before switching tab. If false or a Promise is returned and then is rejected, switching will be prevented */
30 beforeLeave: (activeName: string, oldActiveName: string) => boolean | Promise<any>
31}