diff --git a/packages/effects/layouts/src/widgets/lock-screen/lock-screen-modal.vue b/packages/effects/layouts/src/widgets/lock-screen/lock-screen-modal.vue index d5bfc927..96086d82 100644 --- a/packages/effects/layouts/src/widgets/lock-screen/lock-screen-modal.vue +++ b/packages/effects/layouts/src/widgets/lock-screen/lock-screen-modal.vue @@ -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() { >