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