This commit is contained in:
dap
2024-08-29 19:55:11 +08:00
74 changed files with 1238 additions and 453 deletions

View File

@@ -30,6 +30,8 @@ const props = withDefaults(defineProps<Props>(), {
class="mb-2 flex justify-between text-lg font-semibold"
>
{{ title }}
<slot name="extra"></slot>
</div>
</slot>

View File

@@ -47,8 +47,8 @@ watch(
:close-on-press-escape="false"
:footer="false"
:fullscreen-button="false"
:header="false"
class="border-none px-10 py-6 text-center shadow-xl sm:w-[600px] sm:rounded-2xl md:h-[unset]"
header-class="hidden"
>
<VbenAvatar :src="avatar" class="mx-auto mb-6 size-20" />
<AuthenticationLogin

View File

@@ -34,15 +34,22 @@ const emit = defineEmits<{
submit: RegisterEmits['submit'];
}>();
const formState = reactive({
lockScreenPassword: '',
submitted: false,
});
const [Modal] = useVbenModal({
onConfirm() {
handleSubmit();
},
});
const formState = reactive({
lockScreenPassword: '',
submitted: false,
onOpenChange(isOpen) {
if (isOpen) {
// reset value reopen
formState.submitted = false;
formState.lockScreenPassword = '';
}
},
});
const passwordStatus = computed(() => {
@@ -70,7 +77,7 @@ function handleSubmit() {
>
<div
class="mb-10 flex w-full flex-col items-center px-10"
@keypress.enter.prevent="handleSubmit"
@keydown.enter.prevent="handleSubmit"
>
<div class="w-full">
<div class="ml-2 flex w-full flex-col items-center">

View File

@@ -120,7 +120,7 @@ function toggleUnlockForm() {
<div
v-if="showUnlockForm"
class="flex-center size-full"
@keypress.enter.prevent="handleSubmit"
@keydown.enter.prevent="handleSubmit"
>
<div class="flex-col-center mb-10 w-[300px]">
<VbenAvatar :src="avatar" class="enter-x mb-6 size-20" />