Skip to content

Commit 8dd69b8

Browse files
committed
update rate
1 parent 1403b6b commit 8dd69b8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/components/rate/index.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@
1515
font-size: 20px;
1616
margin-right: 12px;
1717
}
18-
.rate-icon:before {
19-
content: '\e634';
20-
}
2118
.rate-icon__stared {
2219
color: #ff4400;
2320
top: -1px;
2421
}
25-
.rate-icon__stared:before {
26-
content: '\e6a6';
27-
}
2822
}
2923
.rate-container__horizontal {
3024
display: flex;

src/components/rate/index.wpy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<view class="rate-title">{{title}}</view>
55
<view class="rate-content">
66
<repeat for="{{[1, 2, 3, 4, 5]}}" key="index" index="index" item="item">
7-
<icon class="rate-icon {{value>index?'rate-icon__stared':''}}" type="star" event="star"/>
7+
<icon1 wx:if="{{value>index}}" class="rate-icon rate-icon__stared" type="starbg" event="star"/>
8+
<icon2 wx:else class="rate-icon" type="stargap" event="star"/>
89
</repeat>
910
<view class="rate-desc" wx:if="{{value>0}}">{{desc[value-1]}}</view>
1011
</view>
@@ -44,7 +45,8 @@
4445
}
4546
}
4647
components = {
47-
icon: Icon
48+
icon1: Icon,
49+
icon2: Icon
4850
}
4951
events = {
5052
star (e) {

0 commit comments

Comments
 (0)