update image thumb
This commit is contained in:
@@ -48,8 +48,9 @@ const customerName = computed(() => customer.value?.name || customer.value?.code
|
||||
const avatarText = computed(() => customerName.value.slice(0, 1));
|
||||
const customerCode = computed(() => customer.value?.code || "");
|
||||
const customerTelephone = computed(() => customer.value?.telephone || "");
|
||||
const photoURL = computed(() => customer.value ? getCustomerPhotoURL(customer.value) : "");
|
||||
const photoViewerImages = computed(() => photoURL.value ? [photoURL.value] : []);
|
||||
const photoURL = computed(() => customer.value ? getCustomerPhotoURL(customer.value, 64) : "");
|
||||
const originalPhotoURL = computed(() => customer.value ? getCustomerPhotoURL(customer.value) : "");
|
||||
const photoViewerImages = computed(() => originalPhotoURL.value ? [originalPhotoURL.value] : []);
|
||||
|
||||
function handlePhotoClick(event: MouseEvent): void {
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -114,6 +114,7 @@ type AddAction = {
|
||||
|
||||
type PhotoItem = {
|
||||
attachType?: string;
|
||||
previewUrl?: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
@@ -182,7 +183,7 @@ function removePhoto(index: number): void {
|
||||
|
||||
function openPhotoViewer(index: number): void {
|
||||
const photoList = [...displayPhotoList.value.slice(index), ...displayPhotoList.value.slice(0, index)];
|
||||
photoViewerImages.value = photoList.map(item => item.url);
|
||||
photoViewerImages.value = photoList.map(item => item.previewUrl || item.url);
|
||||
photoViewerVisible.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user