@opensig/opendesign
Version:
50 lines (49 loc) • 1.37 kB
TypeScript
import { ExtractPropTypes, PropType } from 'vue';
export declare const BadgeColorTypes: readonly ["primary", "success", "warning", "danger"];
export type BadgeColorT = (typeof BadgeColorTypes)[number];
export declare const badgeProps: {
/**
* @zh-CN 徽标内容
* @en-US Content of the badge
*/
value: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* @zh-CN 最大值,超过最大值显示${max}+(仅当 value 类型为 number 时生效)
* @en-US Max value, display ${max}+ if exceeded (only effective when value type is number)
* @default 99
*/
max: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 徽标颜色
* @en-US Color of the badge
* @default 'primary'
*/
color: {
type: PropType<BadgeColorT>;
default: string;
};
/**
* @zh-CN 是否显示为小红点
* @en-US Whether to display as a small red dot
* @default false
*/
dot: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 徽标位置偏移量
* @en-US Badge position offset
*/
offset: {
type: PropType<Array<number | string>>;
default: () => never[];
};
};
export type BadgePropsT = ExtractPropTypes<typeof badgeProps>;