feat: show author follower count on post cards
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<view class="post-card__author">
|
||||
<view class="post-card__identity">
|
||||
<text class="post-card__nickname">{{ post.user?.nickname || '匿名用户' }}</text>
|
||||
<text v-if="post.user?.id" class="post-card__follow-count">关注 {{ formatCount(post.user.fans_count) }}</text>
|
||||
<text v-if="post.is_top" class="post-card__pin">置顶</text>
|
||||
</view>
|
||||
<text class="post-card__time">{{ formatTime(post.create_time) }}</text>
|
||||
@@ -248,10 +249,13 @@ const formatCount = (value: any) => {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__identity { gap: 10rpx; }
|
||||
&__identity {
|
||||
min-width: 0;
|
||||
gap: 9rpx;
|
||||
}
|
||||
|
||||
&__nickname {
|
||||
max-width: 250rpx;
|
||||
max-width: 220rpx;
|
||||
overflow: hidden;
|
||||
color: #202a3b;
|
||||
font-size: 29rpx;
|
||||
@@ -260,6 +264,20 @@ const formatCount = (value: any) => {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__follow-count {
|
||||
min-width: 0;
|
||||
padding: 5rpx 14rpx;
|
||||
border-radius: 999rpx;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.1;
|
||||
white-space: nowrap;
|
||||
background: linear-gradient(135deg, #2480ff 0%, #0d63ed 100%);
|
||||
box-shadow: 0 4rpx 10rpx rgba(20, 104, 245, 0.2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__pin,
|
||||
&__free,
|
||||
&__price {
|
||||
|
||||
Reference in New Issue
Block a user