update registration event editor

This commit is contained in:
Timi
2026-08-02 00:20:13 +08:00
parent 11c48bf00c
commit 35dff786b1
10 changed files with 376 additions and 215 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ onUnmounted(() => {
<style scoped lang="less">
.customer-selector {
display: flex;
height: 70vh;
height: 80vh;
padding-top: 1rem;
border-radius: 1.25rem 1.25rem 0 0;
flex-direction: column;
+21 -1
View File
@@ -5,6 +5,8 @@
theme="primary"
variant="dashed"
class="add"
:loading="loading"
:disabled="loading"
@click="$emit('add')"
>
<span v-text="addText" />
@@ -18,8 +20,11 @@
fit="cover"
/>
</t-button>
<div v-if="loading" class="mask">
<t-loading size="1.5rem" text="上传中" />
</div>
<t-button
v-if="showRemove"
v-if="showRemove && !loading"
class="remove"
theme="danger"
shape="circle"
@@ -42,6 +47,7 @@ interface Props {
addText?: string;
altText?: string;
modelValue: string;
loading?: boolean;
preview?: boolean;
showRemove?: boolean;
size?: "normal" | "compact";
@@ -50,6 +56,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {
addText: "拍照",
altText: "照片",
loading: false,
preview: true,
showRemove: true,
size: "normal"
@@ -133,6 +140,19 @@ function clearPhoto(): void {
}
}
.mask {
inset: 0;
gap: .375rem;
z-index: 1;
color: #fff;
display: flex;
position: absolute;
align-items: center;
flex-direction: column;
justify-content: center;
background: rgba(15, 23, 42, .45);
}
&.compact {
.add,
.card {
+4
View File
@@ -29,6 +29,8 @@
theme="primary"
variant="dashed"
class="add"
:loading="loading"
:disabled="loading"
@click="$emit('add')"
>
<span v-text="addText" />
@@ -47,6 +49,7 @@ interface Props {
addText?: string;
emptyText?: string;
fallbackImage?: string;
loading?: boolean;
modelValue: string[];
showAdd?: boolean;
showRemove?: boolean;
@@ -57,6 +60,7 @@ const props = withDefaults(defineProps<Props>(), {
title: "照片列表",
addText: "拍照",
emptyText: "暂无照片",
loading: false,
showAdd: true,
showRemove: true
});