import { Component, OnInit } from '@angular/core'; import { Propertiy } from 'src/app/interface/propertiy-interface'; @Component({ selector: 'star-rating-demo', templateUrl: './star-rating-demo.component.html' }) export class StarRatingDemoComponent implements OnInit { properties: Array = [ { name: 'size', value: 'small || middle || large', type: '@Input()', description: '组件中星星大小,默认large,分别对应14px、16px、18px' }, { name: 'enableHalf', value: 'true || false', type: '@Input()', description: '启用半颗星,默认false' }, { name: 'enableClear', value: 'true || false', type: '@Input()', description: '启用再次点击后清除选择,默认false' }, { name: 'disabled', value: 'true || false', type: '@Input()', description: '只读,禁止点击,默认false' }, { name: 'pointSystem', value: '数字number', type: '@Input()', description: '几分制,默认5' }, { name: 'lightColor', value: 'red || #f40 || rgb ...', type: '@Input()', description: '星星亮色,选中星星的颜色,默认#FBDB10,支持css颜色' }, { name: 'darkColor', value: 'red || #f40 || rgb ...', type: '@Input()', description: '星星暗色,未选中星星的颜色,默认#E8E8E8,支持css颜色' }, { name: 'iconClass', value: '字符串', type: '@Input()', description: '评分组件团,默认f-icon-star,支持farris图标库' }, { name: 'toolTipDisabled', value: 'true || false', type: '@Input()', description: '是否显示单个星星上方的提示文字,默认true,不显示' }, { name: 'toolTipContents', value: '数组[]', type: '@Input()', description: '满意度文案,默认["很不满意", "不满意", "一般", "满意", "非常满意"]' }, { name: 'enableScore', value: 'true || false', type: '@Input()', description: '是否显示分数,默认true' }, { name: 'enableSatisfaction', value: 'true || false', type: '@Input()', description: '是否显示满意度的文案,默认false' }, { name: 'valueChange', value: 'EventEmitter', type: '@Output()', description: '点击星星时触发,改变value' } ]; valueAtPointScene1 = 4.7; valueAtPointScene2 = 88; valueAtComplexScene = 4.2; testvalue=3; constructor() { } ngOnInit(): void { } }