upper attachment-selector to lib
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user