微信小程序自定义五星好评组件
- 效果图
- 新建组件目录:evaluation_star
- 在json文件中配置"component": true
- wxml文件
<view class="total">
<view
class="list"
wx:for="{
{ stars_list }}"
wx:key="index"
>
<view class="item_star">
<image
class="star"
src="{
{ item }}"
mode="aspectFit|aspectFill|widthFix"
bind:tap="addStar"
data-index="{
{index}}"
></image>
</view>
</view>
<view class=