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