upper attachment-selector to lib

This commit is contained in:
Timi
2026-10-21 16:24:00 +08:00
parent e40c912dd9
commit c870bcdd39
43 changed files with 678 additions and 1663 deletions
+3 -9
View File
@@ -57,13 +57,8 @@
/>
</header>
<div v-if="additionalPhotoItemList.length" class="additional-photos-wrapper">
<media-selector
:model-value="additionalPhotoList"
:photo-items="additionalPhotoItemList"
:show-add="false"
:show-remove="false"
:show-type-label="false"
:show-viewer-actions="false"
<attachment-selector :readonly="true"
:items="additionalPhotoItemList"
title="附加照片"
v-entrance-transition
/>
@@ -116,7 +111,7 @@ import { DialogPlugin } from "tdesign-mobile-vue";
import { TimeLabel } from "timi-web";
import { UserAPI, type Attachment, useUserStore } from "timi-web-api";
import StoreDiaryAPI from "@/api/StoreDiaryAPI";
import MediaSelector from "@/components/mediaSelector/MediaSelector.vue";
import AttachmentSelector from "@/components/attachmentSelector/AttachmentSelector.vue";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import type { PhotoItem } from "@/types/Photo";
import { getAttachmentReadURL } from "@/utils/attachment";
@@ -184,7 +179,6 @@ const additionalPhotoItemList = computed<PhotoItem[]>(() => (article.value?.atta
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);