jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/Badge/props.d.ts
2024-11-10 15:01:22 +08:00

54 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { IBaseProps } from '../_base';
/**
* @description 徽标,红点、数字或文字。用于告诉用户待处理的事物或更新数。
*/
export interface IBadgeProps extends IBaseProps {
/**
* @description badge 类型
* @default dot
*/
type?: 'dot' | 'number' | 'text' | 'bubble';
/**
* @description 数字内容,超过 99 会自动变成 99+
*/
number?: number;
/**
* @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;
/**
* @description 是否有描边
* @default false
*/
stroke?: boolean;
/**
* @description 背景色
*/
bgColor?: string;
}
export declare const BadgeDefaultProps: Partial<IBadgeProps>;