fix: pin free post status to top right

This commit is contained in:
hajimi
2026-08-02 20:24:49 +08:00
parent 0267bdaf51
commit a1ed73b0ec
@@ -11,7 +11,8 @@
</view>
</view>
<view class="post-card__header">
<view class="post-card__header"
:class="{ 'post-card__header--corner-status': !post.is_paid || post.is_unlocked }">
<image class="post-card__avatar" :src="post.user?.avatar || '/static/images/avatar.png'" mode="aspectFill"
@tap.stop="$emit('avatar-tap', post.user_id)" />
<view class="post-card__author">
@@ -22,7 +23,7 @@
</view>
<text class="post-card__time">{{ formatTime(post.create_time) }}</text>
</view>
<view v-if="!post.is_paid || post.is_unlocked" class="post-card__status">
<view v-if="!post.is_paid || post.is_unlocked" class="post-card__status post-card__status--corner">
<text class="post-card__free">免费</text>
<u-icon name="more-dot-fill" size="30" color="#8d96a3" />
</view>
@@ -220,6 +221,11 @@ const formatCount = (value: any) => {
display: flex;
align-items: center;
min-width: 0;
&--corner-status {
padding-right: 132rpx;
box-sizing: border-box;
}
}
&__avatar {
@@ -293,6 +299,13 @@ const formatCount = (value: any) => {
gap: 15rpx;
margin-left: 14rpx;
flex-shrink: 0;
&--corner {
position: absolute;
top: 26rpx;
right: 26rpx;
margin-left: 0;
}
}
&__price { color: #7653d6; background: #f1edff; }