tabs.d.ts 908 B

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