nativescript-star-ratings-ext
NativeScript 星级评价 UI 组件插件。
npm i --save nativescript-star-ratings-ext

#注意。不会安装其库。这是一个测试项目# 下载正确的库

#FORKED FROM

NativeScript 星级评价

npm npm Build Status

安装

tns plugin add nativescript-star-ratings

配置

重要:确保在页面元素上包含 xmlns:ui="nativescript-star-ratings"

<ui:StarRating emptyBorderColor="white" emptyColor="white" filledBorderColor="black" filledColor="red" value="2" max="5"/>

Angular

import { registerElement } from 'nativescript-angular/element-registry';
registerElement('StarRating', () => require('nativescript-star-ratings').StarRating);
<StarRating emptyBorderColor="white" emptyColor="white" filledBorderColor="black" filledColor="red" value="{{value}}" max="{{max}}" isindicator="false"></StarRating>

API

属性

属性 默认值 类型 必需 描述
emptyBorderColor 蓝色 字符串
  • - [ ]
仅限 iOS
emptyColor 白色 字符串
  • - [ ]
filledBorderColor 蓝色 字符串
  • - [ ]
仅限 iOS
filledColor 蓝色 字符串
  • - [ ]
value 0 数字
  • - [ ]
max 5 数字
  • - [ ]
isindicator false 布尔值
  • - [ ]
仅限 Android

屏幕截图

iOS Android
IOS Android

TODO

  • [ ] 自定义图片