2024-12-01 11:56:54 +00:00
|
|
|
|
import { IBaseProps } from '../_util/base';
|
2024-11-10 07:01:22 +00:00
|
|
|
|
/**
|
|
|
|
|
* @description 徽标,红点、数字或文字。用于告诉用户待处理的事物或更新数。
|
|
|
|
|
*/
|
|
|
|
|
export interface IBadgeProps extends IBaseProps {
|
2024-12-01 11:56:54 +00:00
|
|
|
|
/**
|
|
|
|
|
* @description badge 类型
|
|
|
|
|
* @default dot
|
|
|
|
|
*/
|
|
|
|
|
type: 'dot' | 'number' | 'text' | 'bubble';
|
|
|
|
|
/**
|
|
|
|
|
* @description 红点内容,为空时表示只显示红点;可以是数字,也可以是文字;如果是数字,超过 99 会自动变成 ...
|
|
|
|
|
*/
|
|
|
|
|
text: string | number;
|
|
|
|
|
/**
|
|
|
|
|
* @description 相对于 children 所在访问,left-top(左上角) top-right(右上角)
|
|
|
|
|
* @default "top-right"
|
|
|
|
|
*/
|
|
|
|
|
position: 'top-left' | 'top-center' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
|
|
|
/**
|
|
|
|
|
* @description 水平方向偏移量(字符串类型,需要带上像素单位)
|
|
|
|
|
* @default "-50%"
|
|
|
|
|
*/
|
|
|
|
|
offsetX: string;
|
|
|
|
|
/**
|
|
|
|
|
* @description 垂直方向偏移量(字符串类型,需要带上像素单位)
|
|
|
|
|
* @default "-50%"
|
|
|
|
|
*/
|
|
|
|
|
offsetY: number | string;
|
|
|
|
|
/**
|
|
|
|
|
* @description 是否有描边
|
|
|
|
|
* @default false
|
|
|
|
|
*/
|
|
|
|
|
stroke: boolean;
|
|
|
|
|
/**
|
|
|
|
|
* @description 背景色
|
|
|
|
|
*/
|
|
|
|
|
bgColor: string;
|
2024-11-10 07:01:22 +00:00
|
|
|
|
}
|
|
|
|
|
export declare const BadgeDefaultProps: Partial<IBadgeProps>;
|
2024-12-01 11:56:54 +00:00
|
|
|
|
export declare const BadgeFunctionalProps: Partial<IBadgeProps>;
|