tabs.d.ts 784 B

12345678910111213141516171819202122232425262728
  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. /** Hook function before switching tab. If false or a Promise is returned and then is rejected, switching will be prevented */
  19. beforeLeave: () => boolean | Promise<any>
  20. }