import React from 'react'; import type { TabsProps } from 'antd'; import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types'; export interface CardProps { total: number; label: string | React.ReactNode; icon: React.ReactNode; mode?: TabModeEnum; loading?: boolean; [key: string]: any; } export interface ProTabsItemsProps extends CardProps { key: string; children?: React.ReactNode; disabled?: boolean; [key: string]: any; } export interface ProTabsAction { /** 获取发生请求的 useRequest 的 ref */ useRequestRef: Result; } export type TabModeEnum = 'card' | 'line'; export interface ProTabsProps extends Omit { dataSource: ProTabsItemsProps[]; /** 是否开启tab切换查询 */ tabSearch?: boolean; onChange?: (activeKey: string, useRequest: Result) => void; /** card:卡片模式 tab tab模式 */ mode?: TabModeEnum; /** 远程请求接口 */ useRequest?: { service: Service; options?: Options; }; [key: string]: any; }