import React from 'react'; import { TagProps } from '@firesoon/antd/lib/tag/index'; import { CheckableTagProps } from '@firesoon/antd/lib/tag/CheckableTag'; export interface Item { /** Tag 内容 */ label: string; /** 支持antd tag所有属性 */ tagProps?: TagProps; /** Tag 唯一标志 */ code?: string; } type Status = 'default' | 'success' | 'warn' | 'error'; /** * TODO:tooltip 提示位置出现滚动条定位的问题 */ export interface FSTagProps extends TagProps { /** 标签显示最大字数,默认为 8 */ length?: number; /** 标签状态 */ type?: Status | 'link'; /** 是否有描边,默认true,展示描边 */ borderd?: boolean; /** 是否是圆角,默认为false,非圆角 */ round?: boolean; /** 标签尺寸,默认为default,高度24 */ size?: 'default' | 'large' | 'small'; } export interface FSTagGroupProps { /** 标签组合数据配置 */ defaultValue: Array; /** 是否展示自定义标签选项 */ hasAdd?: boolean; /** 添加自定义标签 */ onAdd?: (label: string) => void; /** 删除标签 */ closeCallback?: (item: Item) => void; } export type FSCheckableTagProps = CheckableTagProps; export interface TagDecorator extends React.FC { Group: React.FC; CheckableTag: React.ClassicComponentClass; } export {};