Prevent closing of accounts with balance

This commit is contained in:
2022-03-02 21:52:16 +00:00
parent c7a8adb3ab
commit 3727061065
2 changed files with 20 additions and 4 deletions

View File

@ -7,7 +7,7 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
(e: 'submit'): void,
(e: 'submit', event : {cancel:boolean}): boolean,
(e: 'open'): void,
}>();
@ -20,8 +20,12 @@ function openDialog() {
visible.value = true;
};
function submitDialog() {
const e = {cancel: false};
emit("submit", e);
if(e.cancel)
return;
visible.value = false;
emit("submit");
}
</script>