fix: show expand control for locked post preview
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
{{ postPreview.summary }}
|
||||
</text>
|
||||
<text v-if="previewCanExpand" class="detail-post-card__expand"
|
||||
:class="{ 'detail-post-card__expand--collapsed': !previewExpanded }"
|
||||
@tap="previewExpanded = !previewExpanded">
|
||||
{{ previewExpanded ? '收起' : '展开' }}
|
||||
</text>
|
||||
@@ -464,6 +465,7 @@ const bilingualBlocks = computed(() => {
|
||||
})
|
||||
const hasBilingualContent = computed(() => bilingualBlocks.value.length > 0)
|
||||
const previewCanExpand = computed(() => {
|
||||
if (post.value?.is_locked) return true
|
||||
if (hasBilingualContent.value) return bilingualBlocks.value.length > 1
|
||||
|
||||
const summary = postPreview.value.summary
|
||||
@@ -1111,6 +1113,15 @@ const formatCommentTime = (value: any) => {
|
||||
color: #1468f5;
|
||||
font-size: 27rpx;
|
||||
white-space: nowrap;
|
||||
|
||||
&--collapsed {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 38rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 38%);
|
||||
}
|
||||
}
|
||||
|
||||
&__bilingual {
|
||||
|
||||
Reference in New Issue
Block a user