Skip to content

Commit 8cf2b17

Browse files
committed
fix: button icon align
1 parent 53eb4cf commit 8cf2b17

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

miniprogram/pages/detail/index.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@
139139
transform: translateY(0);
140140
}
141141

142-
&__button {
143-
display: flex;
144-
align-items: center;
142+
&__text {
143+
line-height: 36rpx;
145144
}
146145

147146
&__icon {

miniprogram/pages/detail/index.wxml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@
5151
<view class="actions actions--{{done ? 'active' : ''}}">
5252
<t-button-group>
5353
<t-button t-class="actions__button" size="large" block data-type="liked" bind:tap="toggleStarOrLike">
54-
<t-icon name="heart{{liked ? '-filled' : ''}}" color="{{liked ? '#e34d59' : ''}}" size="36rpx" class="actions__icon"/> {{likeds ? likeds + ' 人' : ''}}喜欢
54+
<t-icon name="heart{{liked ? '-filled' : ''}}" color="{{liked ? '#e34d59' : ''}}" size="36rpx" class="actions__icon"/>
55+
<text class="actions__text">{{likeds ? likeds + ' 人' : ''}}喜欢</text>
5556
</t-button>
5657
<t-button t-class="actions__button" size="large" block data-type="starred" bind:tap="toggleStarOrLike">
57-
<t-icon name="star{{starred ? '-filled' : ''}}" color="{{starred ? '#ed7b2f': ''}}" size="36rpx" class="actions__icon"/> 收藏
58+
<t-icon name="star{{starred ? '-filled' : ''}}" color="{{starred ? '#ed7b2f': ''}}" size="36rpx" class="actions__icon"/>
59+
<text class="actions__text">收藏</text>
5860
</t-button>
5961
</t-button-group>
6062
</view>

0 commit comments

Comments
 (0)