change type in PhotoScroller

This commit is contained in:
Timi
2026-08-24 17:53:21 +08:00
parent 9b843fc921
commit f42e865430
9 changed files with 316 additions and 35 deletions
+6 -2
View File
@@ -53,7 +53,8 @@
<div class="photo">
<photo-scroller
v-model="photoList"
:photo-items="photoItemList"
v-model:photo-items="photoItemList"
:edit-mode="true"
:add-actions="photoAddActions"
:loading="isPhotoUploading"
@add-photo="openPhotoPicker('PHOTO')"
@@ -581,7 +582,10 @@ onUnmounted(() => {
function buildAttachmentList(): Attachment[] {
return photoItemList.value.flatMap(item => {
if (item.attachment) {
return [item.attachment];
return [{
...item.attachment,
attachType: item.attachType || item.attachment.attachType || "PHOTO"
}];
}
if (item.tempFileId) {
return [{