UNPKG

@tplc/wot

Version:

120 lines (119 loc) 2.21 kB
import type { PropType } from 'vue' export declare const rateProps: { /** * 评分最大值 * 类型: number * 默认值: 5 */ num: { type: NumberConstructor default: number } /** * 当前分数,使用v-model进行双向绑定 * 类型: string | number | null * 默认值: null */ modelValue: { type: PropType<string | number | null> default: null } /** * 是否只读 * 类型: boolean * 默认值: false */ readonly: { type: BooleanConstructor default: boolean } /** * 图标大小 * 类型: string * 默认值: '16px' */ size: { type: PropType<string> default: string } /** * 图标间距 * 类型: string * 默认值: '4px' */ space: { type: PropType<string> default: string } /** * 未选中的图标颜色 * 类型: string * 默认值: '#E8E8E8' */ color: { type: PropType<string> default: string } /** * 选中的图标颜色,支持传颜色数组(用于分段颜色) * 类型: string | Array<string> * 默认值: 'linear-gradient(180deg, rgba(255,238,0,1) 0%,rgba(250,176,21,1) 100%)' */ activeColor: { type: PropType<string | Array<string>> default: string } /** * 未选中的图标类名 * 类型: string * 默认值: 'star-on' */ icon: { type: PropType<string> default: string } /** * 选中的图标类名 * 类型: string * 默认值: 'star-on' */ activeIcon: { type: PropType<string> default: string } /** * 是否禁用 * 类型: boolean * 默认值: false */ disabled: { type: BooleanConstructor default: boolean } /** * 禁用的图标颜色 * 类型: string * 默认值: 'linear-gradient(315deg, rgba(177,177,177,1) 0%,rgba(199,199,199,1) 100%)' */ disabledColor: { type: PropType<string> default: string } /** * 是否允许半选 * 类型: boolean * 默认值: false */ allowHalf: { type: BooleanConstructor default: boolean } customStyle: { type: PropType<string> default: string } customClass: { type: PropType<string> default: string } }