props.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. subTitle?: string;
  28. }[];
  29. /**
  30. * 选项初始值
  31. */
  32. defaultCurrent: number;
  33. /**
  34. * 滚动方式,direction为horizontal生效
  35. */
  36. scrollMode: 'edge' | 'center';
  37. /**
  38. * @description tabs bar类名
  39. */
  40. tabsBarClassName?: string;
  41. /**
  42. * @description tab类名
  43. */
  44. tabClassName?: string;
  45. /**
  46. *@description tab active类名
  47. */
  48. tabActiveClassName?: string;
  49. }
  50. export declare const TabsDefaultProps: Partial<ITabsProps>;