perf: 显示逻辑

This commit is contained in:
rd
2025-09-01 17:47:03 +08:00
parent a95bb3496a
commit 6a882309f9
2 changed files with 14 additions and 10 deletions

View File

@ -34,6 +34,7 @@ export default {
const loading = ref(false);
const isVideo = computed(() => dataSource.value.type === EnumManuscriptType.Video);
const showImages = computed(() => !isVideo.value && images.value.length);
const sourceInfo = computed(() => SOURCE_MAP.get(source) ?? DEFAULT_SOURCE_INFO);
const writerCode = computed(() => route.params.writerCode);
const collapsed = computed(() => {
@ -192,7 +193,7 @@ export default {
</div>
{/* 仅图片类型显示图片列表 */}
{!isVideo.value && (
{showImages.value ? (
<div class="desc-img-wrap mt-40px">
{images.value.map((item, index) => (
<div class="desc-img-box" key={index}>
@ -200,7 +201,7 @@ export default {
</div>
))}
</div>
)}
) : null}
</div>
</div>
</div>