Prevent closing of accounts with balance
This commit is contained in:
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user