interface.d.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import type { Key, VueNode } from '../../_util/type';
  2. import type { TabPaneProps } from './TabPanelList/TabPane';
  3. export declare type TabSizeMap = Map<Key, {
  4. width: number;
  5. height: number;
  6. left: number;
  7. top: number;
  8. }>;
  9. export interface TabOffset {
  10. width: number;
  11. height: number;
  12. left: number;
  13. right: number;
  14. top: number;
  15. }
  16. export declare type TabOffsetMap = Map<Key, TabOffset>;
  17. export declare type TabPosition = 'left' | 'right' | 'top' | 'bottom';
  18. export interface Tab extends TabPaneProps {
  19. key: Key;
  20. node: VueNode;
  21. }
  22. export declare type RenderTabBar = (props: {
  23. DefaultTabBar: any;
  24. [key: string]: any;
  25. }) => VueNode;
  26. export interface TabsLocale {
  27. dropdownAriaLabel?: string;
  28. removeAriaLabel?: string;
  29. addAriaLabel?: string;
  30. }
  31. export interface EditableConfig {
  32. onEdit: (type: 'add' | 'remove', info: {
  33. key?: Key;
  34. event: MouseEvent | KeyboardEvent;
  35. }) => void;
  36. showAdd?: boolean;
  37. removeIcon?: () => VueNode;
  38. addIcon?: () => VueNode;
  39. }
  40. export interface AnimatedConfig {
  41. inkBar?: boolean;
  42. tabPane?: boolean;
  43. }
  44. export declare type OnTabScroll = (info: {
  45. direction: 'left' | 'right' | 'top' | 'bottom';
  46. }) => void;
  47. export declare type TabBarExtraPosition = 'left' | 'right';
  48. export declare type TabBarExtraMap = Partial<Record<TabBarExtraPosition, any>>;
  49. export declare type TabBarExtraContent = VueNode;