fix store diary style
This commit is contained in:
@@ -11,6 +11,18 @@
|
||||
underline
|
||||
/>
|
||||
</header>
|
||||
<div v-if="additionalPhotoItemList.length" class="additional-photos-wrapper">
|
||||
<photo-scroller
|
||||
:model-value="additionalPhotoList"
|
||||
:photo-items="additionalPhotoItemList"
|
||||
:show-add="false"
|
||||
:show-remove="false"
|
||||
:show-type-label="false"
|
||||
:show-viewer-actions="false"
|
||||
title="附加照片"
|
||||
v-entrance-transition="140"
|
||||
/>
|
||||
</div>
|
||||
<section class="content" v-entrance-transition="70">
|
||||
<article-view
|
||||
:article="article"
|
||||
@@ -57,11 +69,13 @@
|
||||
import { ArticleView } from "timi-tdesign-mobile";
|
||||
import { DialogPlugin } from "tdesign-mobile-vue";
|
||||
import { PassTimeLabel } from "timi-web";
|
||||
import { UserAPI, useUserStore } from "timi-web-api";
|
||||
import { UserAPI, type Attachment, useUserStore } from "timi-web-api";
|
||||
import StoreDiaryAPI from "@/api/StoreDiaryAPI";
|
||||
import PhotoScroller from "@/components/PhotoScroller.vue";
|
||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
import type { StoreDiary } from "@/types/StoreDiary";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import { getAttachmentReadURL } from "@/utils/attachment";
|
||||
import { buildFallbackAvatar } from "@/utils/avatar";
|
||||
import { getErrorMessage } from "@/utils/error";
|
||||
@@ -87,6 +101,16 @@ const isLoading = ref(false);
|
||||
const isDeleting = ref(false);
|
||||
let loadToken = 0;
|
||||
|
||||
const additionalPhotoItemList = computed<PhotoItem[]>(() => (article.value?.attachmentList || [])
|
||||
.filter(item => item.attachType === "ADDITIONAL" && !!item.id)
|
||||
.map(item => ({
|
||||
attachment: item as Partial<Attachment>,
|
||||
attachType: "ADDITIONAL",
|
||||
previewUrl: getAttachmentReadURL(item.id || ""),
|
||||
url: getAttachmentReadURL(item.id || "", 90)
|
||||
})));
|
||||
const additionalPhotoList = computed(() => additionalPhotoItemList.value.map(item => item.url));
|
||||
|
||||
function resolveAttachmentUrl(attachmentId: string): string {
|
||||
return getAttachmentReadURL(attachmentId);
|
||||
}
|
||||
@@ -222,6 +246,12 @@ onUnmounted(() => navBarStore.clearRight());
|
||||
}
|
||||
}
|
||||
|
||||
.additional-photos-wrapper {
|
||||
margin: 1rem 1rem 0 1rem;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, .2);
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1rem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user