update image thumb

This commit is contained in:
Timi
2026-08-22 01:27:45 +08:00
parent e2af521996
commit 3b56de2430
16 changed files with 69 additions and 38 deletions
+5 -2
View File
@@ -19,6 +19,7 @@
<section v-if="record" class="photo-panel">
<photo-scroller
:model-value="recordPhotoList"
:photo-items="recordPhotoItemList"
:show-add="false"
:show-remove="false"
title="登记照片"
@@ -54,10 +55,12 @@ const record = ref<EventRecord>();
const isLoading = ref(false);
const canUpdateRecord = computed(() => userStore.hasPermissions(permissionCodes.eventRecord.update));
const recordPhotoList = computed(() => {
const recordPhotoItemList = computed(() => {
const url = getEventRecordPhotoURL(record.value);
return url ? [url] : [];
const thumbnailURL = getEventRecordPhotoURL(record.value, 64);
return thumbnailURL ? [{ url: thumbnailURL, previewUrl: url }] : [];
});
const recordPhotoList = computed(() => recordPhotoItemList.value.map(item => item.url));
function getNumberValueText(value: EventRecord): string {
return formatEventNumberValue(value.event, value.numberValue);