update image thumb
This commit is contained in:
@@ -151,6 +151,7 @@ import type { Customer } from "@/types/Customer";
|
||||
import type { EventItem } from "@/types/EventItem";
|
||||
import type { PointAction } from "@/types/Point";
|
||||
import { getEventNumberValuePlaceholder, resolveEventNumberValue } from "@/utils/eventValue";
|
||||
import { getAttachmentReadURL } from "@/utils/attachment";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
import { loadSourceValueConfig, type SourceValueConfig } from "@/utils/point";
|
||||
import { compressUploadImage, compressUploadImageList } from "@/utils/imageCompression";
|
||||
@@ -261,6 +262,7 @@ type CustomerAttachmentType = "PHOTO" | "POINT_CARD" | "OTHER";
|
||||
type QuickCustomerPhoto = {
|
||||
attachment?: Attachment;
|
||||
attachType: CustomerAttachmentType;
|
||||
previewUrl?: string;
|
||||
tempFileId?: string;
|
||||
url: string;
|
||||
};
|
||||
@@ -530,7 +532,8 @@ function syncCustomerPhoto(customer?: Customer): void {
|
||||
.map(item => ({
|
||||
attachment: item,
|
||||
attachType: normalizeCustomerAttachmentType(item.attachType),
|
||||
url: AttachmentAPI.getReadURL(item.id || "")
|
||||
previewUrl: getAttachmentReadURL(item.id || ""),
|
||||
url: getAttachmentReadURL(item.id || "", 64)
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
>
|
||||
<template #leftIcon>
|
||||
<t-image
|
||||
v-if="getEventRecordPhotoURL(item)"
|
||||
:src="getEventRecordPhotoURL(item)"
|
||||
v-if="getEventRecordPhotoURL(item, 64)"
|
||||
:src="getEventRecordPhotoURL(item, 64)"
|
||||
:alt="item.event?.name || '未知事件'"
|
||||
fit="cover"
|
||||
class="record-photo"
|
||||
|
||||
Reference in New Issue
Block a user