import React__default from 'react'; import { Tabs } from 'antd'; import { TabsProps } from 'antd/lib/tabs'; interface ITabsProps extends Omit { isHeader?: boolean; isContent?: boolean; /** 多tab列表,flex模式 */ isFlex?: boolean; marginTop?: boolean; marginBottom?: boolean; /** 开启sticky布局 */ isSticky?: boolean; stickyTop?: number; /** 无边框 */ nonBorder?: boolean; /** * 自定义items * 增加type 页签的状态 * 已完成: completed 绿色: #6DD400 * 未填写: incomplete 红色: #FF6666 * 部分填写: partially 黄色: #F7B500 */ items?: IItems[]; /** 是否显示右侧提示状态 */ isTypeMessage?: boolean; /** 提供一种设置页签状态的非受控模式 */ isUnContolled?: boolean; } interface ITabState { [prop: string]: IType; } type ExtractedItems = Required>; type ExtractedTab = ExtractedItems["items"][number]; /** * 页签的状态 * 已完成: completed 绿色: #6DD400 * 未填写: incomplete 红色: #FF6666 * 部分填写: partially 黄色: #F7B500 **/ interface IItems extends ExtractedTab { type?: IType; } type IType = "completed" | "incomplete" | "partially"; interface ITabsRef { changeTabState: (tabState: ITabState) => void; } interface TabsComponent extends React__default.ForwardRefExoticComponent> { TabPane: typeof Tabs.TabPane; } export { IItems, ITabState, ITabsProps, ITabsRef, IType, TabsComponent };