fix customer invite photo
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="customer-profile-card">
|
||||
<button v-if="photoURL" type="button" class="avatar-trigger" @click.stop="openPhotoViewer">
|
||||
<button v-if="photoURL" type="button" class="avatar-trigger" @click="handlePhotoClick">
|
||||
<t-image :src="photoURL" :alt="customerName" fit="cover" class="avatar" />
|
||||
</button>
|
||||
<div v-else class="avatar fallback" v-text="avatarText" />
|
||||
@@ -14,11 +14,13 @@
|
||||
</div>
|
||||
<telephone-link class="telephone gray" :value="customerTelephone" />
|
||||
</div>
|
||||
<t-image-viewer
|
||||
v-model:visible="photoViewerVisible"
|
||||
:images="photoViewerImages"
|
||||
show-index
|
||||
/>
|
||||
<div @click.stop>
|
||||
<t-image-viewer
|
||||
v-model:visible="photoViewerVisible"
|
||||
:images="photoViewerImages"
|
||||
show-index
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -43,6 +45,11 @@ const customerTelephone = computed(() => customer.value?.telephone || "");
|
||||
const photoURL = computed(() => customer.value ? getCustomerPhotoURL(customer.value) : "");
|
||||
const photoViewerImages = computed(() => photoURL.value ? [photoURL.value] : []);
|
||||
|
||||
function handlePhotoClick(event: MouseEvent): void {
|
||||
event.stopPropagation();
|
||||
openPhotoViewer();
|
||||
}
|
||||
|
||||
function openPhotoViewer(): void {
|
||||
if (!photoURL.value) {
|
||||
return;
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
/>
|
||||
<t-cell-group v-if="customer" theme="card">
|
||||
<t-cell title="出生日期">
|
||||
<button
|
||||
<span
|
||||
v-if="isLunarBirthdate"
|
||||
class="birthdate-trigger"
|
||||
class="birthdate-trigger gray"
|
||||
type="button"
|
||||
@click.stop="toggleBirthdateText"
|
||||
>
|
||||
<span v-text="birthdateText" />
|
||||
</button>
|
||||
</span>
|
||||
<span v-else v-text="birthdateText" />
|
||||
</t-cell>
|
||||
<t-cell title="年龄" :note="ageText" />
|
||||
@@ -575,13 +575,8 @@ watch(() => route.params.id, async () => {
|
||||
}
|
||||
|
||||
.birthdate-trigger {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
color: var(--td-text-color-primary);
|
||||
font: inherit;
|
||||
background: transparent;
|
||||
text-align: right;
|
||||
text-decoration: underline dotted;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: .2rem;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user