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
+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 {