微信小程序星级评分组件
介绍
适用于微信小程序的星级评分组件。
gitee地址:https://gitee.com/lihaogn/rateComponent-miniapp
使用说明
-
组件目录
-
在要添加的页面的json文件中加上下面语句,例如index.json
{ "usingComponents": { "rateStar": "/components/rateStar/rateStar" } }
-
在index.wxml中使用组件
<!--index.wxml--> <view class="container"> <view>评分1</view> <view class="stars"> <rateStar class="stars" rateObject="0" bind:change="getScore" > </rateStar> </view> <view>评分2</view> <view class="stars"> <rateStar class="stars" rateObject="1" bind:change="getScore" > </rateStar> </view> </view>