@aplus-frontend/ui
Version:
69 lines (68 loc) • 1.36 kB
TypeScript
import { TooltipProps } from '@aplus-frontend/antdv/es/tooltip';
export interface ApTagProps {
/**
* 标签类型
*/
type?: 'purely' | 'border';
/**
* 标签内容
*/
text: string;
/**
* 标签颜色
*/
color?: string;
/**
* 标签大小
*/
size?: 'small' | 'middle' | 'large';
/**
* 是否禁用
* @default false
*/
disabled?: boolean;
/**
* 固定宽度为标签内容的宽度
* @description 主要用于标签组
* @default false
*/
fixedWidth?: boolean;
}
export type EllipsisProps = {
/**
* 省略号标志
* @default 'icon' - 内置图标不能自定义
* @type 'icon' | 'text'
*/
symbol?: 'icon' | 'text';
/**
* 省略号文本 - symbol为text时生效
*/
text?: string;
/**
* 省略号颜色 - symbol为icon时生效
* @default #34B77C
*/
iconColor?: string;
/**
* 省略号气泡内容
*/
tooltip?: Omit<TooltipProps, 'trigger' | 'title'>;
};
export interface ApTagGroupProps {
/**
* 标签组内容
*/
list: ApTagProps[];
/**
* 标签之间间距
* @default 4
*/
space?: number;
/**
* 省略号颜色
* @default #34B77C
*/
ellipsisColor?: string;
ellipsis?: EllipsisProps;
}