Rate


评分组件,支持配置ICON。

默认用法
  1. <nut-rate
  2. :num="5"
  3. :currValue="3"
  4. ></nut-rate>

可配置图片路径,需同时配置图片的高度和宽度
  1. <nut-rate
  2. :num="10"
  3. :currValue="4"
  4. originalPath="初始图片路径"
  5. :picWidth="0.32"
  6. :picHeight="0.31"
  7. activePath="激活图片路径"
  8. ></nut-rate>

Props
参数说明类型默认值可选值
num评分的个数Number5
originalPath评分中初始图片的路径String
activePath评分中激活后图片的路径String
picHeight评分图片的高度,单位remNumber0.5
picWidth评分图片的宽度,单位remNumber0.5
currValue当前值Number0
Events
事件名说明回调参数
change-rate点击评分图片时触发的事件返回点击的索引值