tabs.d.ts 699 B

123456789101112131415161718
  1. import type { TabPaneProps, TabsProps } from 'element-plus/es/components/tabs';
  2. import type { ComputedRef, InjectionKey, Ref, Slots, UnwrapRef } from 'vue';
  3. export declare type TabsPaneContext = UnwrapRef<{
  4. uid: number;
  5. slots: Slots;
  6. props: TabPaneProps;
  7. paneName: ComputedRef<string | number | undefined>;
  8. active: ComputedRef<boolean>;
  9. index: Ref<string | undefined>;
  10. isClosable: ComputedRef<boolean>;
  11. }>;
  12. export interface TabsRootContext {
  13. props: TabsProps;
  14. currentName: Ref<string | number>;
  15. registerPane: (pane: TabsPaneContext) => void;
  16. unregisterPane: (uid: number) => void;
  17. }
  18. export declare const tabsRootContextKey: InjectionKey<TabsRootContext>;