@opensig/opendesign
Version:
103 lines (102 loc) • 2.38 kB
TypeScript
import { ExtractPropTypes, PropType } from 'vue';
import { ColorT } from '../_utils/types';
export declare const RateItemStatusTypes: readonly ["full", "half", "empty"];
export type RateItemStatusT = (typeof RateItemStatusTypes)[number];
export declare const RateSizeTypes: readonly ["large", "medium"];
export type RateSizeT = (typeof RateSizeTypes)[number];
export declare const rateProps: {
/**
* @zh-CN 评分总数
* @en-US Total number of ratings
* @default 5
*/
count: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 选中数量
* @en-US Selected count
*/
modelValue: {
type: NumberConstructor;
};
/**
* @zh-CN 非受控默认选中值
* @en-US Uncontrolled default selected count
* @default 0
*/
defaultValue: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 图标尺寸
* @en-US Icon size
*/
size: {
type: PropType<RateSizeT>;
};
/**
* @zh-CN 图标颜色
* @en-US Icon color
* @default 'normal'
*/
color: {
type: PropType<ColorT>;
default: string;
};
/**
* @zh-CN 是否只读
* @en-US Whether to read-only
* @default false
*/
readonly: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 是否支持半选
* @en-US Whether to support half selection
* @default false
*/
allowHalf: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 是否支持可清空
* @en-US Whether to support clearable
* @default false
*/
clearable: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 提示文字(数组长度应该等于count)
* @en-US Prompt text (The length of the array should equal to count)
*/
labels: {
type: PropType<Array<string>>;
};
};
export declare const rateItemProps: {
/**
* @zh-CN 序号
* @en-US Index
*/
index: {
type: NumberConstructor;
};
/**
* @zh-CN 状态
* @en-US Status
* @default 'empty'
*/
status: {
type: PropType<RateItemStatusT>;
default: string;
};
};
export type RatePropsT = ExtractPropTypes<typeof rateProps>;