props.d.ts 896 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { IBaseProps } from '../_util/base';
  2. export interface ITabsProps extends IBaseProps {
  3. /**
  4. * @description 类型,basic(基础),capsule(胶囊),mixin(混合)
  5. * @default "basic"
  6. */
  7. type: 'basic' | 'capsule' | 'mixin';
  8. /**
  9. * @description tabs方向
  10. */
  11. direction: 'horizontal' | 'vertical';
  12. /**
  13. * @description tab 切换时的回调
  14. */
  15. onChange: (index: number, e: Record<string, any>) => void;
  16. /**
  17. * @description 选项
  18. */
  19. current: number;
  20. /**
  21. * @description 列表
  22. */
  23. items: {
  24. title: string;
  25. content: string;
  26. disabled?: boolean;
  27. }[];
  28. /**
  29. * 选项初始值
  30. */
  31. defaultCurrent: number;
  32. /**
  33. * 滚动方式,direction为horizontal生效
  34. */
  35. scrollMode: 'edge' | 'center';
  36. }
  37. export declare const TabsDefaultProps: Partial<ITabsProps>;